From a72fc4bc20bf320e502f5cff4448e60c8743d425 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 19 Sep 2023 17:57:46 +0000 Subject: [PATCH] CodeGen from PR 25446 in Azure/azure-rest-api-specs Merge 87c9398b6442ff2035969204d730c46e74b4cc7e into 33cef784f0bee63125e7ddbbc16e4f34d7808047 --- .../CHANGELOG.md | 4 +- .../README.md | 4 +- .../SAMPLE.md | 799 +++++++-- .../pom.xml | 2 +- .../ContainerAppsApiManager.java | 83 +- .../appcontainers/fluent/BuildersClient.java | 286 +++ .../appcontainers/fluent/BuildsClient.java | 218 +++ .../fluent/ContainerAppsApiClient.java | 35 + .../ManagedEnvironmentUsagesClient.java | 45 + .../appcontainers/fluent/PatchesClient.java | 272 +++ .../fluent/ResourceProvidersClient.java | 24 + .../appcontainers/fluent/UsagesClient.java | 43 + .../fluent/models/AuthConfigInner.java | 26 + .../fluent/models/AuthConfigProperties.java | 33 + .../models/AvailableWorkloadProfileInner.java | 16 + .../fluent/models/BuildProperties.java | 132 ++ .../fluent/models/BuildResourceInner.java | 137 ++ .../fluent/models/BuilderProperties.java | 109 ++ .../fluent/models/BuilderResourceInner.java | 166 ++ .../BuilderResourceUpdateProperties.java | 52 + .../ConnectedEnvironmentStorageInner.java | 16 + .../fluent/models/DaprComponentInner.java | 40 + .../models/DaprComponentProperties.java | 30 + .../fluent/models/DiagnosticsInner.java | 16 + .../models/ManagedEnvironmentInner.java | 49 + .../models/ManagedEnvironmentProperties.java | 62 + .../ManagedEnvironmentStorageInner.java | 16 + .../fluent/models/PatchCollectionInner.java | 87 + .../fluent/models/PatchResourceInner.java | 60 + .../fluent/models/ReplicaInner.java | 16 + .../fluent/models/RevisionInner.java | 16 + .../fluent/models/SourceControlInner.java | 16 + .../fluent/models/UsageInner.java | 140 ++ .../models/WorkloadProfileStatesInner.java | 16 + .../implementation/AuthConfigImpl.java | 10 + .../AvailableWorkloadProfileImpl.java | 5 + .../implementation/BuildResourceImpl.java | 167 ++ .../implementation/BuilderResourceImpl.java | 230 +++ .../implementation/BuildersClientImpl.java | 1542 +++++++++++++++++ .../implementation/BuildersImpl.java | 170 ++ .../implementation/BuildsClientImpl.java | 1110 ++++++++++++ .../implementation/BuildsImpl.java | 190 ++ .../ConnectedEnvironmentStorageImpl.java | 5 + .../ContainerAppsApiClientImpl.java | 72 +- .../implementation/DaprComponentImpl.java | 20 + .../implementation/DiagnosticsImpl.java | 5 + .../ManagedEnvironmentImpl.java | 21 + .../ManagedEnvironmentStorageImpl.java | 5 + .../ManagedEnvironmentUsagesClientImpl.java | 342 ++++ .../ManagedEnvironmentUsagesImpl.java | 46 + .../implementation/PatchCollectionImpl.java | 52 + .../implementation/PatchResourceImpl.java | 51 + .../implementation/PatchesClientImpl.java | 1225 +++++++++++++ .../implementation/PatchesImpl.java | 121 ++ .../implementation/ReplicaImpl.java | 5 + .../ResourceProvidersClientImpl.java | 122 ++ .../implementation/ResourceProvidersImpl.java | 8 + .../implementation/RevisionImpl.java | 5 + .../implementation/SourceControlImpl.java | 5 + .../implementation/UsageImpl.java | 44 + .../implementation/UsagesClientImpl.java | 316 ++++ .../implementation/UsagesImpl.java | 45 + .../WorkloadProfileStatesImpl.java | 5 + .../models/AppInsightsConfiguration.java | 50 + .../appcontainers/models/AuthConfig.java | 40 +- .../models/AvailableWorkloadProfile.java | 8 + .../AvailableWorkloadProfileProperties.java | 26 + .../appcontainers/models/BillingMeter.java | 16 + .../models/BlobStorageTokenStore.java | 61 + .../appcontainers/models/BuildCollection.java | 88 + .../models/BuildConfiguration.java | 163 ++ .../models/BuildProvisioningState.java | 59 + .../appcontainers/models/BuildResource.java | 224 +++ .../appcontainers/models/BuildStatus.java | 56 + .../models/BuilderCollection.java | 88 + .../models/BuilderProvisioningState.java | 59 + .../appcontainers/models/BuilderResource.java | 309 ++++ .../models/BuilderResourceUpdate.java | 126 ++ .../appcontainers/models/Builders.java | 168 ++ .../appcontainers/models/Builds.java | 152 ++ .../models/CertificateProperties.java | 28 + .../appcontainers/models/CertificateType.java | 47 + .../models/ConnectedEnvironmentStorage.java | 8 + .../models/ContainerRegistry.java | 91 + .../ContainerRegistryWithCustomImage.java | 88 + .../appcontainers/models/DaprComponent.java | 45 +- .../models/DaprComponentServiceBinding.java | 105 ++ .../models/DaprServiceBindMetadata.java | 76 + .../models/DataDogConfiguration.java | 76 + .../models/DestinationsConfiguration.java | 53 + .../appcontainers/models/DetectionStatus.java | 50 + .../appcontainers/models/Diagnostics.java | 8 + .../models/EncryptionSettings.java | 79 + .../models/EnvironmentVariable.java | 89 + .../appcontainers/models/HttpGet.java | 110 ++ .../appcontainers/models/Ingress.java | 29 + .../models/IngressPortMapping.java | 104 ++ .../models/ListUsagesResult.java | 84 + .../appcontainers/models/Login.java | 29 + .../models/LogsConfiguration.java | 51 + .../models/ManagedEnvironment.java | 62 + .../models/ManagedEnvironmentStorage.java | 8 + .../models/ManagedEnvironmentUsages.java | 40 + .../models/MetricsConfiguration.java | 51 + .../models/OpenTelemetryConfiguration.java | 141 ++ .../models/PatchApplyStatus.java | 68 + .../appcontainers/models/PatchCollection.java | 32 + .../appcontainers/models/PatchDetails.java | 151 ++ .../models/PatchDetailsNewLayer.java | 102 ++ .../models/PatchDetailsOldLayer.java | 102 ++ .../appcontainers/models/PatchProperties.java | 182 ++ .../models/PatchProvisioningState.java | 50 + .../appcontainers/models/PatchResource.java | 53 + .../appcontainers/models/PatchType.java | 53 + .../appcontainers/models/Patches.java | 156 ++ .../appcontainers/models/PreBuildStep.java | 106 ++ .../appcontainers/models/Replica.java | 8 + .../models/ResourceProviders.java | 22 + .../appcontainers/models/Revision.java | 8 + .../appcontainers/models/SourceControl.java | 8 + .../appcontainers/models/TokenStore.java | 116 ++ .../models/TracesConfiguration.java | 51 + .../appcontainers/models/Usage.java | 45 + .../appcontainers/models/UsageName.java | 76 + .../appcontainers/models/Usages.java | 38 + .../models/WorkloadProfileStates.java | 8 + .../AvailableWorkloadProfilesGetSamples.java | 2 +- .../generated/BillingMetersGetSamples.java | 2 +- .../BuildersCreateOrUpdateSamples.java | 67 + .../generated/BuildersDeleteSamples.java | 20 + .../BuildersGetByResourceGroupSamples.java | 20 + .../BuildersListByResourceGroupSamples.java | 21 + .../generated/BuildersListSamples.java | 21 + .../generated/BuildersUpdateSamples.java | 41 + .../BuildsCreateOrUpdateSamples.java | 78 + .../generated/BuildsDeleteSamples.java | 20 + .../generated/BuildsGetSamples.java | 20 + .../BuildsListByBuilderResourceSamples.java | 21 + .../CertificatesCreateOrUpdateSamples.java | 6 +- .../generated/CertificatesDeleteSamples.java | 2 +- .../generated/CertificatesGetSamples.java | 2 +- .../generated/CertificatesListSamples.java | 2 +- .../generated/CertificatesUpdateSamples.java | 2 +- ...entsCertificatesCreateOrUpdateSamples.java | 2 +- ...EnvironmentsCertificatesDeleteSamples.java | 2 +- ...tedEnvironmentsCertificatesGetSamples.java | 2 +- ...edEnvironmentsCertificatesListSamples.java | 2 +- ...EnvironmentsCertificatesUpdateSamples.java | 2 +- ...ironmentsCheckNameAvailabilitySamples.java | 2 +- ...ctedEnvironmentsCreateOrUpdateSamples.java | 2 +- ...tsDaprComponentsCreateOrUpdateSamples.java | 13 +- ...vironmentsDaprComponentsDeleteSamples.java | 2 +- ...dEnvironmentsDaprComponentsGetSamples.java | 2 +- ...EnvironmentsDaprComponentsListSamples.java | 2 +- ...mentsDaprComponentsListSecretsSamples.java | 2 +- .../ConnectedEnvironmentsDeleteSamples.java | 2 +- ...EnvironmentsGetByResourceGroupSamples.java | 2 +- ...nvironmentsListByResourceGroupSamples.java | 2 +- .../ConnectedEnvironmentsListSamples.java | 2 +- ...ronmentsStoragesCreateOrUpdateSamples.java | 2 +- ...ctedEnvironmentsStoragesDeleteSamples.java | 2 +- ...nnectedEnvironmentsStoragesGetSamples.java | 2 +- ...nectedEnvironmentsStoragesListSamples.java | 2 +- .../ConnectedEnvironmentsUpdateSamples.java | 2 +- ...rAppsAuthConfigsCreateOrUpdateSamples.java | 7 +- ...ContainerAppsAuthConfigsDeleteSamples.java | 2 +- .../ContainerAppsAuthConfigsGetSamples.java | 2 +- ...sAuthConfigsListByContainerAppSamples.java | 2 +- .../ContainerAppsCreateOrUpdateSamples.java | 17 +- .../generated/ContainerAppsDeleteSamples.java | 2 +- ...inerAppsDiagnosticsGetDetectorSamples.java | 2 +- ...inerAppsDiagnosticsGetRevisionSamples.java | 2 +- ...ontainerAppsDiagnosticsGetRootSamples.java | 2 +- ...erAppsDiagnosticsListDetectorsSamples.java | 2 +- ...erAppsDiagnosticsListRevisionsSamples.java | 2 +- .../ContainerAppsGetAuthTokenSamples.java | 2 +- ...ontainerAppsGetByResourceGroupSamples.java | 2 +- ...ntainerAppsListByResourceGroupSamples.java | 2 +- ...AppsListCustomHostnameAnalysisSamples.java | 2 +- .../generated/ContainerAppsListSamples.java | 2 +- .../ContainerAppsListSecretsSamples.java | 2 +- ...AppsRevisionReplicasGetReplicaSamples.java | 2 +- ...psRevisionReplicasListReplicasSamples.java | 2 +- ...rAppsRevisionsActivateRevisionSamples.java | 2 +- ...ppsRevisionsDeactivateRevisionSamples.java | 2 +- ...tainerAppsRevisionsGetRevisionSamples.java | 2 +- ...inerAppsRevisionsListRevisionsSamples.java | 2 +- ...erAppsRevisionsRestartRevisionSamples.java | 2 +- ...psSourceControlsCreateOrUpdateSamples.java | 2 +- ...tainerAppsSourceControlsDeleteSamples.java | 2 +- ...ContainerAppsSourceControlsGetSamples.java | 2 +- ...urceControlsListByContainerAppSamples.java | 2 +- .../generated/ContainerAppsStartSamples.java | 2 +- .../generated/ContainerAppsStopSamples.java | 2 +- .../generated/ContainerAppsUpdateSamples.java | 2 +- .../DaprComponentsCreateOrUpdateSamples.java | 32 +- .../DaprComponentsDeleteSamples.java | 2 +- .../generated/DaprComponentsGetSamples.java | 4 +- .../generated/DaprComponentsListSamples.java | 2 +- .../DaprComponentsListSecretsSamples.java | 2 +- .../generated/JobsCreateOrUpdateSamples.java | 4 +- .../generated/JobsDeleteSamples.java | 2 +- .../generated/JobsExecutionsListSamples.java | 2 +- .../JobsGetByResourceGroupSamples.java | 2 +- .../JobsListByResourceGroupSamples.java | 2 +- .../generated/JobsListSamples.java | 2 +- .../generated/JobsListSecretsSamples.java | 2 +- .../generated/JobsStartSamples.java | 2 +- .../generated/JobsStopExecutionSamples.java | 2 +- .../JobsStopMultipleExecutionsSamples.java | 2 +- .../generated/JobsUpdateSamples.java | 2 +- ...agedCertificatesCreateOrUpdateSamples.java | 2 +- .../ManagedCertificatesDeleteSamples.java | 2 +- .../ManagedCertificatesGetSamples.java | 2 +- .../ManagedCertificatesListSamples.java | 2 +- .../ManagedCertificatesUpdateSamples.java | 2 +- ...ironmentDiagnosticsGetDetectorSamples.java | 2 +- ...onmentDiagnosticsListDetectorsSamples.java | 2 +- .../ManagedEnvironmentUsagesListSamples.java | 21 + ...agedEnvironmentsCreateOrUpdateSamples.java | 24 +- .../ManagedEnvironmentsDeleteSamples.java | 2 +- ...EnvironmentsDiagnosticsGetRootSamples.java | 2 +- ...anagedEnvironmentsGetAuthTokenSamples.java | 2 +- ...EnvironmentsGetByResourceGroupSamples.java | 2 +- ...nvironmentsListByResourceGroupSamples.java | 2 +- .../ManagedEnvironmentsListSamples.java | 2 +- ...mentsListWorkloadProfileStatesSamples.java | 2 +- ...ronmentsStoragesCreateOrUpdateSamples.java | 2 +- ...agedEnvironmentsStoragesDeleteSamples.java | 2 +- ...ManagedEnvironmentsStoragesGetSamples.java | 2 +- ...anagedEnvironmentsStoragesListSamples.java | 2 +- .../ManagedEnvironmentsUpdateSamples.java | 2 +- ...amespacesCheckNameAvailabilitySamples.java | 4 +- .../generated/OperationsListSamples.java | 2 +- .../generated/PatchesApplySamples.java | 20 + .../generated/PatchesDeleteSamples.java | 20 + .../generated/PatchesGetSamples.java | 20 + .../PatchesListByBuilderResourceSamples.java | 23 + .../PatchesSkipConfigureSamples.java | 22 + ...rGetCustomDomainVerificationIdSamples.java | 20 + .../ResourceProviderJobExecutionSamples.java | 2 +- .../generated/UsagesListSamples.java | 20 + .../AllowedAudiencesValidationTests.java | 29 - .../generated/AllowedPrincipalsTests.java | 33 - .../generated/AuthConfigCollectionTests.java | 364 ---- .../generated/AuthPlatformTests.java | 27 - .../generated/AvailableOperationsTests.java | 60 - .../AvailableWorkloadProfileInnerTests.java | 49 - ...ailableWorkloadProfilePropertiesTests.java | 43 - ...ilableWorkloadProfilesCollectionTests.java | 73 - ...AvailableWorkloadProfilesGetMockTests.java | 75 - .../AzureActiveDirectoryLoginTests.java | 34 - .../AzureStaticWebAppsRegistrationTests.java | 25 - .../generated/AzureStaticWebAppsTests.java | 33 - .../BillingMeterCollectionInnerTests.java | 62 - .../BillingMeterPropertiesTests.java | 32 - .../generated/BillingMeterTests.java | 42 - ...BillingMetersGetWithResponseMockTests.java | 70 - .../generated/CertificatePatchTests.java | 45 - ...rtificatesDeleteWithResponseMockTests.java | 63 - .../CheckNameAvailabilityRequestTests.java | 29 - ...eckNameAvailabilityResponseInnerTests.java | 36 - ...rtificatesDeleteWithResponseMockTests.java | 63 - ...NameAvailabilityWithResponseMockTests.java | 77 - ...ComponentsDeleteWithResponseMockTests.java | 63 - ...nentsListSecretsWithResponseMockTests.java | 67 - .../ConnectedEnvironmentsDeleteMockTests.java | 61 - ...tsStoragesDeleteWithResponseMockTests.java | 63 - .../ContainerAppJobExecutionsInnerTests.java | 199 --- ...erAppProbeHttpGetHttpHeadersItemTests.java | 30 - .../ContainerAppProbeHttpGetTests.java | 53 - .../ContainerAppProbeTcpSocketTests.java | 30 - .../generated/ContainerAppProbeTests.java | 83 - ...uthConfigsDeleteWithResponseMockTests.java | 63 - .../ContainerAppsDeleteMockTests.java | 61 - ...sticsGetDetectorWithResponseMockTests.java | 82 - ...AppsDiagnosticsListDetectorsMockTests.java | 93 - ...plicasGetReplicaWithResponseMockTests.java | 79 - ...icasListReplicasWithResponseMockTests.java | 68 - ...ActivateRevisionWithResponseMockTests.java | 63 - ...activateRevisionWithResponseMockTests.java | 63 - ...sRestartRevisionWithResponseMockTests.java | 63 - ...inerAppsSourceControlsDeleteMockTests.java | 63 - .../generated/ContainerResourcesTests.java | 30 - .../generated/CookieExpirationTests.java | 31 - .../generated/CustomDomainTests.java | 36 - ...ComponentsDeleteWithResponseMockTests.java | 63 - ...nentsListSecretsWithResponseMockTests.java | 67 - .../generated/DaprConfigurationTests.java | 22 - .../generated/DaprSecretTests.java | 22 - .../DaprSecretsCollectionInnerTests.java | 29 - .../appcontainers/generated/DaprTests.java | 53 - .../DefaultAuthorizationPolicyTests.java | 40 - .../DefaultErrorResponseErrorTests.java | 22 - ...aProviderMetadataPropertyBagItemTests.java | 30 - .../DiagnosticDataProviderMetadataTests.java | 46 - ...iagnosticDataTableResponseColumnTests.java | 35 - ...iagnosticDataTableResponseObjectTests.java | 58 - .../generated/DiagnosticRenderingTests.java | 39 - .../DiagnosticSupportTopicTests.java | 24 - .../DiagnosticsCollectionInnerTests.java | 108 -- .../DiagnosticsDataApiResponseTests.java | 68 - .../generated/DiagnosticsDefinitionTests.java | 33 - .../generated/DiagnosticsInnerTests.java | 158 -- .../generated/DiagnosticsPropertiesTests.java | 101 -- .../generated/DiagnosticsStatusTests.java | 27 - .../generated/ExtendedLocationTests.java | 28 - .../generated/ForwardProxyTests.java | 37 - .../generated/GlobalValidationTests.java | 38 - .../generated/HttpSettingsRoutesTests.java | 25 - .../generated/HttpSettingsTests.java | 47 - .../generated/IngressStickySessionsTests.java | 26 - .../IpSecurityRestrictionRuleTests.java | 40 - ...ConfigurationManualTriggerConfigTests.java | 30 - ...nfigurationScheduleTriggerConfigTests.java | 36 - .../generated/JobExecutionBaseInnerTests.java | 27 - .../generated/JobsDeleteMockTests.java | 61 - .../JobsExecutionsListMockTests.java | 92 - .../generated/JobsStopExecutionMockTests.java | 61 - .../JobsStopMultipleExecutionsMockTests.java | 71 - .../generated/JwtClaimChecksTests.java | 34 - .../generated/KedaConfigurationTests.java | 22 - .../generated/LoginRoutesTests.java | 24 - .../generated/LoginScopesTests.java | 26 - .../appcontainers/generated/LoginTests.java | 56 - .../ManagedCertificatePatchTests.java | 39 - ...rtificatesDeleteWithResponseMockTests.java | 63 - ...sticsGetDetectorWithResponseMockTests.java | 81 - ...icsListDetectorsWithResponseMockTests.java | 74 - ...mentPropertiesPeerAuthenticationTests.java | 29 - .../ManagedEnvironmentsDeleteMockTests.java | 61 - ...ntsListWorkloadProfileStatesMockTests.java | 72 - ...tsStoragesDeleteWithResponseMockTests.java | 63 - .../ManagedServiceIdentityTests.java | 48 - .../appcontainers/generated/MtlsTests.java | 24 - ...NameAvailabilityWithResponseMockTests.java | 77 - .../appcontainers/generated/NonceTests.java | 29 - .../generated/OpenIdConnectLoginTests.java | 34 - .../generated/OperationDetailInnerTests.java | 51 - .../generated/OperationDisplayTests.java | 39 - .../generated/OperationsListMockTests.java | 73 - .../ReplicaCollectionInnerTests.java | 127 -- .../generated/ReplicaContainerTests.java | 42 - .../generated/ReplicaInnerTests.java | 79 - .../generated/ReplicaPropertiesTests.java | 85 - ...dersJobExecutionWithResponseMockTests.java | 86 - .../generated/RevisionCollectionTests.java | 28 - .../generated/ServiceBindTests.java | 27 - .../appcontainers/generated/ServiceTests.java | 24 - .../generated/TrafficWeightTests.java | 39 - .../generated/UserAssignedIdentityTests.java | 25 - .../generated/VnetConfigurationTests.java | 42 - .../generated/VolumeMountTests.java | 32 - .../WorkloadProfileStatesCollectionTests.java | 51 - .../WorkloadProfileStatesInnerTests.java | 39 - .../WorkloadProfileStatesPropertiesTests.java | 35 - .../generated/WorkloadProfileTests.java | 39 - 357 files changed, 14246 insertions(+), 6519 deletions(-) create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildersClient.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsClient.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentUsagesClient.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/PatchesClient.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/UsagesClient.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildProperties.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildResourceInner.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderProperties.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceInner.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceUpdateProperties.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PatchCollectionInner.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PatchResourceInner.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/UsageInner.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildResourceImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuilderResourceImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersClientImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsClientImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesClientImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchCollectionImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchResourceImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchesClientImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchesImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsageImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesClientImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppInsightsConfiguration.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BlobStorageTokenStore.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildCollection.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildConfiguration.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildProvisioningState.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildResource.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildStatus.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderCollection.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderProvisioningState.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResource.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResourceUpdate.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builders.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builds.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateType.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistry.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistryWithCustomImage.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentServiceBinding.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprServiceBindMetadata.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DataDogConfiguration.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DestinationsConfiguration.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DetectionStatus.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EncryptionSettings.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVariable.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpGet.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressPortMapping.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ListUsagesResult.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogsConfiguration.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentUsages.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MetricsConfiguration.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenTelemetryConfiguration.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchApplyStatus.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchCollection.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetails.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsNewLayer.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsOldLayer.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchProperties.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchProvisioningState.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchResource.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchType.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Patches.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PreBuildStep.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TokenStore.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TracesConfiguration.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Usage.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UsageName.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Usages.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersDeleteSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersUpdateSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsCreateOrUpdateSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsDeleteSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsGetSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsListByBuilderResourceSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/PatchesApplySamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/PatchesDeleteSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/PatchesGetSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/PatchesListByBuilderResourceSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/PatchesSkipConfigureSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderGetCustomDomainVerificationIdSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/UsagesListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigCollectionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfileInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilePropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesCollectionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryLoginTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppJobExecutionsInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTcpSocketTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprConfigurationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultErrorResponseErrorTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseColumnTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseObjectTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticRenderingTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsStatusTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressStickySessionsTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationManualTriggerConfigTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationScheduleTriggerConfigTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionBaseInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/KedaConfigurationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginScopesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatePatchTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerAuthenticationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MtlsTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilityWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDetailInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDisplayTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationsListMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersJobExecutionWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceBindTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileTests.java diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md index 92cf4d5397681..39442278a3434 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.7 (Unreleased) +## 1.0.0-beta.1 (2023-09-19) + +- Azure Resource Manager ContainerAppsApi client library for Java. This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Package tag package-preview-2023-08. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md index 7e58ce2f26aff..ae80a79bf6da6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md @@ -2,7 +2,7 @@ Azure Resource Manager ContainerAppsApi client library for Java. -This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Package tag package-2023-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Package tag package-preview-2023-08. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-appcontainers - 1.0.0-beta.6 + 1.0.0-beta.7 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md index 961f0002cf980..3f1e527d7565d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md @@ -9,6 +9,22 @@ - [Get](#billingmeters_get) +## Builders + +- [CreateOrUpdate](#builders_createorupdate) +- [Delete](#builders_delete) +- [GetByResourceGroup](#builders_getbyresourcegroup) +- [List](#builders_list) +- [ListByResourceGroup](#builders_listbyresourcegroup) +- [Update](#builders_update) + +## Builds + +- [CreateOrUpdate](#builds_createorupdate) +- [Delete](#builds_delete) +- [Get](#builds_get) +- [ListByBuilderResource](#builds_listbybuilderresource) + ## Certificates - [CreateOrUpdate](#certificates_createorupdate) @@ -137,6 +153,10 @@ - [GetDetector](#managedenvironmentdiagnostics_getdetector) - [ListDetectors](#managedenvironmentdiagnostics_listdetectors) +## ManagedEnvironmentUsages + +- [List](#managedenvironmentusages_list) + ## ManagedEnvironments - [CreateOrUpdate](#managedenvironments_createorupdate) @@ -167,16 +187,29 @@ - [List](#operations_list) +## Patches + +- [Apply](#patches_apply) +- [Delete](#patches_delete) +- [Get](#patches_get) +- [ListByBuilderResource](#patches_listbybuilderresource) +- [SkipConfigure](#patches_skipconfigure) + ## ResourceProvider +- [GetCustomDomainVerificationId](#resourceprovider_getcustomdomainverificationid) - [JobExecution](#resourceprovider_jobexecution) + +## Usages + +- [List](#usages_list) ### AvailableWorkloadProfiles_Get ```java /** Samples for AvailableWorkloadProfiles Get. */ public final class AvailableWorkloadProfilesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AvailableWorkloadProfiles_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/AvailableWorkloadProfiles_Get.json */ /** * Sample code: BillingMeters_Get. @@ -195,7 +228,7 @@ public final class AvailableWorkloadProfilesGetSamples { /** Samples for BillingMeters Get. */ public final class BillingMetersGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/BillingMeters_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/BillingMeters_Get.json */ /** * Sample code: BillingMeters_Get. @@ -208,16 +241,336 @@ public final class BillingMetersGetSamples { } ``` +### Builders_CreateOrUpdate + +```java +import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Builders CreateOrUpdate. */ +public final class BuildersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builders_CreateOrUpdate.json + */ + /** + * Sample code: Builders_CreateOrUpdate_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildersCreateOrUpdate0( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .builders() + .define("testBuilder") + .withRegion("eastus") + .withExistingResourceGroup("rg") + .withTags(mapOf("company", "Microsoft")) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", + new UserAssignedIdentity()))) + .withEnvironmentId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv") + .withContainerRegistries( + Arrays + .asList( + new ContainerRegistry() + .withContainerRegistryServer("test.azurecr.io") + .withIdentityResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"), + new ContainerRegistry() + .withContainerRegistryServer("test2.azurecr.io") + .withIdentityResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Builders_Delete + +```java +/** Samples for Builders Delete. */ +public final class BuildersDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builders_Delete.json + */ + /** + * Sample code: Builders_Delete_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildersDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builders().delete("rg", "testBuilder", com.azure.core.util.Context.NONE); + } +} +``` + +### Builders_GetByResourceGroup + +```java +/** Samples for Builders GetByResourceGroup. */ +public final class BuildersGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builders_Get.json + */ + /** + * Sample code: Builders_Get_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildersGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builders().getByResourceGroupWithResponse("rg", "testBuilder", com.azure.core.util.Context.NONE); + } +} +``` + +### Builders_List + +```java +/** Samples for Builders List. */ +public final class BuildersListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builders_ListBySubscription.json + */ + /** + * Sample code: Builders_ListBySubscription_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildersListBySubscription0( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builders().list(com.azure.core.util.Context.NONE); + } +} +``` + +### Builders_ListByResourceGroup + +```java +/** Samples for Builders ListByResourceGroup. */ +public final class BuildersListByResourceGroupSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builders_ListByResourceGroup.json + */ + /** + * Sample code: Builders_ListByResourceGroup_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildersListByResourceGroup0( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builders().listByResourceGroup("rg", com.azure.core.util.Context.NONE); + } +} +``` + +### Builders_Update + +```java +import com.azure.resourcemanager.appcontainers.models.BuilderResource; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Builders Update. */ +public final class BuildersUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builders_Update.json + */ + /** + * Sample code: Builders_Update_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildersUpdate0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + BuilderResource resource = + manager + .builders() + .getByResourceGroupWithResponse("rg", "testBuilder", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("mytag1", "myvalue1")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### Builds_CreateOrUpdate + +```java +import com.azure.resourcemanager.appcontainers.models.BuildConfiguration; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; +import com.azure.resourcemanager.appcontainers.models.EnvironmentVariable; +import com.azure.resourcemanager.appcontainers.models.HttpGet; +import com.azure.resourcemanager.appcontainers.models.PreBuildStep; +import java.util.Arrays; + +/** Samples for Builds CreateOrUpdate. */ +public final class BuildsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_CreateOrUpdate.json + */ + /** + * Sample code: Builds_CreateOrUpdate_WithConfig. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildsCreateOrUpdateWithConfig( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .builds() + .define("testBuild-123456789az") + .withExistingBuilder("rg", "testBuilder") + .withDestinationContainerRegistry( + new ContainerRegistryWithCustomImage() + .withServer("test.azurecr.io") + .withImage("test.azurecr.io/repo:tag")) + .withConfiguration( + new BuildConfiguration() + .withBaseOs("DebianBullseye") + .withPlatform("dotnetcore") + .withPlatformVersion("7.0") + .withEnvironmentVariables( + Arrays + .asList( + new EnvironmentVariable().withName("foo1").withValue("bar1"), + new EnvironmentVariable().withName("foo2").withValue("bar2"))) + .withPreBuildSteps( + Arrays + .asList( + new PreBuildStep() + .withDescription("First pre build step.") + .withScripts(Arrays.asList("echo 'hello'", "echo 'world'")) + .withHttpGet( + new HttpGet() + .withUrl("https://microsoft.com") + .withFileName("output.txt") + .withHeaders(Arrays.asList("foo", "bar"))), + new PreBuildStep() + .withDescription("Second pre build step.") + .withScripts(Arrays.asList("echo 'hello'", "echo 'again'")) + .withHttpGet( + new HttpGet() + .withUrl("https://microsoft.com") + .withFileName("output.txt") + .withHeaders(Arrays.asList("foo")))))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_CreateOrUpdate_NoConfig.json + */ + /** + * Sample code: Builds_CreateOrUpdate_NoConfig. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildsCreateOrUpdateNoConfig( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builds().define("testBuild").withExistingBuilder("rg", "testBuilder").create(); + } +} +``` + +### Builds_Delete + +```java +/** Samples for Builds Delete. */ +public final class BuildsDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_Delete.json + */ + /** + * Sample code: Builds_Delete_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildsDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builds().delete("rg", "testBuilder", "testBuild", com.azure.core.util.Context.NONE); + } +} +``` + +### Builds_Get + +```java +/** Samples for Builds Get. */ +public final class BuildsGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_Get.json + */ + /** + * Sample code: Builds_Get_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildsGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builds().getWithResponse("rg", "testBuilder", "testBuild", com.azure.core.util.Context.NONE); + } +} +``` + +### Builds_ListByBuilderResource + +```java +/** Samples for Builds ListByBuilderResource. */ +public final class BuildsListByBuilderResourceSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_ListByBuilderResource.json + */ + /** + * Sample code: Builds_ListByBuilderResource_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildsListByBuilderResource0( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builds().listByBuilderResource("rg", "testBuilder", com.azure.core.util.Context.NONE); + } +} +``` + ### Certificates_CreateOrUpdate ```java import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; import com.azure.resourcemanager.appcontainers.models.CertificateProperties; +import com.azure.resourcemanager.appcontainers.models.CertificateType; /** Samples for Certificates CreateOrUpdate. */ public final class CertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Certificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -237,7 +590,8 @@ public final class CertificatesCreateOrUpdateSamples { .withProperties( new CertificateProperties() .withPassword("fakeTokenPlaceholder") - .withValue("Y2VydA==".getBytes())), + .withValue("Y2VydA==".getBytes()) + .withType(CertificateType.IMAGE_PULL_TRUSTED_CA)), com.azure.core.util.Context.NONE); } } @@ -249,7 +603,7 @@ public final class CertificatesCreateOrUpdateSamples { /** Samples for Certificates Delete. */ public final class CertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Certificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -271,7 +625,7 @@ public final class CertificatesDeleteSamples { /** Samples for Certificates Get. */ public final class CertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Certificate_Get.json */ /** * Sample code: Get Certificate. @@ -293,7 +647,7 @@ public final class CertificatesGetSamples { /** Samples for Certificates List. */ public final class CertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Certificates_ListByManagedEnvironment.json */ /** * Sample code: List Certificates by Managed Environment. @@ -317,7 +671,7 @@ import java.util.Map; /** Samples for Certificates Update. */ public final class CertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Certificates_Patch.json */ /** * Sample code: Patch Certificate. @@ -357,7 +711,7 @@ import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReque /** Samples for ConnectedEnvironments CheckNameAvailability. */ public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -387,7 +741,7 @@ import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; /** Samples for ConnectedEnvironments CreateOrUpdate. */ public final class ConnectedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create kube environments. @@ -419,7 +773,7 @@ public final class ConnectedEnvironmentsCreateOrUpdateSamples { /** Samples for ConnectedEnvironments Delete. */ public final class ConnectedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironments_Delete.json */ /** * Sample code: Delete connected environment by connectedEnvironmentName. @@ -439,7 +793,7 @@ public final class ConnectedEnvironmentsDeleteSamples { /** Samples for ConnectedEnvironments GetByResourceGroup. */ public final class ConnectedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironments_Get.json */ /** * Sample code: Get connected environment by connectedEnvironmentName. @@ -461,7 +815,7 @@ public final class ConnectedEnvironmentsGetByResourceGroupSamples { /** Samples for ConnectedEnvironments List. */ public final class ConnectedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironments_ListBySubscription.json */ /** * Sample code: List connected environments by subscription. @@ -481,7 +835,7 @@ public final class ConnectedEnvironmentsListSamples { /** Samples for ConnectedEnvironments ListByResourceGroup. */ public final class ConnectedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. @@ -501,7 +855,7 @@ public final class ConnectedEnvironmentsListByResourceGroupSamples { /** Samples for ConnectedEnvironments Update. */ public final class ConnectedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. @@ -523,7 +877,7 @@ import com.azure.resourcemanager.appcontainers.models.CertificateProperties; /** Samples for ConnectedEnvironmentsCertificates CreateOrUpdate. */ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -550,7 +904,7 @@ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { /** Samples for ConnectedEnvironmentsCertificates Delete. */ public final class ConnectedEnvironmentsCertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -572,7 +926,7 @@ public final class ConnectedEnvironmentsCertificatesDeleteSamples { /** Samples for ConnectedEnvironmentsCertificates Get. */ public final class ConnectedEnvironmentsCertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json */ /** * Sample code: Get Certificate. @@ -594,7 +948,7 @@ public final class ConnectedEnvironmentsCertificatesGetSamples { /** Samples for ConnectedEnvironmentsCertificates List. */ public final class ConnectedEnvironmentsCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json */ /** * Sample code: List Certificates by Connected Environment. @@ -620,7 +974,7 @@ import java.util.Map; /** Samples for ConnectedEnvironmentsCertificates Update. */ public final class ConnectedEnvironmentsCertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json */ /** * Sample code: Patch Certificate. @@ -654,14 +1008,16 @@ public final class ConnectedEnvironmentsCertificatesUpdateSamples { ### ConnectedEnvironmentsDaprComponents_CreateOrUpdate ```java +import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; +import com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata; import com.azure.resourcemanager.appcontainers.models.Secret; import java.util.Arrays; /** Samples for ConnectedEnvironmentsDaprComponents CreateOrUpdate. */ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json */ /** * Sample code: Create or update dapr component. @@ -687,6 +1043,15 @@ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { new DaprMetadata().withName("collection").withValue("items"), new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .withServiceComponentBind( + Arrays + .asList( + new DaprComponentServiceBinding() + .withName("statestore") + .withServiceId( + "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") + .withMetadata( + new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))) .create(); } } @@ -698,7 +1063,7 @@ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { /** Samples for ConnectedEnvironmentsDaprComponents Delete. */ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json */ /** * Sample code: Delete dapr component. @@ -719,7 +1084,7 @@ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { /** Samples for ConnectedEnvironmentsDaprComponents Get. */ public final class ConnectedEnvironmentsDaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json */ /** * Sample code: Get Dapr Component. @@ -740,7 +1105,7 @@ public final class ConnectedEnvironmentsDaprComponentsGetSamples { /** Samples for ConnectedEnvironmentsDaprComponents List. */ public final class ConnectedEnvironmentsDaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json */ /** * Sample code: List Dapr Components. @@ -761,7 +1126,7 @@ public final class ConnectedEnvironmentsDaprComponentsListSamples { /** Samples for ConnectedEnvironmentsDaprComponents ListSecrets. */ public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -787,7 +1152,7 @@ import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorag /** Samples for ConnectedEnvironmentsStorages CreateOrUpdate. */ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. @@ -819,7 +1184,7 @@ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /** Samples for ConnectedEnvironmentsStorages Delete. */ public final class ConnectedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. @@ -841,7 +1206,7 @@ public final class ConnectedEnvironmentsStoragesDeleteSamples { /** Samples for ConnectedEnvironmentsStorages Get. */ public final class ConnectedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. @@ -863,7 +1228,7 @@ public final class ConnectedEnvironmentsStoragesGetSamples { /** Samples for ConnectedEnvironmentsStorages List. */ public final class ConnectedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. @@ -899,6 +1264,7 @@ import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; import com.azure.resourcemanager.appcontainers.models.Dapr; import com.azure.resourcemanager.appcontainers.models.Ingress; import com.azure.resourcemanager.appcontainers.models.IngressClientCertificateMode; +import com.azure.resourcemanager.appcontainers.models.IngressPortMapping; import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; import com.azure.resourcemanager.appcontainers.models.InitContainer; @@ -919,7 +1285,7 @@ import java.util.Map; /** Samples for ContainerApps CreateOrUpdate. */ public final class ContainerAppsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App. @@ -986,7 +1352,15 @@ public final class ContainerAppsCreateOrUpdateSamples { .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")) .withMaxAge(1234) - .withAllowCredentials(true))) + .withAllowCredentials(true)) + .withAdditionalPortMappings( + Arrays + .asList( + new IngressPortMapping().withExternal(true).withTargetPort(1234), + new IngressPortMapping() + .withExternal(false) + .withTargetPort(2345) + .withExposedPort(3456)))) .withDapr( new Dapr() .withEnabled(true) @@ -1056,7 +1430,7 @@ public final class ContainerAppsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_TcpApp_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json */ /** * Sample code: Create or Update Tcp App. @@ -1117,7 +1491,7 @@ public final class ContainerAppsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ManagedBy_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json */ /** * Sample code: Create or Update ManagedBy App. @@ -1200,7 +1574,7 @@ public final class ContainerAppsCreateOrUpdateSamples { /** Samples for ContainerApps Delete. */ public final class ContainerAppsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_Delete.json */ /** * Sample code: Delete Container App. @@ -1219,7 +1593,7 @@ public final class ContainerAppsDeleteSamples { /** Samples for ContainerApps GetAuthToken. */ public final class ContainerAppsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_GetAuthToken.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_GetAuthToken.json */ /** * Sample code: Get Container App Auth Token. @@ -1239,7 +1613,7 @@ public final class ContainerAppsGetAuthTokenSamples { /** Samples for ContainerApps GetByResourceGroup. */ public final class ContainerAppsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -1260,7 +1634,7 @@ public final class ContainerAppsGetByResourceGroupSamples { /** Samples for ContainerApps List. */ public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_ListBySubscription.json */ /** * Sample code: List Container Apps by subscription. @@ -1280,7 +1654,7 @@ public final class ContainerAppsListSamples { /** Samples for ContainerApps ListByResourceGroup. */ public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_ListByResourceGroup.json */ /** * Sample code: List Container Apps by resource group. @@ -1300,7 +1674,7 @@ public final class ContainerAppsListByResourceGroupSamples { /** Samples for ContainerApps ListCustomHostnameAnalysis. */ public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListCustomHostNameAnalysis.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json */ /** * Sample code: Analyze Custom Hostname. @@ -1322,7 +1696,7 @@ public final class ContainerAppsListCustomHostnameAnalysisSamples { /** Samples for ContainerApps ListSecrets. */ public final class ContainerAppsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -1342,7 +1716,7 @@ public final class ContainerAppsListSecretsSamples { /** Samples for ContainerApps Start. */ public final class ContainerAppsStartSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Start.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_Start.json */ /** * Sample code: Start Container App. @@ -1361,7 +1735,7 @@ public final class ContainerAppsStartSamples { /** Samples for ContainerApps Stop. */ public final class ContainerAppsStopSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Stop.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_Stop.json */ /** * Sample code: Stop Container App. @@ -1410,7 +1784,7 @@ import java.util.Map; /** Samples for ContainerApps Update. */ public final class ContainerAppsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_Patch.json */ /** * Sample code: Patch Container App. @@ -1553,6 +1927,7 @@ public final class ContainerAppsUpdateSamples { ```java import com.azure.resourcemanager.appcontainers.models.AppRegistration; import com.azure.resourcemanager.appcontainers.models.AuthPlatform; +import com.azure.resourcemanager.appcontainers.models.EncryptionSettings; import com.azure.resourcemanager.appcontainers.models.Facebook; import com.azure.resourcemanager.appcontainers.models.GlobalValidation; import com.azure.resourcemanager.appcontainers.models.IdentityProviders; @@ -1561,7 +1936,7 @@ import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActio /** Samples for ContainerAppsAuthConfigs CreateOrUpdate. */ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/AuthConfigs_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App AuthConfig. @@ -1585,6 +1960,10 @@ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { new AppRegistration() .withAppId("123") .withAppSecretSettingName("fakeTokenPlaceholder")))) + .withEncryptionSettings( + new EncryptionSettings() + .withContainerAppAuthEncryptionSecretName("fakeTokenPlaceholder") + .withContainerAppAuthSigningSecretName("fakeTokenPlaceholder")) .create(); } } @@ -1596,7 +1975,7 @@ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /** Samples for ContainerAppsAuthConfigs Delete. */ public final class ContainerAppsAuthConfigsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/AuthConfigs_Delete.json */ /** * Sample code: Delete Container App AuthConfig. @@ -1618,7 +1997,7 @@ public final class ContainerAppsAuthConfigsDeleteSamples { /** Samples for ContainerAppsAuthConfigs Get. */ public final class ContainerAppsAuthConfigsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/AuthConfigs_Get.json */ /** * Sample code: Get Container App's AuthConfig. @@ -1640,7 +2019,7 @@ public final class ContainerAppsAuthConfigsGetSamples { /** Samples for ContainerAppsAuthConfigs ListByContainerApp. */ public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/AuthConfigs_ListByContainer.json */ /** * Sample code: List Auth Configs by Container Apps. @@ -1662,7 +2041,7 @@ public final class ContainerAppsAuthConfigsListByContainerAppSamples { /** Samples for ContainerAppsDiagnostics GetDetector. */ public final class ContainerAppsDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerAppsDiagnostics_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerAppsDiagnostics_Get.json */ /** * Sample code: Get Container App's diagnostics info. @@ -1688,7 +2067,7 @@ public final class ContainerAppsDiagnosticsGetDetectorSamples { /** Samples for ContainerAppsDiagnostics GetRevision. */ public final class ContainerAppsDiagnosticsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. @@ -1711,7 +2090,7 @@ public final class ContainerAppsDiagnosticsGetRevisionSamples { /** Samples for ContainerAppsDiagnostics GetRoot. */ public final class ContainerAppsDiagnosticsGetRootSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -1732,7 +2111,7 @@ public final class ContainerAppsDiagnosticsGetRootSamples { /** Samples for ContainerAppsDiagnostics ListDetectors. */ public final class ContainerAppsDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerAppsDiagnostics_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerAppsDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostics for a given Container App. @@ -1754,7 +2133,7 @@ public final class ContainerAppsDiagnosticsListDetectorsSamples { /** Samples for ContainerAppsDiagnostics ListRevisions. */ public final class ContainerAppsDiagnosticsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. @@ -1776,7 +2155,7 @@ public final class ContainerAppsDiagnosticsListRevisionsSamples { /** Samples for ContainerAppsRevisionReplicas GetReplica. */ public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Replicas_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Replicas_Get.json */ /** * Sample code: Get Container App's revision replica. @@ -1803,7 +2182,7 @@ public final class ContainerAppsRevisionReplicasGetReplicaSamples { /** Samples for ContainerAppsRevisionReplicas ListReplicas. */ public final class ContainerAppsRevisionReplicasListReplicasSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Replicas_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Replicas_List.json */ /** * Sample code: List Container App's replicas. @@ -1825,7 +2204,7 @@ public final class ContainerAppsRevisionReplicasListReplicasSamples { /** Samples for ContainerAppsRevisions ActivateRevision. */ public final class ContainerAppsRevisionsActivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Activate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Revisions_Activate.json */ /** * Sample code: Activate Container App's revision. @@ -1848,7 +2227,7 @@ public final class ContainerAppsRevisionsActivateRevisionSamples { /** Samples for ContainerAppsRevisions DeactivateRevision. */ public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Deactivate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Revisions_Deactivate.json */ /** * Sample code: Deactivate Container App's revision. @@ -1871,7 +2250,7 @@ public final class ContainerAppsRevisionsDeactivateRevisionSamples { /** Samples for ContainerAppsRevisions GetRevision. */ public final class ContainerAppsRevisionsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. @@ -1894,7 +2273,7 @@ public final class ContainerAppsRevisionsGetRevisionSamples { /** Samples for ContainerAppsRevisions ListRevisions. */ public final class ContainerAppsRevisionsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. @@ -1916,7 +2295,7 @@ public final class ContainerAppsRevisionsListRevisionsSamples { /** Samples for ContainerAppsRevisions RestartRevision. */ public final class ContainerAppsRevisionsRestartRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Restart.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Revisions_Restart.json */ /** * Sample code: Restart Container App's revision. @@ -1943,7 +2322,7 @@ import com.azure.resourcemanager.appcontainers.models.RegistryInfo; /** Samples for ContainerAppsSourceControls CreateOrUpdate. */ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/SourceControls_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App SourceControl. @@ -1985,7 +2364,7 @@ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /** Samples for ContainerAppsSourceControls Delete. */ public final class ContainerAppsSourceControlsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/SourceControls_Delete.json */ /** * Sample code: Delete Container App SourceControl. @@ -2007,7 +2386,7 @@ public final class ContainerAppsSourceControlsDeleteSamples { /** Samples for ContainerAppsSourceControls Get. */ public final class ContainerAppsSourceControlsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/SourceControls_Get.json */ /** * Sample code: Get Container App's SourceControl. @@ -2029,7 +2408,7 @@ public final class ContainerAppsSourceControlsGetSamples { /** Samples for ContainerAppsSourceControls ListByContainerApp. */ public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/SourceControls_ListByContainer.json */ /** * Sample code: List App's Source Controls. @@ -2048,14 +2427,16 @@ public final class ContainerAppsSourceControlsListByContainerAppSamples { ```java import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; +import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; +import com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata; import com.azure.resourcemanager.appcontainers.models.Secret; import java.util.Arrays; /** Samples for DaprComponents CreateOrUpdate. */ public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_CreateOrUpdate_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json */ /** * Sample code: Create or update dapr component with secrets. @@ -2083,12 +2464,23 @@ public final class DaprComponentsCreateOrUpdateSamples { new DaprMetadata().withName("database").withValue("itemsDB"), new DaprMetadata().withName("collection").withValue("items"), new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")), + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .withServiceComponentBind( + Arrays + .asList( + new DaprComponentServiceBinding() + .withName("statestore") + .withServiceId( + "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") + .withMetadata( + new DaprServiceBindMetadata() + .withName("daprcomponentBind") + .withValue("redis-bind")))), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json */ /** * Sample code: Create or update dapr component with secret store component. @@ -2116,7 +2508,18 @@ public final class DaprComponentsCreateOrUpdateSamples { new DaprMetadata().withName("database").withValue("itemsDB"), new DaprMetadata().withName("collection").withValue("items"), new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")), + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .withServiceComponentBind( + Arrays + .asList( + new DaprComponentServiceBinding() + .withName("statestore") + .withServiceId( + "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") + .withMetadata( + new DaprServiceBindMetadata() + .withName("daprcomponentBind") + .withValue("redis-bind")))), com.azure.core.util.Context.NONE); } } @@ -2128,7 +2531,7 @@ public final class DaprComponentsCreateOrUpdateSamples { /** Samples for DaprComponents Delete. */ public final class DaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_Delete.json */ /** * Sample code: Delete dapr component. @@ -2149,7 +2552,7 @@ public final class DaprComponentsDeleteSamples { /** Samples for DaprComponents Get. */ public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_Get_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json */ /** * Sample code: Get Dapr Component with secret store component. @@ -2164,7 +2567,7 @@ public final class DaprComponentsGetSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_Get_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_Get_Secrets.json */ /** * Sample code: Get Dapr Component with secrets. @@ -2186,7 +2589,7 @@ public final class DaprComponentsGetSamples { /** Samples for DaprComponents List. */ public final class DaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_List.json */ /** * Sample code: List Dapr Components. @@ -2205,7 +2608,7 @@ public final class DaprComponentsListSamples { /** Samples for DaprComponents ListSecrets. */ public final class DaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -2246,7 +2649,7 @@ import java.util.Arrays; /** Samples for Jobs CreateOrUpdate. */ public final class JobsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_CreateorUpdate_EventTrigger.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_CreateorUpdate_EventTrigger.json */ /** * Sample code: Create or Update Container Apps Job With Event Driven Trigger. @@ -2310,7 +2713,7 @@ public final class JobsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_CreateorUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_CreateorUpdate.json */ /** * Sample code: Create or Update Container Apps Job. @@ -2378,7 +2781,7 @@ public final class JobsCreateOrUpdateSamples { /** Samples for Jobs Delete. */ public final class JobsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Delete.json */ /** * Sample code: Delete Container Apps Job. @@ -2397,7 +2800,7 @@ public final class JobsDeleteSamples { /** Samples for Jobs GetByResourceGroup. */ public final class JobsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Get.json */ /** * Sample code: Get Container Apps Job. @@ -2416,7 +2819,7 @@ public final class JobsGetByResourceGroupSamples { /** Samples for Jobs List. */ public final class JobsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Jobs_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Jobs_ListBySubscription.json */ /** * Sample code: List Container Apps Jobs by subscription. @@ -2436,7 +2839,7 @@ public final class JobsListSamples { /** Samples for Jobs ListByResourceGroup. */ public final class JobsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Jobs_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Jobs_ListByResourceGroup.json */ /** * Sample code: List Container Apps Jobs by resource group. @@ -2456,7 +2859,7 @@ public final class JobsListByResourceGroupSamples { /** Samples for Jobs ListSecrets. */ public final class JobsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_ListSecrets.json */ /** * Sample code: List Container Apps Job Secrets. @@ -2481,7 +2884,7 @@ import java.util.Arrays; /** Samples for Jobs Start. */ public final class JobsStartSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Start.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Start.json */ /** * Sample code: Run a Container Apps Job. @@ -2522,7 +2925,7 @@ public final class JobsStartSamples { /** Samples for Jobs StopExecution. */ public final class JobsStopExecutionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Stop_Execution.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Stop_Execution.json */ /** * Sample code: Terminate a Container Apps Job. @@ -2542,7 +2945,7 @@ public final class JobsStopExecutionSamples { /** Samples for Jobs StopMultipleExecutions. */ public final class JobsStopMultipleExecutionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Stop_Multiple.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Stop_Multiple.json */ /** * Sample code: Terminate Multiple Container Apps Job. @@ -2577,7 +2980,7 @@ import java.util.Arrays; /** Samples for Jobs Update. */ public final class JobsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Patch.json */ /** * Sample code: Patch Container Apps Job. @@ -2648,7 +3051,7 @@ public final class JobsUpdateSamples { /** Samples for JobsExecutions List. */ public final class JobsExecutionsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Executions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Executions_Get.json */ /** * Sample code: Get a Container Apps Job Executions. @@ -2671,7 +3074,7 @@ import com.azure.resourcemanager.appcontainers.models.ManagedCertificateProperti /** Samples for ManagedCertificates CreateOrUpdate. */ public final class ManagedCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedCertificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -2700,7 +3103,7 @@ public final class ManagedCertificatesCreateOrUpdateSamples { /** Samples for ManagedCertificates Delete. */ public final class ManagedCertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedCertificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -2722,7 +3125,7 @@ public final class ManagedCertificatesDeleteSamples { /** Samples for ManagedCertificates Get. */ public final class ManagedCertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedCertificate_Get.json */ /** * Sample code: Get Certificate. @@ -2744,7 +3147,7 @@ public final class ManagedCertificatesGetSamples { /** Samples for ManagedCertificates List. */ public final class ManagedCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedCertificates_ListByManagedEnvironment.json */ /** * Sample code: List Managed Certificates by Managed Environment. @@ -2768,7 +3171,7 @@ import java.util.Map; /** Samples for ManagedCertificates Update. */ public final class ManagedCertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedCertificates_Patch.json */ /** * Sample code: Patch Managed Certificate. @@ -2806,7 +3209,7 @@ public final class ManagedCertificatesUpdateSamples { /** Samples for ManagedEnvironmentDiagnostics GetDetector. */ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentDiagnostics_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json */ /** * Sample code: Get diagnostic data for a managed environments. @@ -2832,7 +3235,7 @@ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { /** Samples for ManagedEnvironmentDiagnostics ListDetectors. */ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentDiagnostics_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostic data for a managed environments. @@ -2848,14 +3251,41 @@ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { } ``` +### ManagedEnvironmentUsages_List + +```java +/** Samples for ManagedEnvironmentUsages List. */ +public final class ManagedEnvironmentUsagesListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentUsages_List.json + */ + /** + * Sample code: List managed environment usages. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listManagedEnvironmentUsages( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironmentUsages().list("examplerg", "jlaw-demo1", com.azure.core.util.Context.NONE); + } +} +``` + ### ManagedEnvironments_CreateOrUpdate ```java +import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; +import com.azure.resourcemanager.appcontainers.models.DataDogConfiguration; +import com.azure.resourcemanager.appcontainers.models.DestinationsConfiguration; import com.azure.resourcemanager.appcontainers.models.LogAnalyticsConfiguration; +import com.azure.resourcemanager.appcontainers.models.LogsConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; +import com.azure.resourcemanager.appcontainers.models.MetricsConfiguration; import com.azure.resourcemanager.appcontainers.models.Mtls; +import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; +import com.azure.resourcemanager.appcontainers.models.TracesConfiguration; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import java.util.Arrays; @@ -2863,7 +3293,7 @@ import java.util.Arrays; /** Samples for ManagedEnvironments CreateOrUpdate. */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json */ /** * Sample code: Create environment with custom infrastructureResourceGroup. @@ -2917,7 +3347,7 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create environments. @@ -2940,6 +3370,19 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { new AppLogsConfiguration() .withLogAnalyticsConfiguration( new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("fakeTokenPlaceholder"))) + .withAppInsightsConfiguration( + new AppInsightsConfiguration() + .withConnectionString( + "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/")) + .withOpenTelemetryConfiguration( + new OpenTelemetryConfiguration() + .withDestinationsConfiguration( + new DestinationsConfiguration() + .withDataDogConfiguration( + new DataDogConfiguration().withSite("string").withKey("fakeTokenPlaceholder"))) + .withTracesConfiguration(new TracesConfiguration().withDestinations(Arrays.asList("appInsights"))) + .withLogsConfiguration(new LogsConfiguration().withDestinations(Arrays.asList("appInsights"))) + .withMetricsConfiguration(new MetricsConfiguration().withDestinations(Arrays.asList("dataDog")))) .withZoneRedundant(true) .withCustomDomainConfiguration( new CustomDomainConfiguration() @@ -2978,7 +3421,7 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { /** Samples for ManagedEnvironments Delete. */ public final class ManagedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_Delete.json */ /** * Sample code: Delete environment by name. @@ -2998,7 +3441,7 @@ public final class ManagedEnvironmentsDeleteSamples { /** Samples for ManagedEnvironments GetAuthToken. */ public final class ManagedEnvironmentsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_GetAuthToken.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_GetAuthToken.json */ /** * Sample code: Get Managed Environment Auth Token. @@ -3018,7 +3461,7 @@ public final class ManagedEnvironmentsGetAuthTokenSamples { /** Samples for ManagedEnvironments GetByResourceGroup. */ public final class ManagedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -3039,7 +3482,7 @@ public final class ManagedEnvironmentsGetByResourceGroupSamples { /** Samples for ManagedEnvironments List. */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_ListBySubscription.json */ /** * Sample code: List environments by subscription. @@ -3059,7 +3502,7 @@ public final class ManagedEnvironmentsListSamples { /** Samples for ManagedEnvironments ListByResourceGroup. */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. @@ -3079,7 +3522,7 @@ public final class ManagedEnvironmentsListByResourceGroupSamples { /** Samples for ManagedEnvironments ListWorkloadProfileStates. */ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_ListWorkloadProfileStates.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json */ /** * Sample code: List environments by subscription. @@ -3105,7 +3548,7 @@ import java.util.Map; /** Samples for ManagedEnvironments Update. */ public final class ManagedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. @@ -3142,7 +3585,7 @@ public final class ManagedEnvironmentsUpdateSamples { /** Samples for ManagedEnvironmentsDiagnostics GetRoot. */ public final class ManagedEnvironmentsDiagnosticsGetRootSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -3167,7 +3610,7 @@ import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorageP /** Samples for ManagedEnvironmentsStorages CreateOrUpdate. */ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. @@ -3199,7 +3642,7 @@ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /** Samples for ManagedEnvironmentsStorages Delete. */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. @@ -3221,7 +3664,7 @@ public final class ManagedEnvironmentsStoragesDeleteSamples { /** Samples for ManagedEnvironmentsStorages Get. */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. @@ -3243,7 +3686,7 @@ public final class ManagedEnvironmentsStoragesGetSamples { /** Samples for ManagedEnvironmentsStorages List. */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. @@ -3267,7 +3710,7 @@ import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReque /** Samples for Namespaces CheckNameAvailability. */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Certificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -3288,7 +3731,7 @@ public final class NamespacesCheckNameAvailabilitySamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_CheckNameAvailability.json */ /** * Sample code: ContainerApps_CheckNameAvailability. @@ -3314,7 +3757,7 @@ public final class NamespacesCheckNameAvailabilitySamples { /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Operations_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Operations_List.json */ /** * Sample code: List all operations. @@ -3327,13 +3770,132 @@ public final class OperationsListSamples { } ``` +### Patches_Apply + +```java +/** Samples for Patches Apply. */ +public final class PatchesApplySamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Patches_Apply.json + */ + /** + * Sample code: Patches_Apply_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchesApply0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.patches().apply("rg", "testBuilder", "testPatch-25fe4b", com.azure.core.util.Context.NONE); + } +} +``` + +### Patches_Delete + +```java +/** Samples for Patches Delete. */ +public final class PatchesDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Patches_Delete.json + */ + /** + * Sample code: Patches_Delete_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchesDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.patches().delete("rg", "testBuilder", "testPatch-25fe4b", com.azure.core.util.Context.NONE); + } +} +``` + +### Patches_Get + +```java +/** Samples for Patches Get. */ +public final class PatchesGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Patches_Get.json + */ + /** + * Sample code: Patches_Get_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchesGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.patches().getWithResponse("rg", "testBuilder", "testPatch-25fe4b", com.azure.core.util.Context.NONE); + } +} +``` + +### Patches_ListByBuilderResource + +```java +/** Samples for Patches ListByBuilderResource. */ +public final class PatchesListByBuilderResourceSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Patches_ListByBuilderResource.json + */ + /** + * Sample code: Patches_ListByBuilderResource_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchesListByBuilderResource0( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .patches() + .listByBuilderResourceWithResponse("rg", "testBuilder", null, com.azure.core.util.Context.NONE); + } +} +``` + +### Patches_SkipConfigure + +```java +/** Samples for Patches SkipConfigure. */ +public final class PatchesSkipConfigureSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Patches_Skip_Configure.json + */ + /** + * Sample code: Patches_Skip_Configure_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchesSkipConfigure0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .patches() + .skipConfigure("rg", "testBuilder", "testPatch-25fe4b", true, com.azure.core.util.Context.NONE); + } +} +``` + +### ResourceProvider_GetCustomDomainVerificationId + +```java +/** Samples for ResourceProvider GetCustomDomainVerificationId. */ +public final class ResourceProviderGetCustomDomainVerificationIdSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Subscriptions_GetCustomDomainVerificationId.json + */ + /** + * Sample code: List all operations. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listAllOperations(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.resourceProviders().getCustomDomainVerificationIdWithResponse(com.azure.core.util.Context.NONE); + } +} +``` + ### ResourceProvider_JobExecution ```java /** Samples for ResourceProvider JobExecution. */ public final class ResourceProviderJobExecutionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Execution_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Execution_Get.json */ /** * Sample code: Get a single Job Execution. @@ -3348,3 +3910,22 @@ public final class ResourceProviderJobExecutionSamples { } ``` +### Usages_List + +```java +/** Samples for Usages List. */ +public final class UsagesListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Usages_List.json + */ + /** + * Sample code: List usages. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listUsages(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.usages().list("westus", com.azure.core.util.Context.NONE); + } +} +``` + diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml b/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml index 60da16f61ce05..26295a140a36a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for ContainerAppsApi Management - This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2023-05. + This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-preview-2023-08. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java index a9b1dd45c81e4..495fc8a0dac9b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java @@ -26,6 +26,8 @@ import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsApiClient; import com.azure.resourcemanager.appcontainers.implementation.AvailableWorkloadProfilesImpl; import com.azure.resourcemanager.appcontainers.implementation.BillingMetersImpl; +import com.azure.resourcemanager.appcontainers.implementation.BuildersImpl; +import com.azure.resourcemanager.appcontainers.implementation.BuildsImpl; import com.azure.resourcemanager.appcontainers.implementation.CertificatesImpl; import com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsCertificatesImpl; import com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsDaprComponentsImpl; @@ -43,14 +45,19 @@ import com.azure.resourcemanager.appcontainers.implementation.JobsImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedCertificatesImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentDiagnosticsImpl; +import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentUsagesImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsDiagnosticsImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsStoragesImpl; import com.azure.resourcemanager.appcontainers.implementation.NamespacesImpl; import com.azure.resourcemanager.appcontainers.implementation.OperationsImpl; +import com.azure.resourcemanager.appcontainers.implementation.PatchesImpl; import com.azure.resourcemanager.appcontainers.implementation.ResourceProvidersImpl; +import com.azure.resourcemanager.appcontainers.implementation.UsagesImpl; import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfiles; import com.azure.resourcemanager.appcontainers.models.BillingMeters; +import com.azure.resourcemanager.appcontainers.models.Builders; +import com.azure.resourcemanager.appcontainers.models.Builds; import com.azure.resourcemanager.appcontainers.models.Certificates; import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironments; import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsCertificates; @@ -67,12 +74,15 @@ import com.azure.resourcemanager.appcontainers.models.JobsExecutions; import com.azure.resourcemanager.appcontainers.models.ManagedCertificates; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentDiagnostics; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentUsages; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironments; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsDiagnostics; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsStorages; import com.azure.resourcemanager.appcontainers.models.Namespaces; import com.azure.resourcemanager.appcontainers.models.Operations; +import com.azure.resourcemanager.appcontainers.models.Patches; import com.azure.resourcemanager.appcontainers.models.ResourceProviders; +import com.azure.resourcemanager.appcontainers.models.Usages; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -88,6 +98,10 @@ public final class ContainerAppsApiManager { private BillingMeters billingMeters; + private Builders builders; + + private Builds builds; + private ConnectedEnvironments connectedEnvironments; private ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates; @@ -128,8 +142,14 @@ public final class ContainerAppsApiManager { private ManagedEnvironmentsStorages managedEnvironmentsStorages; + private Patches patches; + private ContainerAppsSourceControls containerAppsSourceControls; + private Usages usages; + + private ManagedEnvironmentUsages managedEnvironmentUsages; + private final ContainerAppsApiClient clientObject; private ContainerAppsApiManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -295,7 +315,7 @@ public ContainerAppsApiManager authenticate(TokenCredential credential, AzurePro .append("-") .append("com.azure.resourcemanager.appcontainers") .append("/") - .append("1.0.0-beta.6"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -390,6 +410,30 @@ public BillingMeters billingMeters() { return billingMeters; } + /** + * Gets the resource collection API of Builders. It manages BuilderResource. + * + * @return Resource collection API of Builders. + */ + public Builders builders() { + if (this.builders == null) { + this.builders = new BuildersImpl(clientObject.getBuilders(), this); + } + return builders; + } + + /** + * Gets the resource collection API of Builds. It manages BuildResource. + * + * @return Resource collection API of Builds. + */ + public Builds builds() { + if (this.builds == null) { + this.builds = new BuildsImpl(clientObject.getBuilds(), this); + } + return builds; + } + /** * Gets the resource collection API of ConnectedEnvironments. It manages ConnectedEnvironment. * @@ -640,6 +684,18 @@ public ManagedEnvironmentsStorages managedEnvironmentsStorages() { return managedEnvironmentsStorages; } + /** + * Gets the resource collection API of Patches. + * + * @return Resource collection API of Patches. + */ + public Patches patches() { + if (this.patches == null) { + this.patches = new PatchesImpl(clientObject.getPatches(), this); + } + return patches; + } + /** * Gets the resource collection API of ContainerAppsSourceControls. It manages SourceControl. * @@ -653,6 +709,31 @@ public ContainerAppsSourceControls containerAppsSourceControls() { return containerAppsSourceControls; } + /** + * Gets the resource collection API of Usages. + * + * @return Resource collection API of Usages. + */ + public Usages usages() { + if (this.usages == null) { + this.usages = new UsagesImpl(clientObject.getUsages(), this); + } + return usages; + } + + /** + * Gets the resource collection API of ManagedEnvironmentUsages. + * + * @return Resource collection API of ManagedEnvironmentUsages. + */ + public ManagedEnvironmentUsages managedEnvironmentUsages() { + if (this.managedEnvironmentUsages == null) { + this.managedEnvironmentUsages = + new ManagedEnvironmentUsagesImpl(clientObject.getManagedEnvironmentUsages(), this); + } + return managedEnvironmentUsages; + } + /** * Gets wrapped service client ContainerAppsApiClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildersClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildersClient.java new file mode 100644 index 0000000000000..51e1effe89fae --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildersClient.java @@ -0,0 +1,286 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; +import com.azure.resourcemanager.appcontainers.models.BuilderResourceUpdate; + +/** An instance of this class provides access to all the operations defined in BuildersClient. */ +public interface BuildersClient { + /** + * List BuilderResource resources by subscription ID. + * + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List BuilderResource resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * List BuilderResource resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List BuilderResource resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse( + String resourceGroupName, String builderName, Context context); + + /** + * Get a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BuilderResourceInner getByResourceGroup(String resourceGroupName, String builderName); + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BuilderResourceInner> beginCreateOrUpdate( + String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope); + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BuilderResourceInner> beginCreateOrUpdate( + String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope, Context context); + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BuilderResourceInner createOrUpdate( + String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope); + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BuilderResourceInner createOrUpdate( + String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope, Context context); + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BuilderResourceInner> beginUpdate( + String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope); + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BuilderResourceInner> beginUpdate( + String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope, Context context); + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BuilderResourceInner update(String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope); + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BuilderResourceInner update( + String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope, Context context); + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is 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 builderName); + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is 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 builderName, Context context); + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 builderName); + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 builderName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsClient.java new file mode 100644 index 0000000000000..52a0e454015e8 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsClient.java @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; + +/** An instance of this class provides access to all the operations defined in BuildsClient. */ +public interface BuildsClient { + /** + * List BuildResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByBuilderResource(String resourceGroupName, String builderName); + + /** + * List BuildResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByBuilderResource( + String resourceGroupName, String builderName, Context context); + + /** + * Get a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String builderName, String buildName, Context context); + + /** + * Get a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BuildResourceInner get(String resourceGroupName, String builderName, String buildName); + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information pertaining to an individual build. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BuildResourceInner> beginCreateOrUpdate( + String resourceGroupName, String builderName, String buildName, BuildResourceInner buildEnvelope); + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information pertaining to an individual build. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BuildResourceInner> beginCreateOrUpdate( + String resourceGroupName, + String builderName, + String buildName, + BuildResourceInner buildEnvelope, + Context context); + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information pertaining to an individual build. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BuildResourceInner createOrUpdate( + String resourceGroupName, String builderName, String buildName, BuildResourceInner buildEnvelope); + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information pertaining to an individual build. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BuildResourceInner createOrUpdate( + String resourceGroupName, + String builderName, + String buildName, + BuildResourceInner buildEnvelope, + Context context); + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is 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 builderName, String buildName); + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is 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 builderName, String buildName, Context context); + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 builderName, String buildName); + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 builderName, String buildName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsApiClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsApiClient.java index 03bef3cfa47b8..5e8ee149bbf0a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsApiClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsApiClient.java @@ -65,6 +65,20 @@ public interface ContainerAppsApiClient { */ BillingMetersClient getBillingMeters(); + /** + * Gets the BuildersClient object to access its operations. + * + * @return the BuildersClient object. + */ + BuildersClient getBuilders(); + + /** + * Gets the BuildsClient object to access its operations. + * + * @return the BuildsClient object. + */ + BuildsClient getBuilds(); + /** * Gets the ConnectedEnvironmentsClient object to access its operations. * @@ -205,10 +219,31 @@ public interface ContainerAppsApiClient { */ ManagedEnvironmentsStoragesClient getManagedEnvironmentsStorages(); + /** + * Gets the PatchesClient object to access its operations. + * + * @return the PatchesClient object. + */ + PatchesClient getPatches(); + /** * Gets the ContainerAppsSourceControlsClient object to access its operations. * * @return the ContainerAppsSourceControlsClient object. */ ContainerAppsSourceControlsClient getContainerAppsSourceControls(); + + /** + * Gets the UsagesClient object to access its operations. + * + * @return the UsagesClient object. + */ + UsagesClient getUsages(); + + /** + * Gets the ManagedEnvironmentUsagesClient object to access its operations. + * + * @return the ManagedEnvironmentUsagesClient object. + */ + ManagedEnvironmentUsagesClient getManagedEnvironmentUsages(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentUsagesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentUsagesClient.java new file mode 100644 index 0000000000000..87f185fd1c39f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentUsagesClient.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; + +/** An instance of this class provides access to all the operations defined in ManagedEnvironmentUsagesClient. */ +public interface ManagedEnvironmentUsagesClient { + /** + * Gets the current usage information as well as the limits for environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current usage information as well as the limits for environment as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String environmentName); + + /** + * Gets the current usage information as well as the limits for environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current usage information as well as the limits for environment as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String environmentName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/PatchesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/PatchesClient.java new file mode 100644 index 0000000000000..06ff15b679b50 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/PatchesClient.java @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.models.PatchCollectionInner; +import com.azure.resourcemanager.appcontainers.fluent.models.PatchResourceInner; + +/** An instance of this class provides access to all the operations defined in PatchesClient. */ +public interface PatchesClient { + /** + * List PatchResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param filter The filter to apply on the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App SourceToCloud patch collection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listByBuilderResourceWithResponse( + String resourceGroupName, String builderName, String filter, Context context); + + /** + * List PatchResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App SourceToCloud patch collection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PatchCollectionInner listByBuilderResource(String resourceGroupName, String builderName); + + /** + * Get details for specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details for specific patch by patch name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse( + String resourceGroupName, String builderName, String patchName, Context context); + + /** + * Get details for specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details for specific patch by patch name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PatchResourceInner get(String resourceGroupName, String builderName, String patchName); + + /** + * Delete specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is 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 builderName, String patchName); + + /** + * Delete specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is 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 builderName, String patchName, Context context); + + /** + * Delete specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 builderName, String patchName); + + /** + * Delete specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 builderName, String patchName, Context context); + + /** + * Configure the patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is 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> beginSkipConfigure( + String resourceGroupName, String builderName, String patchName, boolean patchSkipConfig); + + /** + * Configure the patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is 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> beginSkipConfigure( + String resourceGroupName, String builderName, String patchName, boolean patchSkipConfig, Context context); + + /** + * Configure the patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 skipConfigure(String resourceGroupName, String builderName, String patchName, boolean patchSkipConfig); + + /** + * Configure the patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException 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 skipConfigure( + String resourceGroupName, String builderName, String patchName, boolean patchSkipConfig, Context context); + + /** + * Apply a PatchResource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of container App Patch. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PatchResourceInner> beginApply( + String resourceGroupName, String builderName, String patchName); + + /** + * Apply a PatchResource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of container App Patch. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PatchResourceInner> beginApply( + String resourceGroupName, String builderName, String patchName, Context context); + + /** + * Apply a PatchResource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Patch. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PatchResourceInner apply(String resourceGroupName, String builderName, String patchName); + + /** + * Apply a PatchResource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Patch. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PatchResourceInner apply(String resourceGroupName, String builderName, String patchName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ResourceProvidersClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ResourceProvidersClient.java index 9b59268f6d084..01f24b00b3efc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ResourceProvidersClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ResourceProvidersClient.java @@ -43,4 +43,28 @@ Response jobExecutionWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) JobExecutionInner jobExecution(String resourceGroupName, String jobName, String jobExecutionName); + + /** + * Get the verification id of a subscription used for verifying custom domains. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the verification id of a subscription used for verifying custom domains along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getCustomDomainVerificationIdWithResponse(Context context); + + /** + * Get the verification id of a subscription used for verifying custom domains. + * + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the verification id of a subscription used for verifying custom domains. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + String getCustomDomainVerificationId(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/UsagesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/UsagesClient.java new file mode 100644 index 0000000000000..fc76f574171f6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/UsagesClient.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; + +/** An instance of this class provides access to all the operations defined in UsagesClient. */ +public interface UsagesClient { + /** + * Gets, for the specified location, the current resource usage information as well as the limits under the + * subscription. + * + * @param location The location for which resource usage is queried. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location); + + /** + * Gets, for the specified location, the current resource usage information as well as the limits under the + * subscription. + * + * @param location The location for which resource usage is queried. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigInner.java index 7a3c141ee7e55..9dd895de50a70 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigInner.java @@ -8,6 +8,7 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.AuthPlatform; +import com.azure.resourcemanager.appcontainers.models.EncryptionSettings; import com.azure.resourcemanager.appcontainers.models.GlobalValidation; import com.azure.resourcemanager.appcontainers.models.HttpSettings; import com.azure.resourcemanager.appcontainers.models.IdentityProviders; @@ -176,6 +177,31 @@ public AuthConfigInner withHttpSettings(HttpSettings httpSettings) { return this; } + /** + * Get the encryptionSettings property: The configuration settings of the secrets references of encryption key and + * signing key for ContainerApp Service Authentication/Authorization. + * + * @return the encryptionSettings value. + */ + public EncryptionSettings encryptionSettings() { + return this.innerProperties() == null ? null : this.innerProperties().encryptionSettings(); + } + + /** + * Set the encryptionSettings property: The configuration settings of the secrets references of encryption key and + * signing key for ContainerApp Service Authentication/Authorization. + * + * @param encryptionSettings the encryptionSettings value to set. + * @return the AuthConfigInner object itself. + */ + public AuthConfigInner withEncryptionSettings(EncryptionSettings encryptionSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new AuthConfigProperties(); + } + this.innerProperties().withEncryptionSettings(encryptionSettings); + return this; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigProperties.java index 9562abcf1c1de..d1483c9f407d3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigProperties.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.appcontainers.models.AuthPlatform; +import com.azure.resourcemanager.appcontainers.models.EncryptionSettings; import com.azure.resourcemanager.appcontainers.models.GlobalValidation; import com.azure.resourcemanager.appcontainers.models.HttpSettings; import com.azure.resourcemanager.appcontainers.models.IdentityProviders; @@ -48,6 +49,13 @@ public final class AuthConfigProperties { @JsonProperty(value = "httpSettings") private HttpSettings httpSettings; + /* + * The configuration settings of the secrets references of encryption key and signing key for ContainerApp Service + * Authentication/Authorization. + */ + @JsonProperty(value = "encryptionSettings") + private EncryptionSettings encryptionSettings; + /** Creates an instance of AuthConfigProperties class. */ public AuthConfigProperties() { } @@ -162,6 +170,28 @@ public AuthConfigProperties withHttpSettings(HttpSettings httpSettings) { return this; } + /** + * Get the encryptionSettings property: The configuration settings of the secrets references of encryption key and + * signing key for ContainerApp Service Authentication/Authorization. + * + * @return the encryptionSettings value. + */ + public EncryptionSettings encryptionSettings() { + return this.encryptionSettings; + } + + /** + * Set the encryptionSettings property: The configuration settings of the secrets references of encryption key and + * signing key for ContainerApp Service Authentication/Authorization. + * + * @param encryptionSettings the encryptionSettings value to set. + * @return the AuthConfigProperties object itself. + */ + public AuthConfigProperties withEncryptionSettings(EncryptionSettings encryptionSettings) { + this.encryptionSettings = encryptionSettings; + return this; + } + /** * Validates the instance. * @@ -183,5 +213,8 @@ public void validate() { if (httpSettings() != null) { httpSettings().validate(); } + if (encryptionSettings() != null) { + encryptionSettings().validate(); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AvailableWorkloadProfileInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AvailableWorkloadProfileInner.java index ad62df22ee74b..29bba9a507794 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AvailableWorkloadProfileInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AvailableWorkloadProfileInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -24,6 +25,12 @@ public final class AvailableWorkloadProfileInner extends ProxyResource { @JsonProperty(value = "properties") private AvailableWorkloadProfileProperties properties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of AvailableWorkloadProfileInner class. */ public AvailableWorkloadProfileInner() { } @@ -68,6 +75,15 @@ public AvailableWorkloadProfileInner withProperties(AvailableWorkloadProfileProp 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; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildProperties.java new file mode 100644 index 0000000000000..d062390d5baac --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildProperties.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.models.BuildConfiguration; +import com.azure.resourcemanager.appcontainers.models.BuildProvisioningState; +import com.azure.resourcemanager.appcontainers.models.BuildStatus; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The build properties. */ +@Fluent +public final class BuildProperties { + /* + * Build provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private BuildProvisioningState provisioningState; + + /* + * Status of the build once it has been provisioned. + */ + @JsonProperty(value = "buildStatus", access = JsonProperty.Access.WRITE_ONLY) + private BuildStatus buildStatus; + + /* + * Container registry that the final image will be uploaded to. + */ + @JsonProperty(value = "destinationContainerRegistry") + private ContainerRegistryWithCustomImage destinationContainerRegistry; + + /* + * Configuration of the build. + */ + @JsonProperty(value = "configuration") + private BuildConfiguration configuration; + + /* + * Endpoint to which the source code should be uploaded. + */ + @JsonProperty(value = "uploadEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String uploadEndpoint; + + /** Creates an instance of BuildProperties class. */ + public BuildProperties() { + } + + /** + * Get the provisioningState property: Build provisioning state. + * + * @return the provisioningState value. + */ + public BuildProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the buildStatus property: Status of the build once it has been provisioned. + * + * @return the buildStatus value. + */ + public BuildStatus buildStatus() { + return this.buildStatus; + } + + /** + * Get the destinationContainerRegistry property: Container registry that the final image will be uploaded to. + * + * @return the destinationContainerRegistry value. + */ + public ContainerRegistryWithCustomImage destinationContainerRegistry() { + return this.destinationContainerRegistry; + } + + /** + * Set the destinationContainerRegistry property: Container registry that the final image will be uploaded to. + * + * @param destinationContainerRegistry the destinationContainerRegistry value to set. + * @return the BuildProperties object itself. + */ + public BuildProperties withDestinationContainerRegistry( + ContainerRegistryWithCustomImage destinationContainerRegistry) { + this.destinationContainerRegistry = destinationContainerRegistry; + return this; + } + + /** + * Get the configuration property: Configuration of the build. + * + * @return the configuration value. + */ + public BuildConfiguration configuration() { + return this.configuration; + } + + /** + * Set the configuration property: Configuration of the build. + * + * @param configuration the configuration value to set. + * @return the BuildProperties object itself. + */ + public BuildProperties withConfiguration(BuildConfiguration configuration) { + this.configuration = configuration; + return this; + } + + /** + * Get the uploadEndpoint property: Endpoint to which the source code should be uploaded. + * + * @return the uploadEndpoint value. + */ + public String uploadEndpoint() { + return this.uploadEndpoint; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (destinationContainerRegistry() != null) { + destinationContainerRegistry().validate(); + } + if (configuration() != null) { + configuration().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildResourceInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildResourceInner.java new file mode 100644 index 0000000000000..174ab34247cd1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildResourceInner.java @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.BuildConfiguration; +import com.azure.resourcemanager.appcontainers.models.BuildProvisioningState; +import com.azure.resourcemanager.appcontainers.models.BuildStatus; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Information pertaining to an individual build. */ +@Fluent +public final class BuildResourceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private BuildProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of BuildResourceInner class. */ + public BuildResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private BuildProperties 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 provisioningState property: Build provisioning state. + * + * @return the provisioningState value. + */ + public BuildProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the buildStatus property: Status of the build once it has been provisioned. + * + * @return the buildStatus value. + */ + public BuildStatus buildStatus() { + return this.innerProperties() == null ? null : this.innerProperties().buildStatus(); + } + + /** + * Get the destinationContainerRegistry property: Container registry that the final image will be uploaded to. + * + * @return the destinationContainerRegistry value. + */ + public ContainerRegistryWithCustomImage destinationContainerRegistry() { + return this.innerProperties() == null ? null : this.innerProperties().destinationContainerRegistry(); + } + + /** + * Set the destinationContainerRegistry property: Container registry that the final image will be uploaded to. + * + * @param destinationContainerRegistry the destinationContainerRegistry value to set. + * @return the BuildResourceInner object itself. + */ + public BuildResourceInner withDestinationContainerRegistry( + ContainerRegistryWithCustomImage destinationContainerRegistry) { + if (this.innerProperties() == null) { + this.innerProperties = new BuildProperties(); + } + this.innerProperties().withDestinationContainerRegistry(destinationContainerRegistry); + return this; + } + + /** + * Get the configuration property: Configuration of the build. + * + * @return the configuration value. + */ + public BuildConfiguration configuration() { + return this.innerProperties() == null ? null : this.innerProperties().configuration(); + } + + /** + * Set the configuration property: Configuration of the build. + * + * @param configuration the configuration value to set. + * @return the BuildResourceInner object itself. + */ + public BuildResourceInner withConfiguration(BuildConfiguration configuration) { + if (this.innerProperties() == null) { + this.innerProperties = new BuildProperties(); + } + this.innerProperties().withConfiguration(configuration); + return this; + } + + /** + * Get the uploadEndpoint property: Endpoint to which the source code should be uploaded. + * + * @return the uploadEndpoint value. + */ + public String uploadEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().uploadEndpoint(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderProperties.java new file mode 100644 index 0000000000000..922986ad02e60 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderProperties.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.models.BuilderProvisioningState; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The builder properties. */ +@Fluent +public final class BuilderProperties { + /* + * Provisioning state of a builder resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private BuilderProvisioningState provisioningState; + + /* + * Resource ID of the container apps environment that the builder is associated with. + */ + @JsonProperty(value = "environmentId", required = true) + private String environmentId; + + /* + * List of mappings of container registries and the managed identity used to connect to it. + */ + @JsonProperty(value = "containerRegistries") + private List containerRegistries; + + /** Creates an instance of BuilderProperties class. */ + public BuilderProperties() { + } + + /** + * Get the provisioningState property: Provisioning state of a builder resource. + * + * @return the provisioningState value. + */ + public BuilderProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the environmentId property: Resource ID of the container apps environment that the builder is associated + * with. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.environmentId; + } + + /** + * Set the environmentId property: Resource ID of the container apps environment that the builder is associated + * with. + * + * @param environmentId the environmentId value to set. + * @return the BuilderProperties object itself. + */ + public BuilderProperties withEnvironmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Get the containerRegistries property: List of mappings of container registries and the managed identity used to + * connect to it. + * + * @return the containerRegistries value. + */ + public List containerRegistries() { + return this.containerRegistries; + } + + /** + * Set the containerRegistries property: List of mappings of container registries and the managed identity used to + * connect to it. + * + * @param containerRegistries the containerRegistries value to set. + * @return the BuilderProperties object itself. + */ + public BuilderProperties withContainerRegistries(List containerRegistries) { + this.containerRegistries = containerRegistries; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (environmentId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property environmentId in model BuilderProperties")); + } + if (containerRegistries() != null) { + containerRegistries().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BuilderProperties.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceInner.java new file mode 100644 index 0000000000000..23a55a24e9104 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceInner.java @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.BuilderProvisioningState; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Information about the SourceToCloud builder resource. */ +@Fluent +public final class BuilderResourceInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private BuilderProperties innerProperties; + + /* + * The managed service identities assigned to this resource. + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of BuilderResourceInner class. */ + public BuilderResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private BuilderProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the BuilderResourceInner object itself. + */ + public BuilderResourceInner withIdentity(ManagedServiceIdentity 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; + } + + /** {@inheritDoc} */ + @Override + public BuilderResourceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public BuilderResourceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of a builder resource. + * + * @return the provisioningState value. + */ + public BuilderProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the environmentId property: Resource ID of the container apps environment that the builder is associated + * with. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.innerProperties() == null ? null : this.innerProperties().environmentId(); + } + + /** + * Set the environmentId property: Resource ID of the container apps environment that the builder is associated + * with. + * + * @param environmentId the environmentId value to set. + * @return the BuilderResourceInner object itself. + */ + public BuilderResourceInner withEnvironmentId(String environmentId) { + if (this.innerProperties() == null) { + this.innerProperties = new BuilderProperties(); + } + this.innerProperties().withEnvironmentId(environmentId); + return this; + } + + /** + * Get the containerRegistries property: List of mappings of container registries and the managed identity used to + * connect to it. + * + * @return the containerRegistries value. + */ + public List containerRegistries() { + return this.innerProperties() == null ? null : this.innerProperties().containerRegistries(); + } + + /** + * Set the containerRegistries property: List of mappings of container registries and the managed identity used to + * connect to it. + * + * @param containerRegistries the containerRegistries value to set. + * @return the BuilderResourceInner object itself. + */ + public BuilderResourceInner withContainerRegistries(List containerRegistries) { + if (this.innerProperties() == null) { + this.innerProperties = new BuilderProperties(); + } + this.innerProperties().withContainerRegistries(containerRegistries); + return this; + } + + /** + * 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(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceUpdateProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceUpdateProperties.java new file mode 100644 index 0000000000000..0a866e8d761cf --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceUpdateProperties.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The updatable properties of the BuilderResource. */ +@Fluent +public final class BuilderResourceUpdateProperties { + /* + * Resource ID of the container apps environment that the builder is associated with. + */ + @JsonProperty(value = "environmentId") + private String environmentId; + + /** Creates an instance of BuilderResourceUpdateProperties class. */ + public BuilderResourceUpdateProperties() { + } + + /** + * Get the environmentId property: Resource ID of the container apps environment that the builder is associated + * with. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.environmentId; + } + + /** + * Set the environmentId property: Resource ID of the container apps environment that the builder is associated + * with. + * + * @param environmentId the environmentId value to set. + * @return the BuilderResourceUpdateProperties object itself. + */ + public BuilderResourceUpdateProperties withEnvironmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java index 4114a1b4e7322..bbbf23cc740d7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -18,6 +19,12 @@ public final class ConnectedEnvironmentStorageInner extends ProxyResource { @JsonProperty(value = "properties") private ConnectedEnvironmentStorageProperties properties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of ConnectedEnvironmentStorageInner class. */ public ConnectedEnvironmentStorageInner() { } @@ -42,6 +49,15 @@ public ConnectedEnvironmentStorageInner withProperties(ConnectedEnvironmentStora 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; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java index bb777312434d7..d81b68cf23bc6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java @@ -6,6 +6,8 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; import com.azure.resourcemanager.appcontainers.models.Secret; import com.fasterxml.jackson.annotation.JsonProperty; @@ -20,6 +22,12 @@ public final class DaprComponentInner extends ProxyResource { @JsonProperty(value = "properties") private DaprComponentProperties innerProperties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of DaprComponentInner class. */ public DaprComponentInner() { } @@ -33,6 +41,15 @@ private DaprComponentProperties 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 componentType property: Component type. * @@ -217,6 +234,29 @@ public DaprComponentInner withScopes(List scopes) { return this; } + /** + * Get the serviceComponentBind property: List of container app services that are bound to the Dapr component. + * + * @return the serviceComponentBind value. + */ + public List serviceComponentBind() { + return this.innerProperties() == null ? null : this.innerProperties().serviceComponentBind(); + } + + /** + * Set the serviceComponentBind property: List of container app services that are bound to the Dapr component. + * + * @param serviceComponentBind the serviceComponentBind value to set. + * @return the DaprComponentInner object itself. + */ + public DaprComponentInner withServiceComponentBind(List serviceComponentBind) { + if (this.innerProperties() == null) { + this.innerProperties = new DaprComponentProperties(); + } + this.innerProperties().withServiceComponentBind(serviceComponentBind); + return this; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java index 5ea576bbf7406..e309fcae39cf0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.appcontainers.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; import com.azure.resourcemanager.appcontainers.models.Secret; import com.fasterxml.jackson.annotation.JsonProperty; @@ -61,6 +62,12 @@ public final class DaprComponentProperties { @JsonProperty(value = "scopes") private List scopes; + /* + * List of container app services that are bound to the Dapr component + */ + @JsonProperty(value = "serviceComponentBind") + private List serviceComponentBind; + /** Creates an instance of DaprComponentProperties class. */ public DaprComponentProperties() { } @@ -225,6 +232,26 @@ public DaprComponentProperties withScopes(List scopes) { return this; } + /** + * Get the serviceComponentBind property: List of container app services that are bound to the Dapr component. + * + * @return the serviceComponentBind value. + */ + public List serviceComponentBind() { + return this.serviceComponentBind; + } + + /** + * Set the serviceComponentBind property: List of container app services that are bound to the Dapr component. + * + * @param serviceComponentBind the serviceComponentBind value to set. + * @return the DaprComponentProperties object itself. + */ + public DaprComponentProperties withServiceComponentBind(List serviceComponentBind) { + this.serviceComponentBind = serviceComponentBind; + return this; + } + /** * Validates the instance. * @@ -237,5 +264,8 @@ public void validate() { if (metadata() != null) { metadata().forEach(e -> e.validate()); } + if (serviceComponentBind() != null) { + serviceComponentBind().forEach(e -> e.validate()); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsInner.java index 8bd178e635bb0..1c590f86793df 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -18,6 +19,12 @@ public final class DiagnosticsInner extends ProxyResource { @JsonProperty(value = "properties") private DiagnosticsProperties properties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of DiagnosticsInner class. */ public DiagnosticsInner() { } @@ -42,6 +49,15 @@ public DiagnosticsInner withProperties(DiagnosticsProperties properties) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java index 897faf511a692..93cd42fe1d688 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java @@ -7,12 +7,14 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; import com.azure.resourcemanager.appcontainers.models.DaprConfiguration; import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; import com.azure.resourcemanager.appcontainers.models.KedaConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; +import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import com.fasterxml.jackson.annotation.JsonProperty; @@ -230,6 +232,53 @@ public ManagedEnvironmentInner withAppLogsConfiguration(AppLogsConfiguration app return this; } + /** + * Get the appInsightsConfiguration property: Environment level Application Insights configuration. + * + * @return the appInsightsConfiguration value. + */ + public AppInsightsConfiguration appInsightsConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().appInsightsConfiguration(); + } + + /** + * Set the appInsightsConfiguration property: Environment level Application Insights configuration. + * + * @param appInsightsConfiguration the appInsightsConfiguration value to set. + * @return the ManagedEnvironmentInner object itself. + */ + public ManagedEnvironmentInner withAppInsightsConfiguration(AppInsightsConfiguration appInsightsConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedEnvironmentProperties(); + } + this.innerProperties().withAppInsightsConfiguration(appInsightsConfiguration); + return this; + } + + /** + * Get the openTelemetryConfiguration property: Environment Open Telemetry configuration. + * + * @return the openTelemetryConfiguration value. + */ + public OpenTelemetryConfiguration openTelemetryConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().openTelemetryConfiguration(); + } + + /** + * Set the openTelemetryConfiguration property: Environment Open Telemetry configuration. + * + * @param openTelemetryConfiguration the openTelemetryConfiguration value to set. + * @return the ManagedEnvironmentInner object itself. + */ + public ManagedEnvironmentInner withOpenTelemetryConfiguration( + OpenTelemetryConfiguration openTelemetryConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedEnvironmentProperties(); + } + this.innerProperties().withOpenTelemetryConfiguration(openTelemetryConfiguration); + return this; + } + /** * Get the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java index f14479db3aa57..030cd0263c975 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java @@ -5,12 +5,14 @@ package com.azure.resourcemanager.appcontainers.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; import com.azure.resourcemanager.appcontainers.models.DaprConfiguration; import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; import com.azure.resourcemanager.appcontainers.models.KedaConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; +import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import com.fasterxml.jackson.annotation.JsonProperty; @@ -69,6 +71,18 @@ public final class ManagedEnvironmentProperties { @JsonProperty(value = "appLogsConfiguration") private AppLogsConfiguration appLogsConfiguration; + /* + * Environment level Application Insights configuration + */ + @JsonProperty(value = "appInsightsConfiguration") + private AppInsightsConfiguration appInsightsConfiguration; + + /* + * Environment Open Telemetry configuration + */ + @JsonProperty(value = "openTelemetryConfiguration") + private OpenTelemetryConfiguration openTelemetryConfiguration; + /* * Whether or not this Managed Environment is zone-redundant. */ @@ -245,6 +259,48 @@ public ManagedEnvironmentProperties withAppLogsConfiguration(AppLogsConfiguratio return this; } + /** + * Get the appInsightsConfiguration property: Environment level Application Insights configuration. + * + * @return the appInsightsConfiguration value. + */ + public AppInsightsConfiguration appInsightsConfiguration() { + return this.appInsightsConfiguration; + } + + /** + * Set the appInsightsConfiguration property: Environment level Application Insights configuration. + * + * @param appInsightsConfiguration the appInsightsConfiguration value to set. + * @return the ManagedEnvironmentProperties object itself. + */ + public ManagedEnvironmentProperties withAppInsightsConfiguration( + AppInsightsConfiguration appInsightsConfiguration) { + this.appInsightsConfiguration = appInsightsConfiguration; + return this; + } + + /** + * Get the openTelemetryConfiguration property: Environment Open Telemetry configuration. + * + * @return the openTelemetryConfiguration value. + */ + public OpenTelemetryConfiguration openTelemetryConfiguration() { + return this.openTelemetryConfiguration; + } + + /** + * Set the openTelemetryConfiguration property: Environment Open Telemetry configuration. + * + * @param openTelemetryConfiguration the openTelemetryConfiguration value to set. + * @return the ManagedEnvironmentProperties object itself. + */ + public ManagedEnvironmentProperties withOpenTelemetryConfiguration( + OpenTelemetryConfiguration openTelemetryConfiguration) { + this.openTelemetryConfiguration = openTelemetryConfiguration; + return this; + } + /** * Get the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. * @@ -412,6 +468,12 @@ public void validate() { if (appLogsConfiguration() != null) { appLogsConfiguration().validate(); } + if (appInsightsConfiguration() != null) { + appInsightsConfiguration().validate(); + } + if (openTelemetryConfiguration() != null) { + openTelemetryConfiguration().validate(); + } if (customDomainConfiguration() != null) { customDomainConfiguration().validate(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java index 5b01b9826d61f..cf04d189ef98f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorageProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -18,6 +19,12 @@ public final class ManagedEnvironmentStorageInner extends ProxyResource { @JsonProperty(value = "properties") private ManagedEnvironmentStorageProperties properties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of ManagedEnvironmentStorageInner class. */ public ManagedEnvironmentStorageInner() { } @@ -42,6 +49,15 @@ public ManagedEnvironmentStorageInner withProperties(ManagedEnvironmentStoragePr 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; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PatchCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PatchCollectionInner.java new file mode 100644 index 0000000000000..632c59806f8d5 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PatchCollectionInner.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Container App SourceToCloud patch collection. */ +@Fluent +public final class PatchCollectionInner { + /* + * Collection of patch resources. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * the link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of PatchCollectionInner class. */ + public PatchCollectionInner() { + } + + /** + * Get the value property: Collection of patch resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Collection of patch resources. + * + * @param value the value value to set. + * @return the PatchCollectionInner object itself. + */ + public PatchCollectionInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: the link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: the link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the PatchCollectionInner object itself. + */ + public PatchCollectionInner withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property value in model PatchCollectionInner")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PatchCollectionInner.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PatchResourceInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PatchResourceInner.java new file mode 100644 index 0000000000000..c4ff8aa2001a0 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PatchResourceInner.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.PatchProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Container App Patch. */ +@Immutable +public final class PatchResourceInner extends ProxyResource { + /* + * Properties that describes current states of the patch resource. + */ + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private PatchProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of PatchResourceInner class. */ + public PatchResourceInner() { + } + + /** + * Get the properties property: Properties that describes current states of the patch resource. + * + * @return the properties value. + */ + public PatchProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java index 503299ffa44f8..4238788b5f097 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.ContainerAppReplicaRunningState; import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; import com.fasterxml.jackson.annotation.JsonProperty; @@ -21,6 +22,12 @@ public final class ReplicaInner extends ProxyResource { @JsonProperty(value = "properties") private ReplicaProperties innerProperties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of ReplicaInner class. */ public ReplicaInner() { } @@ -34,6 +41,15 @@ private ReplicaProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the createdTime property: Timestamp describing when the pod was created by controller. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java index 178306f4e3f2e..5d542a067ba11 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.RevisionHealthState; import com.azure.resourcemanager.appcontainers.models.RevisionProvisioningState; import com.azure.resourcemanager.appcontainers.models.RevisionRunningState; @@ -22,6 +23,12 @@ public final class RevisionInner extends ProxyResource { @JsonProperty(value = "properties") private RevisionProperties innerProperties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of RevisionInner class. */ public RevisionInner() { } @@ -35,6 +42,15 @@ private RevisionProperties 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 createdTime property: Timestamp describing when the revision was created by controller. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlInner.java index 74f9577011f61..401141b646ef0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; import com.azure.resourcemanager.appcontainers.models.SourceControlOperationState; import com.fasterxml.jackson.annotation.JsonProperty; @@ -19,6 +20,12 @@ public final class SourceControlInner extends ProxyResource { @JsonProperty(value = "properties") private SourceControlProperties innerProperties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of SourceControlInner class. */ public SourceControlInner() { } @@ -32,6 +39,15 @@ private SourceControlProperties 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 operationState property: Current provisioning State of the operation. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/UsageInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/UsageInner.java new file mode 100644 index 0000000000000..f3e4a57c8db8f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/UsageInner.java @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.models.UsageName; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Describes Compute Resource Usage. */ +@Fluent +public final class UsageInner { + /* + * An enum describing the unit of usage measurement. + */ + @JsonProperty(value = "unit", required = true) + private String unit = "Count"; + + /* + * The current usage of the resource. + */ + @JsonProperty(value = "currentValue", required = true) + private int currentValue; + + /* + * The maximum permitted usage of the resource. + */ + @JsonProperty(value = "limit", required = true) + private long limit; + + /* + * The name of the type of usage. + */ + @JsonProperty(value = "name", required = true) + private UsageName name; + + /** Creates an instance of UsageInner class. */ + public UsageInner() { + unit = "Count"; + } + + /** + * Get the unit property: An enum describing the unit of usage measurement. + * + * @return the unit value. + */ + public String unit() { + return this.unit; + } + + /** + * Set the unit property: An enum describing the unit of usage measurement. + * + * @param unit the unit value to set. + * @return the UsageInner object itself. + */ + public UsageInner withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get the currentValue property: The current usage of the resource. + * + * @return the currentValue value. + */ + public int currentValue() { + return this.currentValue; + } + + /** + * Set the currentValue property: The current usage of the resource. + * + * @param currentValue the currentValue value to set. + * @return the UsageInner object itself. + */ + public UsageInner withCurrentValue(int currentValue) { + this.currentValue = currentValue; + return this; + } + + /** + * Get the limit property: The maximum permitted usage of the resource. + * + * @return the limit value. + */ + public long limit() { + return this.limit; + } + + /** + * Set the limit property: The maximum permitted usage of the resource. + * + * @param limit the limit value to set. + * @return the UsageInner object itself. + */ + public UsageInner withLimit(long limit) { + this.limit = limit; + return this; + } + + /** + * Get the name property: The name of the type of usage. + * + * @return the name value. + */ + public UsageName name() { + return this.name; + } + + /** + * Set the name property: The name of the type of usage. + * + * @param name the name value to set. + * @return the UsageInner object itself. + */ + public UsageInner withName(UsageName name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model UsageInner")); + } else { + name().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(UsageInner.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkloadProfileStatesInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkloadProfileStatesInner.java index 825cf626a1bfd..9a0c03e9dead0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkloadProfileStatesInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkloadProfileStatesInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; import com.fasterxml.jackson.annotation.JsonProperty; @@ -18,6 +19,12 @@ public final class WorkloadProfileStatesInner extends ProxyResource { @JsonProperty(value = "properties") private WorkloadProfileStatesProperties properties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of WorkloadProfileStatesInner class. */ public WorkloadProfileStatesInner() { } @@ -42,6 +49,15 @@ public WorkloadProfileStatesInner withProperties(WorkloadProfileStatesProperties 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; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AuthConfigImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AuthConfigImpl.java index 9db849c965eb3..b6ea9f2a352ae 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AuthConfigImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AuthConfigImpl.java @@ -9,6 +9,7 @@ import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; import com.azure.resourcemanager.appcontainers.models.AuthConfig; import com.azure.resourcemanager.appcontainers.models.AuthPlatform; +import com.azure.resourcemanager.appcontainers.models.EncryptionSettings; import com.azure.resourcemanager.appcontainers.models.GlobalValidation; import com.azure.resourcemanager.appcontainers.models.HttpSettings; import com.azure.resourcemanager.appcontainers.models.IdentityProviders; @@ -55,6 +56,10 @@ public HttpSettings httpSettings() { return this.innerModel().httpSettings(); } + public EncryptionSettings encryptionSettings() { + return this.innerModel().encryptionSettings(); + } + public String resourceGroupName() { return resourceGroupName; } @@ -186,4 +191,9 @@ public AuthConfigImpl withHttpSettings(HttpSettings httpSettings) { this.innerModel().withHttpSettings(httpSettings); return this; } + + public AuthConfigImpl withEncryptionSettings(EncryptionSettings encryptionSettings) { + this.innerModel().withEncryptionSettings(encryptionSettings); + return this; + } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfileImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfileImpl.java index c43cffd130a17..6426657e43c34 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfileImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfileImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfile; import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; @@ -40,6 +41,10 @@ public AvailableWorkloadProfileProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public AvailableWorkloadProfileInner innerModel() { return this.innerObject; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildResourceImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildResourceImpl.java new file mode 100644 index 0000000000000..81c3efbed914a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildResourceImpl.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; +import com.azure.resourcemanager.appcontainers.models.BuildConfiguration; +import com.azure.resourcemanager.appcontainers.models.BuildProvisioningState; +import com.azure.resourcemanager.appcontainers.models.BuildResource; +import com.azure.resourcemanager.appcontainers.models.BuildStatus; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; + +public final class BuildResourceImpl implements BuildResource, BuildResource.Definition, BuildResource.Update { + private BuildResourceInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public BuildProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public BuildStatus buildStatus() { + return this.innerModel().buildStatus(); + } + + public ContainerRegistryWithCustomImage destinationContainerRegistry() { + return this.innerModel().destinationContainerRegistry(); + } + + public BuildConfiguration configuration() { + return this.innerModel().configuration(); + } + + public String uploadEndpoint() { + return this.innerModel().uploadEndpoint(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public BuildResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String builderName; + + private String buildName; + + public BuildResourceImpl withExistingBuilder(String resourceGroupName, String builderName) { + this.resourceGroupName = resourceGroupName; + this.builderName = builderName; + return this; + } + + public BuildResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getBuilds() + .createOrUpdate(resourceGroupName, builderName, buildName, this.innerModel(), Context.NONE); + return this; + } + + public BuildResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getBuilds() + .createOrUpdate(resourceGroupName, builderName, buildName, this.innerModel(), context); + return this; + } + + BuildResourceImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = new BuildResourceInner(); + this.serviceManager = serviceManager; + this.buildName = name; + } + + public BuildResourceImpl update() { + return this; + } + + public BuildResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getBuilds() + .createOrUpdate(resourceGroupName, builderName, buildName, this.innerModel(), Context.NONE); + return this; + } + + public BuildResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getBuilds() + .createOrUpdate(resourceGroupName, builderName, buildName, this.innerModel(), context); + return this; + } + + BuildResourceImpl( + BuildResourceInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.builderName = Utils.getValueFromIdByName(innerObject.id(), "builders"); + this.buildName = Utils.getValueFromIdByName(innerObject.id(), "builds"); + } + + public BuildResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getBuilds() + .getWithResponse(resourceGroupName, builderName, buildName, Context.NONE) + .getValue(); + return this; + } + + public BuildResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getBuilds() + .getWithResponse(resourceGroupName, builderName, buildName, context) + .getValue(); + return this; + } + + public BuildResourceImpl withDestinationContainerRegistry( + ContainerRegistryWithCustomImage destinationContainerRegistry) { + this.innerModel().withDestinationContainerRegistry(destinationContainerRegistry); + return this; + } + + public BuildResourceImpl withConfiguration(BuildConfiguration configuration) { + this.innerModel().withConfiguration(configuration); + return this; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuilderResourceImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuilderResourceImpl.java new file mode 100644 index 0000000000000..9457242585758 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuilderResourceImpl.java @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; +import com.azure.resourcemanager.appcontainers.models.BuilderProvisioningState; +import com.azure.resourcemanager.appcontainers.models.BuilderResource; +import com.azure.resourcemanager.appcontainers.models.BuilderResourceUpdate; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class BuilderResourceImpl implements BuilderResource, BuilderResource.Definition, BuilderResource.Update { + private BuilderResourceInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public BuilderProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String environmentId() { + return this.innerModel().environmentId(); + } + + public List containerRegistries() { + List inner = this.innerModel().containerRegistries(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public BuilderResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String builderName; + + private BuilderResourceUpdate updateBuilderEnvelope; + + public BuilderResourceImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public BuilderResource create() { + this.innerObject = + serviceManager + .serviceClient() + .getBuilders() + .createOrUpdate(resourceGroupName, builderName, this.innerModel(), Context.NONE); + return this; + } + + public BuilderResource create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getBuilders() + .createOrUpdate(resourceGroupName, builderName, this.innerModel(), context); + return this; + } + + BuilderResourceImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = new BuilderResourceInner(); + this.serviceManager = serviceManager; + this.builderName = name; + } + + public BuilderResourceImpl update() { + this.updateBuilderEnvelope = new BuilderResourceUpdate(); + return this; + } + + public BuilderResource apply() { + this.innerObject = + serviceManager + .serviceClient() + .getBuilders() + .update(resourceGroupName, builderName, updateBuilderEnvelope, Context.NONE); + return this; + } + + public BuilderResource apply(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getBuilders() + .update(resourceGroupName, builderName, updateBuilderEnvelope, context); + return this; + } + + BuilderResourceImpl( + BuilderResourceInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.builderName = Utils.getValueFromIdByName(innerObject.id(), "builders"); + } + + public BuilderResource refresh() { + this.innerObject = + serviceManager + .serviceClient() + .getBuilders() + .getByResourceGroupWithResponse(resourceGroupName, builderName, Context.NONE) + .getValue(); + return this; + } + + public BuilderResource refresh(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getBuilders() + .getByResourceGroupWithResponse(resourceGroupName, builderName, context) + .getValue(); + return this; + } + + public BuilderResourceImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public BuilderResourceImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public BuilderResourceImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBuilderEnvelope.withTags(tags); + return this; + } + } + + public BuilderResourceImpl withIdentity(ManagedServiceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateBuilderEnvelope.withIdentity(identity); + return this; + } + } + + public BuilderResourceImpl withEnvironmentId(String environmentId) { + if (isInCreateMode()) { + this.innerModel().withEnvironmentId(environmentId); + return this; + } else { + this.updateBuilderEnvelope.withEnvironmentId(environmentId); + return this; + } + } + + public BuilderResourceImpl withContainerRegistries(List containerRegistries) { + this.innerModel().withContainerRegistries(containerRegistries); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersClientImpl.java new file mode 100644 index 0000000000000..a1a7a4d7563eb --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersClientImpl.java @@ -0,0 +1,1542 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.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.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.appcontainers.fluent.BuildersClient; +import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; +import com.azure.resourcemanager.appcontainers.models.BuilderCollection; +import com.azure.resourcemanager.appcontainers.models.BuilderResourceUpdate; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +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 BuildersClient. */ +public final class BuildersClientImpl implements BuildersClient { + /** The proxy service used to perform REST calls. */ + private final BuildersService service; + + /** The service client containing this operation class. */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of BuildersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BuildersClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(BuildersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientBuilders to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface BuildersService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/builders") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> list( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listByResourceGroup( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getByResourceGroup( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("builderName") String builderName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("builderName") String builderName, + @BodyParam("application/json") BuilderResourceInner builderEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Patch( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> update( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("builderName") String builderName, + @BodyParam("application/json") BuilderResourceUpdate builderEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("builderName") String builderName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List BuilderResource resources by subscription ID. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List BuilderResource resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List BuilderResource resources by subscription ID. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>( + () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List BuilderResource resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List BuilderResource resources by subscription ID. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List BuilderResource resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * List BuilderResource resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List BuilderResource resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync( + String resourceGroupName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List BuilderResource resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List BuilderResource resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>( + () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List BuilderResource resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List BuilderResource resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Get a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String builderName) { + 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync( + String resourceGroupName, String builderName, 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getByResourceGroup( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + accept, + context); + } + + /** + * Get a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String builderName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, builderName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String builderName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, builderName, context).block(); + } + + /** + * Get a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BuilderResourceInner getByResourceGroup(String resourceGroupName, String builderName) { + return getByResourceGroupWithResponse(resourceGroupName, builderName, Context.NONE).getValue(); + } + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope) { + 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (builderEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter builderEnvelope is required and cannot be null.")); + } else { + builderEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + builderEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope, 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (builderEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter builderEnvelope is required and cannot be null.")); + } else { + builderEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + builderEnvelope, + accept, + context); + } + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BuilderResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, builderName, builderEnvelope); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + BuilderResourceInner.class, + BuilderResourceInner.class, + this.client.getContext()); + } + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BuilderResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, builderName, builderEnvelope, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), BuilderResourceInner.class, BuilderResourceInner.class, context); + } + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BuilderResourceInner> beginCreateOrUpdate( + String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope) { + return this.beginCreateOrUpdateAsync(resourceGroupName, builderName, builderEnvelope).getSyncPoller(); + } + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BuilderResourceInner> beginCreateOrUpdate( + String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, builderName, builderEnvelope, context).getSyncPoller(); + } + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, builderName, builderEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, builderName, builderEnvelope, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BuilderResourceInner createOrUpdate( + String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope) { + return createOrUpdateAsync(resourceGroupName, builderName, builderEnvelope).block(); + } + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BuilderResourceInner createOrUpdate( + String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope, Context context) { + return createOrUpdateAsync(resourceGroupName, builderName, builderEnvelope, context).block(); + } + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope) { + 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (builderEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter builderEnvelope is required and cannot be null.")); + } else { + builderEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + builderEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync( + String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope, 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (builderEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter builderEnvelope is required and cannot be null.")); + } else { + builderEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .update( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + builderEnvelope, + accept, + context); + } + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BuilderResourceInner> beginUpdateAsync( + String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope) { + Mono>> mono = + updateWithResponseAsync(resourceGroupName, builderName, builderEnvelope); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + BuilderResourceInner.class, + BuilderResourceInner.class, + this.client.getContext()); + } + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BuilderResourceInner> beginUpdateAsync( + String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + updateWithResponseAsync(resourceGroupName, builderName, builderEnvelope, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), BuilderResourceInner.class, BuilderResourceInner.class, context); + } + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BuilderResourceInner> beginUpdate( + String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope) { + return this.beginUpdateAsync(resourceGroupName, builderName, builderEnvelope).getSyncPoller(); + } + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BuilderResourceInner> beginUpdate( + String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope, Context context) { + return this.beginUpdateAsync(resourceGroupName, builderName, builderEnvelope, context).getSyncPoller(); + } + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope) { + return beginUpdateAsync(resourceGroupName, builderName, builderEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope, Context context) { + return beginUpdateAsync(resourceGroupName, builderName, builderEnvelope, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BuilderResourceInner update( + String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope) { + return updateAsync(resourceGroupName, builderName, builderEnvelope).block(); + } + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BuilderResourceInner update( + String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope, Context context) { + return updateAsync(resourceGroupName, builderName, builderEnvelope, context).block(); + } + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 builderName) { + 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 builderName, 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + accept, + context); + } + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 builderName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, builderName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 builderName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, builderName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is 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 builderName) { + return this.beginDeleteAsync(resourceGroupName, builderName).getSyncPoller(); + } + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is 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 builderName, Context context) { + return this.beginDeleteAsync(resourceGroupName, builderName, context).getSyncPoller(); + } + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 builderName) { + return beginDeleteAsync(resourceGroupName, builderName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 builderName, Context context) { + return beginDeleteAsync(resourceGroupName, builderName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 builderName) { + deleteAsync(resourceGroupName, builderName).block(); + } + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 builderName, Context context) { + deleteAsync(resourceGroupName, builderName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(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.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync( + 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 + .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(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.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync( + 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 + .listByResourceGroupNext(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/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersImpl.java new file mode 100644 index 0000000000000..4d4d2f1276700 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersImpl.java @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.BuildersClient; +import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; +import com.azure.resourcemanager.appcontainers.models.BuilderResource; +import com.azure.resourcemanager.appcontainers.models.Builders; + +public final class BuildersImpl implements Builders { + private static final ClientLogger LOGGER = new ClientLogger(BuildersImpl.class); + + private final BuildersClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public BuildersImpl( + BuildersClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return Utils.mapPage(inner, inner1 -> new BuilderResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return Utils.mapPage(inner, inner1 -> new BuilderResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.mapPage(inner, inner1 -> new BuilderResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = + this.serviceClient().listByResourceGroup(resourceGroupName, context); + return Utils.mapPage(inner, inner1 -> new BuilderResourceImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse( + String resourceGroupName, String builderName, Context context) { + Response inner = + this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, builderName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new BuilderResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BuilderResource getByResourceGroup(String resourceGroupName, String builderName) { + BuilderResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, builderName); + if (inner != null) { + return new BuilderResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String builderName) { + this.serviceClient().delete(resourceGroupName, builderName); + } + + public void delete(String resourceGroupName, String builderName, Context context) { + this.serviceClient().delete(resourceGroupName, builderName, context); + } + + public BuilderResource getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String builderName = Utils.getValueFromIdByName(id, "builders"); + if (builderName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, builderName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String builderName = Utils.getValueFromIdByName(id, "builders"); + if (builderName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, builderName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String builderName = Utils.getValueFromIdByName(id, "builders"); + if (builderName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); + } + this.delete(resourceGroupName, builderName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String builderName = Utils.getValueFromIdByName(id, "builders"); + if (builderName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); + } + this.delete(resourceGroupName, builderName, context); + } + + private BuildersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + public BuilderResourceImpl define(String name) { + return new BuilderResourceImpl(name, this.manager()); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsClientImpl.java new file mode 100644 index 0000000000000..5eec8852b3405 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsClientImpl.java @@ -0,0 +1,1110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.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.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.appcontainers.fluent.BuildsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; +import com.azure.resourcemanager.appcontainers.models.BuildCollection; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +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 BuildsClient. */ +public final class BuildsClientImpl implements BuildsClient { + /** The proxy service used to perform REST calls. */ + private final BuildsService service; + + /** The service client containing this operation class. */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of BuildsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BuildsClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(BuildsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientBuilds to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface BuildsService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listByBuilderResource( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("builderName") String builderName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("builderName") String builderName, + @PathParam("buildName") String buildName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}") + @ExpectedResponses({200, 201}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createOrUpdate( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("builderName") String builderName, + @PathParam("buildName") String buildName, + @BodyParam("application/json") BuildResourceInner buildEnvelope, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("builderName") String builderName, + @PathParam("buildName") String buildName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listByBuilderResourceNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List BuildResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByBuilderResourceSinglePageAsync( + String resourceGroupName, String builderName) { + 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByBuilderResource( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List BuildResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByBuilderResourceSinglePageAsync( + String resourceGroupName, String builderName, 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByBuilderResource( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * List BuildResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByBuilderResourceAsync(String resourceGroupName, String builderName) { + return new PagedFlux<>( + () -> listByBuilderResourceSinglePageAsync(resourceGroupName, builderName), + nextLink -> listByBuilderResourceNextSinglePageAsync(nextLink)); + } + + /** + * List BuildResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByBuilderResourceAsync( + String resourceGroupName, String builderName, Context context) { + return new PagedFlux<>( + () -> listByBuilderResourceSinglePageAsync(resourceGroupName, builderName, context), + nextLink -> listByBuilderResourceNextSinglePageAsync(nextLink, context)); + } + + /** + * List BuildResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByBuilderResource(String resourceGroupName, String builderName) { + return new PagedIterable<>(listByBuilderResourceAsync(resourceGroupName, builderName)); + } + + /** + * List BuildResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByBuilderResource( + String resourceGroupName, String builderName, Context context) { + return new PagedIterable<>(listByBuilderResourceAsync(resourceGroupName, builderName, context)); + } + + /** + * Get a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String builderName, String buildName) { + 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (buildName == null) { + return Mono.error(new IllegalArgumentException("Parameter buildName 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, + builderName, + buildName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String builderName, String buildName, 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (buildName == null) { + return Mono.error(new IllegalArgumentException("Parameter buildName 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, + builderName, + buildName, + accept, + context); + } + + /** + * Get a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String builderName, String buildName) { + return getWithResponseAsync(resourceGroupName, builderName, buildName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String builderName, String buildName, Context context) { + return getWithResponseAsync(resourceGroupName, builderName, buildName, context).block(); + } + + /** + * Get a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BuildResourceInner get(String resourceGroupName, String builderName, String buildName) { + return getWithResponse(resourceGroupName, builderName, buildName, Context.NONE).getValue(); + } + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information pertaining to an individual build along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, String builderName, String buildName, BuildResourceInner buildEnvelope) { + 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (buildName == null) { + return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); + } + if (buildEnvelope == null) { + return Mono.error(new IllegalArgumentException("Parameter buildEnvelope is required and cannot be null.")); + } else { + buildEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + buildName, + buildEnvelope, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information pertaining to an individual build along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync( + String resourceGroupName, + String builderName, + String buildName, + BuildResourceInner buildEnvelope, + 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (buildName == null) { + return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); + } + if (buildEnvelope == null) { + return Mono.error(new IllegalArgumentException("Parameter buildEnvelope is required and cannot be null.")); + } else { + buildEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdate( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + buildName, + buildEnvelope, + accept, + context); + } + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 information pertaining to an individual build. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BuildResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String builderName, String buildName, BuildResourceInner buildEnvelope) { + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, builderName, buildName, buildEnvelope); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + BuildResourceInner.class, + BuildResourceInner.class, + this.client.getContext()); + } + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 information pertaining to an individual build. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BuildResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, + String builderName, + String buildName, + BuildResourceInner buildEnvelope, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + createOrUpdateWithResponseAsync(resourceGroupName, builderName, buildName, buildEnvelope, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), BuildResourceInner.class, BuildResourceInner.class, context); + } + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information pertaining to an individual build. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BuildResourceInner> beginCreateOrUpdate( + String resourceGroupName, String builderName, String buildName, BuildResourceInner buildEnvelope) { + return this.beginCreateOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope).getSyncPoller(); + } + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information pertaining to an individual build. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BuildResourceInner> beginCreateOrUpdate( + String resourceGroupName, + String builderName, + String buildName, + BuildResourceInner buildEnvelope, + Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope, context) + .getSyncPoller(); + } + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information pertaining to an individual build on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, String builderName, String buildName, BuildResourceInner buildEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information pertaining to an individual build on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String builderName, + String buildName, + BuildResourceInner buildEnvelope, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information pertaining to an individual build. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BuildResourceInner createOrUpdate( + String resourceGroupName, String builderName, String buildName, BuildResourceInner buildEnvelope) { + return createOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope).block(); + } + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information pertaining to an individual build. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BuildResourceInner createOrUpdate( + String resourceGroupName, + String builderName, + String buildName, + BuildResourceInner buildEnvelope, + Context context) { + return createOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope, context).block(); + } + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 builderName, String buildName) { + 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (buildName == null) { + return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + buildName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 builderName, String buildName, 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (buildName == null) { + return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + buildName, + accept, + context); + } + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 builderName, String buildName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, builderName, buildName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 builderName, String buildName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, builderName, buildName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is 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 builderName, String buildName) { + return this.beginDeleteAsync(resourceGroupName, builderName, buildName).getSyncPoller(); + } + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is 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 builderName, String buildName, Context context) { + return this.beginDeleteAsync(resourceGroupName, builderName, buildName, context).getSyncPoller(); + } + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 builderName, String buildName) { + return beginDeleteAsync(resourceGroupName, builderName, buildName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 builderName, String buildName, Context context) { + return beginDeleteAsync(resourceGroupName, builderName, buildName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 builderName, String buildName) { + deleteAsync(resourceGroupName, builderName, buildName).block(); + } + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 builderName, String buildName, Context context) { + deleteAsync(resourceGroupName, builderName, buildName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByBuilderResourceNextSinglePageAsync(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.listByBuilderResourceNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByBuilderResourceNextSinglePageAsync( + 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 + .listByBuilderResourceNext(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/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsImpl.java new file mode 100644 index 0000000000000..bce4bf564a5c9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsImpl.java @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.BuildsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; +import com.azure.resourcemanager.appcontainers.models.BuildResource; +import com.azure.resourcemanager.appcontainers.models.Builds; + +public final class BuildsImpl implements Builds { + private static final ClientLogger LOGGER = new ClientLogger(BuildsImpl.class); + + private final BuildsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public BuildsImpl( + BuildsClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByBuilderResource(String resourceGroupName, String builderName) { + PagedIterable inner = + this.serviceClient().listByBuilderResource(resourceGroupName, builderName); + return Utils.mapPage(inner, inner1 -> new BuildResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByBuilderResource( + String resourceGroupName, String builderName, Context context) { + PagedIterable inner = + this.serviceClient().listByBuilderResource(resourceGroupName, builderName, context); + return Utils.mapPage(inner, inner1 -> new BuildResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse( + String resourceGroupName, String builderName, String buildName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, builderName, buildName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new BuildResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BuildResource get(String resourceGroupName, String builderName, String buildName) { + BuildResourceInner inner = this.serviceClient().get(resourceGroupName, builderName, buildName); + if (inner != null) { + return new BuildResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String builderName, String buildName) { + this.serviceClient().delete(resourceGroupName, builderName, buildName); + } + + public void delete(String resourceGroupName, String builderName, String buildName, Context context) { + this.serviceClient().delete(resourceGroupName, builderName, buildName, context); + } + + public BuildResource getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String builderName = Utils.getValueFromIdByName(id, "builders"); + if (builderName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); + } + String buildName = Utils.getValueFromIdByName(id, "builds"); + if (buildName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id))); + } + return this.getWithResponse(resourceGroupName, builderName, buildName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String builderName = Utils.getValueFromIdByName(id, "builders"); + if (builderName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); + } + String buildName = Utils.getValueFromIdByName(id, "builds"); + if (buildName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id))); + } + return this.getWithResponse(resourceGroupName, builderName, buildName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String builderName = Utils.getValueFromIdByName(id, "builders"); + if (builderName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); + } + String buildName = Utils.getValueFromIdByName(id, "builds"); + if (buildName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id))); + } + this.delete(resourceGroupName, builderName, buildName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String builderName = Utils.getValueFromIdByName(id, "builders"); + if (builderName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); + } + String buildName = Utils.getValueFromIdByName(id, "builds"); + if (buildName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id))); + } + this.delete(resourceGroupName, builderName, buildName, context); + } + + private BuildsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + public BuildResourceImpl define(String name) { + return new BuildResourceImpl(name, this.manager()); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java index 4e0adba8acb47..6b49e3cdead7f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorage; @@ -31,6 +32,10 @@ public ConnectedEnvironmentStorageProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String resourceGroupName() { return resourceGroupName; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java index 3289bbba92736..09bd5311c2a3c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java @@ -24,6 +24,8 @@ import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.appcontainers.fluent.AvailableWorkloadProfilesClient; import com.azure.resourcemanager.appcontainers.fluent.BillingMetersClient; +import com.azure.resourcemanager.appcontainers.fluent.BuildersClient; +import com.azure.resourcemanager.appcontainers.fluent.BuildsClient; import com.azure.resourcemanager.appcontainers.fluent.CertificatesClient; import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsCertificatesClient; import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsClient; @@ -41,12 +43,15 @@ import com.azure.resourcemanager.appcontainers.fluent.JobsExecutionsClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedCertificatesClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentDiagnosticsClient; +import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentUsagesClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsDiagnosticsClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsStoragesClient; import com.azure.resourcemanager.appcontainers.fluent.NamespacesClient; import com.azure.resourcemanager.appcontainers.fluent.OperationsClient; +import com.azure.resourcemanager.appcontainers.fluent.PatchesClient; import com.azure.resourcemanager.appcontainers.fluent.ResourceProvidersClient; +import com.azure.resourcemanager.appcontainers.fluent.UsagesClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -167,6 +172,30 @@ public BillingMetersClient getBillingMeters() { return this.billingMeters; } + /** The BuildersClient object to access its operations. */ + private final BuildersClient builders; + + /** + * Gets the BuildersClient object to access its operations. + * + * @return the BuildersClient object. + */ + public BuildersClient getBuilders() { + return this.builders; + } + + /** The BuildsClient object to access its operations. */ + private final BuildsClient builds; + + /** + * Gets the BuildsClient object to access its operations. + * + * @return the BuildsClient object. + */ + public BuildsClient getBuilds() { + return this.builds; + } + /** The ConnectedEnvironmentsClient object to access its operations. */ private final ConnectedEnvironmentsClient connectedEnvironments; @@ -407,6 +436,18 @@ public ManagedEnvironmentsStoragesClient getManagedEnvironmentsStorages() { return this.managedEnvironmentsStorages; } + /** The PatchesClient object to access its operations. */ + private final PatchesClient patches; + + /** + * Gets the PatchesClient object to access its operations. + * + * @return the PatchesClient object. + */ + public PatchesClient getPatches() { + return this.patches; + } + /** The ContainerAppsSourceControlsClient object to access its operations. */ private final ContainerAppsSourceControlsClient containerAppsSourceControls; @@ -419,6 +460,30 @@ public ContainerAppsSourceControlsClient getContainerAppsSourceControls() { return this.containerAppsSourceControls; } + /** The UsagesClient object to access its operations. */ + private final UsagesClient usages; + + /** + * Gets the UsagesClient object to access its operations. + * + * @return the UsagesClient object. + */ + public UsagesClient getUsages() { + return this.usages; + } + + /** The ManagedEnvironmentUsagesClient object to access its operations. */ + private final ManagedEnvironmentUsagesClient managedEnvironmentUsages; + + /** + * Gets the ManagedEnvironmentUsagesClient object to access its operations. + * + * @return the ManagedEnvironmentUsagesClient object. + */ + public ManagedEnvironmentUsagesClient getManagedEnvironmentUsages() { + return this.managedEnvironmentUsages; + } + /** * Initializes an instance of ContainerAppsApiClient client. * @@ -441,10 +506,12 @@ public ContainerAppsSourceControlsClient getContainerAppsSourceControls() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-05-01"; + this.apiVersion = "2023-08-01-preview"; this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsClientImpl(this); this.availableWorkloadProfiles = new AvailableWorkloadProfilesClientImpl(this); this.billingMeters = new BillingMetersClientImpl(this); + this.builders = new BuildersClientImpl(this); + this.builds = new BuildsClientImpl(this); this.connectedEnvironments = new ConnectedEnvironmentsClientImpl(this); this.connectedEnvironmentsCertificates = new ConnectedEnvironmentsCertificatesClientImpl(this); this.connectedEnvironmentsDaprComponents = new ConnectedEnvironmentsDaprComponentsClientImpl(this); @@ -465,7 +532,10 @@ public ContainerAppsSourceControlsClient getContainerAppsSourceControls() { this.namespaces = new NamespacesClientImpl(this); this.daprComponents = new DaprComponentsClientImpl(this); this.managedEnvironmentsStorages = new ManagedEnvironmentsStoragesClientImpl(this); + this.patches = new PatchesClientImpl(this); this.containerAppsSourceControls = new ContainerAppsSourceControlsClientImpl(this); + this.usages = new UsagesClientImpl(this); + this.managedEnvironmentUsages = new ManagedEnvironmentUsagesClientImpl(this); } /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java index 9afafdafa4c73..f397f21dd8e33 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java @@ -5,9 +5,11 @@ package com.azure.resourcemanager.appcontainers.implementation; import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; import com.azure.resourcemanager.appcontainers.models.DaprComponent; +import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; import com.azure.resourcemanager.appcontainers.models.Secret; @@ -31,6 +33,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String componentType() { return this.innerModel().componentType(); } @@ -78,6 +84,15 @@ public List scopes() { } } + public List serviceComponentBind() { + List inner = this.innerModel().serviceComponentBind(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public String resourceGroupName() { return resourceGroupName; } @@ -238,4 +253,9 @@ public DaprComponentImpl withScopes(List scopes) { this.innerModel().withScopes(scopes); return this; } + + public DaprComponentImpl withServiceComponentBind(List serviceComponentBind) { + this.innerModel().withServiceComponentBind(serviceComponentBind); + return this; + } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.java index 40453e7de9471..593d62d7018a3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; import com.azure.resourcemanager.appcontainers.models.Diagnostics; import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; @@ -35,6 +36,10 @@ public DiagnosticsProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public DiagnosticsInner innerModel() { return this.innerObject; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java index 1d0877490ef02..64e204a65f451 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java @@ -9,6 +9,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; +import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; import com.azure.resourcemanager.appcontainers.models.DaprConfiguration; @@ -17,6 +18,7 @@ import com.azure.resourcemanager.appcontainers.models.KedaConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; +import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import java.util.Collections; @@ -94,6 +96,14 @@ public AppLogsConfiguration appLogsConfiguration() { return this.innerModel().appLogsConfiguration(); } + public AppInsightsConfiguration appInsightsConfiguration() { + return this.innerModel().appInsightsConfiguration(); + } + + public OpenTelemetryConfiguration openTelemetryConfiguration() { + return this.innerModel().openTelemetryConfiguration(); + } + public Boolean zoneRedundant() { return this.innerModel().zoneRedundant(); } @@ -286,6 +296,17 @@ public ManagedEnvironmentImpl withAppLogsConfiguration(AppLogsConfiguration appL return this; } + public ManagedEnvironmentImpl withAppInsightsConfiguration(AppInsightsConfiguration appInsightsConfiguration) { + this.innerModel().withAppInsightsConfiguration(appInsightsConfiguration); + return this; + } + + public ManagedEnvironmentImpl withOpenTelemetryConfiguration( + OpenTelemetryConfiguration openTelemetryConfiguration) { + this.innerModel().withOpenTelemetryConfiguration(openTelemetryConfiguration); + return this; + } + public ManagedEnvironmentImpl withZoneRedundant(Boolean zoneRedundant) { this.innerModel().withZoneRedundant(zoneRedundant); return this; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStorageImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStorageImpl.java index dc5d0b9e1ee45..06812b119670a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStorageImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStorageImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorage; @@ -31,6 +32,10 @@ public ManagedEnvironmentStorageProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String resourceGroupName() { return resourceGroupName; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesClientImpl.java new file mode 100644 index 0000000000000..f9c18c51d1fa9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesClientImpl.java @@ -0,0 +1,342 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentUsagesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appcontainers.models.ListUsagesResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in ManagedEnvironmentUsagesClient. */ +public final class ManagedEnvironmentUsagesClientImpl implements ManagedEnvironmentUsagesClient { + /** The proxy service used to perform REST calls. */ + private final ManagedEnvironmentUsagesService service; + + /** The service client containing this operation class. */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of ManagedEnvironmentUsagesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ManagedEnvironmentUsagesClientImpl(ContainerAppsApiClientImpl client) { + this.service = + RestProxy + .create(ManagedEnvironmentUsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientManagedEnvironmentUsages to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface ManagedEnvironmentUsagesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/usages") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets the current usage information as well as the limits for environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current usage information as well as the limits for environment along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String environmentName) { + 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 (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + environmentName, + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the current usage information as well as the limits for environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current usage information as well as the limits for environment along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync( + String resourceGroupName, String environmentName, 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 (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + environmentName, + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets the current usage information as well as the limits for environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current usage information as well as the limits for environment as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String environmentName) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, environmentName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets the current usage information as well as the limits for environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current usage information as well as the limits for environment as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String environmentName, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(resourceGroupName, environmentName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the current usage information as well as the limits for environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current usage information as well as the limits for environment as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String environmentName) { + return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); + } + + /** + * Gets the current usage information as well as the limits for environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current usage information as well as the limits for environment as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String environmentName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesImpl.java new file mode 100644 index 0000000000000..32babed5c4df4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesImpl.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentUsagesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentUsages; +import com.azure.resourcemanager.appcontainers.models.Usage; + +public final class ManagedEnvironmentUsagesImpl implements ManagedEnvironmentUsages { + private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentUsagesImpl.class); + + private final ManagedEnvironmentUsagesClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public ManagedEnvironmentUsagesImpl( + ManagedEnvironmentUsagesClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String environmentName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName); + return Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String environmentName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName, context); + return Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); + } + + private ManagedEnvironmentUsagesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchCollectionImpl.java new file mode 100644 index 0000000000000..ed456f3fc9595 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchCollectionImpl.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.resourcemanager.appcontainers.fluent.models.PatchCollectionInner; +import com.azure.resourcemanager.appcontainers.fluent.models.PatchResourceInner; +import com.azure.resourcemanager.appcontainers.models.PatchCollection; +import com.azure.resourcemanager.appcontainers.models.PatchResource; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class PatchCollectionImpl implements PatchCollection { + private PatchCollectionInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + PatchCollectionImpl( + PatchCollectionInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public List value() { + List inner = this.innerModel().value(); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new PatchResourceImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + + public String nextLink() { + return this.innerModel().nextLink(); + } + + public PatchCollectionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchResourceImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchResourceImpl.java new file mode 100644 index 0000000000000..9bc814b83189c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchResourceImpl.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.fluent.models.PatchResourceInner; +import com.azure.resourcemanager.appcontainers.models.PatchProperties; +import com.azure.resourcemanager.appcontainers.models.PatchResource; + +public final class PatchResourceImpl implements PatchResource { + private PatchResourceInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + PatchResourceImpl( + PatchResourceInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public PatchProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public PatchResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchesClientImpl.java new file mode 100644 index 0000000000000..475ec63db061a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchesClientImpl.java @@ -0,0 +1,1225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.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.Post; +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.Response; +import com.azure.core.http.rest.RestProxy; +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.appcontainers.fluent.PatchesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.PatchCollectionInner; +import com.azure.resourcemanager.appcontainers.fluent.models.PatchResourceInner; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +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 PatchesClient. */ +public final class PatchesClientImpl implements PatchesClient { + /** The proxy service used to perform REST calls. */ + private final PatchesService service; + + /** The service client containing this operation class. */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of PatchesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + PatchesClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(PatchesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientPatches to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface PatchesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listByBuilderResource( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("builderName") String builderName, + @QueryParam("$filter") String filter, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> get( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("builderName") String builderName, + @PathParam("patchName") String patchName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Delete( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}") + @ExpectedResponses({200, 202, 204}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> delete( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("builderName") String builderName, + @PathParam("patchName") String patchName, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscription/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}/skipConfig") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> skipConfigure( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("builderName") String builderName, + @PathParam("patchName") String patchName, + @BodyParam("application/json") boolean patchSkipConfig, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/patches/{patchName}/apply") + @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> apply( + @HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("builderName") String builderName, + @PathParam("patchName") String patchName, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * List PatchResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param filter The filter to apply on the operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App SourceToCloud patch collection along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByBuilderResourceWithResponseAsync( + String resourceGroupName, String builderName, String filter) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .listByBuilderResource( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + filter, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List PatchResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param filter The filter to apply on the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App SourceToCloud patch collection along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByBuilderResourceWithResponseAsync( + String resourceGroupName, String builderName, String filter, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByBuilderResource( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + filter, + accept, + context); + } + + /** + * List PatchResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App SourceToCloud patch collection on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listByBuilderResourceAsync(String resourceGroupName, String builderName) { + final String filter = null; + return listByBuilderResourceWithResponseAsync(resourceGroupName, builderName, filter) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * List PatchResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param filter The filter to apply on the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App SourceToCloud patch collection along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listByBuilderResourceWithResponse( + String resourceGroupName, String builderName, String filter, Context context) { + return listByBuilderResourceWithResponseAsync(resourceGroupName, builderName, filter, context).block(); + } + + /** + * List PatchResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App SourceToCloud patch collection. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PatchCollectionInner listByBuilderResource(String resourceGroupName, String builderName) { + final String filter = null; + return listByBuilderResourceWithResponse(resourceGroupName, builderName, filter, Context.NONE).getValue(); + } + + /** + * Get details for specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details for specific patch by patch name along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String builderName, String patchName) { + 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (patchName == null) { + return Mono.error(new IllegalArgumentException("Parameter patchName 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, + builderName, + patchName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get details for specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details for specific patch by patch name along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync( + String resourceGroupName, String builderName, String patchName, 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (patchName == null) { + return Mono.error(new IllegalArgumentException("Parameter patchName 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, + builderName, + patchName, + accept, + context); + } + + /** + * Get details for specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details for specific patch by patch name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String builderName, String patchName) { + return getWithResponseAsync(resourceGroupName, builderName, patchName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get details for specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details for specific patch by patch name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String builderName, String patchName, Context context) { + return getWithResponseAsync(resourceGroupName, builderName, patchName, context).block(); + } + + /** + * Get details for specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details for specific patch by patch name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PatchResourceInner get(String resourceGroupName, String builderName, String patchName) { + return getWithResponse(resourceGroupName, builderName, patchName, Context.NONE).getValue(); + } + + /** + * Delete specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 builderName, String patchName) { + 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (patchName == null) { + return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + patchName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 builderName, String patchName, 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (patchName == null) { + return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .delete( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + patchName, + accept, + context); + } + + /** + * Delete specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 builderName, String patchName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, builderName, patchName); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Delete specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 builderName, String patchName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + deleteWithResponseAsync(resourceGroupName, builderName, patchName, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Delete specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is 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 builderName, String patchName) { + return this.beginDeleteAsync(resourceGroupName, builderName, patchName).getSyncPoller(); + } + + /** + * Delete specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is 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 builderName, String patchName, Context context) { + return this.beginDeleteAsync(resourceGroupName, builderName, patchName, context).getSyncPoller(); + } + + /** + * Delete specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 builderName, String patchName) { + return beginDeleteAsync(resourceGroupName, builderName, patchName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 builderName, String patchName, Context context) { + return beginDeleteAsync(resourceGroupName, builderName, patchName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 builderName, String patchName) { + deleteAsync(resourceGroupName, builderName, patchName).block(); + } + + /** + * Delete specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 builderName, String patchName, Context context) { + deleteAsync(resourceGroupName, builderName, patchName, context).block(); + } + + /** + * Configure the patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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>> skipConfigureWithResponseAsync( + String resourceGroupName, String builderName, String patchName, boolean patchSkipConfig) { + 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (patchName == null) { + return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .skipConfigure( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + patchName, + patchSkipConfig, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Configure the patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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>> skipConfigureWithResponseAsync( + String resourceGroupName, String builderName, String patchName, boolean patchSkipConfig, 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (patchName == null) { + return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .skipConfigure( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + patchName, + patchSkipConfig, + accept, + context); + } + + /** + * Configure the patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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> beginSkipConfigureAsync( + String resourceGroupName, String builderName, String patchName, boolean patchSkipConfig) { + Mono>> mono = + skipConfigureWithResponseAsync(resourceGroupName, builderName, patchName, patchSkipConfig); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + + /** + * Configure the patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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> beginSkipConfigureAsync( + String resourceGroupName, String builderName, String patchName, boolean patchSkipConfig, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + skipConfigureWithResponseAsync(resourceGroupName, builderName, patchName, patchSkipConfig, context); + return this + .client + .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + } + + /** + * Configure the patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is 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> beginSkipConfigure( + String resourceGroupName, String builderName, String patchName, boolean patchSkipConfig) { + return this.beginSkipConfigureAsync(resourceGroupName, builderName, patchName, patchSkipConfig).getSyncPoller(); + } + + /** + * Configure the patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is 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> beginSkipConfigure( + String resourceGroupName, String builderName, String patchName, boolean patchSkipConfig, Context context) { + return this + .beginSkipConfigureAsync(resourceGroupName, builderName, patchName, patchSkipConfig, context) + .getSyncPoller(); + } + + /** + * Configure the patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 skipConfigureAsync( + String resourceGroupName, String builderName, String patchName, boolean patchSkipConfig) { + return beginSkipConfigureAsync(resourceGroupName, builderName, patchName, patchSkipConfig) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Configure the patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 skipConfigureAsync( + String resourceGroupName, String builderName, String patchName, boolean patchSkipConfig, Context context) { + return beginSkipConfigureAsync(resourceGroupName, builderName, patchName, patchSkipConfig, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Configure the patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 skipConfigure(String resourceGroupName, String builderName, String patchName, boolean patchSkipConfig) { + skipConfigureAsync(resourceGroupName, builderName, patchName, patchSkipConfig).block(); + } + + /** + * Configure the patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 skipConfigure( + String resourceGroupName, String builderName, String patchName, boolean patchSkipConfig, Context context) { + skipConfigureAsync(resourceGroupName, builderName, patchName, patchSkipConfig, context).block(); + } + + /** + * Apply a PatchResource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Patch along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> applyWithResponseAsync( + String resourceGroupName, String builderName, String patchName) { + 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (patchName == null) { + return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .apply( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + patchName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Apply a PatchResource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Patch along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> applyWithResponseAsync( + String resourceGroupName, String builderName, String patchName, 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 (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (patchName == null) { + return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .apply( + this.client.getEndpoint(), + this.client.getApiVersion(), + this.client.getSubscriptionId(), + resourceGroupName, + builderName, + patchName, + accept, + context); + } + + /** + * Apply a PatchResource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 container App Patch. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PatchResourceInner> beginApplyAsync( + String resourceGroupName, String builderName, String patchName) { + Mono>> mono = applyWithResponseAsync(resourceGroupName, builderName, patchName); + return this + .client + .getLroResult( + mono, + this.client.getHttpPipeline(), + PatchResourceInner.class, + PatchResourceInner.class, + this.client.getContext()); + } + + /** + * Apply a PatchResource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 container App Patch. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PatchResourceInner> beginApplyAsync( + String resourceGroupName, String builderName, String patchName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = + applyWithResponseAsync(resourceGroupName, builderName, patchName, context); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), PatchResourceInner.class, PatchResourceInner.class, context); + } + + /** + * Apply a PatchResource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of container App Patch. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PatchResourceInner> beginApply( + String resourceGroupName, String builderName, String patchName) { + return this.beginApplyAsync(resourceGroupName, builderName, patchName).getSyncPoller(); + } + + /** + * Apply a PatchResource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of container App Patch. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PatchResourceInner> beginApply( + String resourceGroupName, String builderName, String patchName, Context context) { + return this.beginApplyAsync(resourceGroupName, builderName, patchName, context).getSyncPoller(); + } + + /** + * Apply a PatchResource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Patch on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono applyAsync(String resourceGroupName, String builderName, String patchName) { + return beginApplyAsync(resourceGroupName, builderName, patchName) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Apply a PatchResource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Patch on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono applyAsync( + String resourceGroupName, String builderName, String patchName, Context context) { + return beginApplyAsync(resourceGroupName, builderName, patchName, context) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Apply a PatchResource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Patch. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PatchResourceInner apply(String resourceGroupName, String builderName, String patchName) { + return applyAsync(resourceGroupName, builderName, patchName).block(); + } + + /** + * Apply a PatchResource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Patch. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PatchResourceInner apply(String resourceGroupName, String builderName, String patchName, Context context) { + return applyAsync(resourceGroupName, builderName, patchName, context).block(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchesImpl.java new file mode 100644 index 0000000000000..11c377d3b21de --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PatchesImpl.java @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.PatchesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.PatchCollectionInner; +import com.azure.resourcemanager.appcontainers.fluent.models.PatchResourceInner; +import com.azure.resourcemanager.appcontainers.models.PatchCollection; +import com.azure.resourcemanager.appcontainers.models.PatchResource; +import com.azure.resourcemanager.appcontainers.models.Patches; + +public final class PatchesImpl implements Patches { + private static final ClientLogger LOGGER = new ClientLogger(PatchesImpl.class); + + private final PatchesClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public PatchesImpl( + PatchesClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response listByBuilderResourceWithResponse( + String resourceGroupName, String builderName, String filter, Context context) { + Response inner = + this.serviceClient().listByBuilderResourceWithResponse(resourceGroupName, builderName, filter, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PatchCollectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PatchCollection listByBuilderResource(String resourceGroupName, String builderName) { + PatchCollectionInner inner = this.serviceClient().listByBuilderResource(resourceGroupName, builderName); + if (inner != null) { + return new PatchCollectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getWithResponse( + String resourceGroupName, String builderName, String patchName, Context context) { + Response inner = + this.serviceClient().getWithResponse(resourceGroupName, builderName, patchName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new PatchResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PatchResource get(String resourceGroupName, String builderName, String patchName) { + PatchResourceInner inner = this.serviceClient().get(resourceGroupName, builderName, patchName); + if (inner != null) { + return new PatchResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String builderName, String patchName) { + this.serviceClient().delete(resourceGroupName, builderName, patchName); + } + + public void delete(String resourceGroupName, String builderName, String patchName, Context context) { + this.serviceClient().delete(resourceGroupName, builderName, patchName, context); + } + + public void skipConfigure(String resourceGroupName, String builderName, String patchName, boolean patchSkipConfig) { + this.serviceClient().skipConfigure(resourceGroupName, builderName, patchName, patchSkipConfig); + } + + public void skipConfigure( + String resourceGroupName, String builderName, String patchName, boolean patchSkipConfig, Context context) { + this.serviceClient().skipConfigure(resourceGroupName, builderName, patchName, patchSkipConfig, context); + } + + public PatchResource apply(String resourceGroupName, String builderName, String patchName) { + PatchResourceInner inner = this.serviceClient().apply(resourceGroupName, builderName, patchName); + if (inner != null) { + return new PatchResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public PatchResource apply(String resourceGroupName, String builderName, String patchName, Context context) { + PatchResourceInner inner = this.serviceClient().apply(resourceGroupName, builderName, patchName, context); + if (inner != null) { + return new PatchResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + private PatchesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaImpl.java index 89ccdf824e2c5..a9bb940437705 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; import com.azure.resourcemanager.appcontainers.models.ContainerAppReplicaRunningState; import com.azure.resourcemanager.appcontainers.models.Replica; @@ -35,6 +36,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public OffsetDateTime createdTime() { return this.innerModel().createdTime(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersClientImpl.java index 02ade665b7195..f240ddda480a6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersClientImpl.java @@ -11,6 +11,7 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -65,6 +66,17 @@ Mono> jobExecution( @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({"Content-Type: application/json"}) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.App/getCustomDomainVerificationId") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getCustomDomainVerificationId( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); } /** @@ -224,4 +236,114 @@ public Response jobExecutionWithResponse( public JobExecutionInner jobExecution(String resourceGroupName, String jobName, String jobExecutionName) { return jobExecutionWithResponse(resourceGroupName, jobName, jobExecutionName, Context.NONE).getValue(); } + + /** + * Get the verification id of a subscription used for verifying custom domains. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the verification id of a subscription used for verifying custom domains along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getCustomDomainVerificationIdWithResponseAsync() { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .getCustomDomainVerificationId( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the verification id of a subscription used for verifying custom domains. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the verification id of a subscription used for verifying custom domains along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getCustomDomainVerificationIdWithResponseAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getCustomDomainVerificationId( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get the verification id of a subscription used for verifying custom domains. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the verification id of a subscription used for verifying custom domains on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getCustomDomainVerificationIdAsync() { + return getCustomDomainVerificationIdWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the verification id of a subscription used for verifying custom domains. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the verification id of a subscription used for verifying custom domains along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getCustomDomainVerificationIdWithResponse(Context context) { + return getCustomDomainVerificationIdWithResponseAsync(context).block(); + } + + /** + * Get the verification id of a subscription used for verifying custom domains. + * + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the verification id of a subscription used for verifying custom domains. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public String getCustomDomainVerificationId() { + return getCustomDomainVerificationIdWithResponse(Context.NONE).getValue(); + } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersImpl.java index fcec09b561bf8..467f930583ed1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersImpl.java @@ -51,6 +51,14 @@ public JobExecution jobExecution(String resourceGroupName, String jobName, Strin } } + public Response getCustomDomainVerificationIdWithResponse(Context context) { + return this.serviceClient().getCustomDomainVerificationIdWithResponse(context); + } + + public String getCustomDomainVerificationId() { + return this.serviceClient().getCustomDomainVerificationId(); + } + private ResourceProvidersClient serviceClient() { return this.innerClient; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.java index e56a7cd26d093..cdc5e901abdfd 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; import com.azure.resourcemanager.appcontainers.models.Revision; import com.azure.resourcemanager.appcontainers.models.RevisionHealthState; @@ -35,6 +36,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public OffsetDateTime createdTime() { return this.innerModel().createdTime(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SourceControlImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SourceControlImpl.java index 20efb9b6dd7fc..87912df4a417f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SourceControlImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SourceControlImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; @@ -27,6 +28,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public SourceControlOperationState operationState() { return this.innerModel().operationState(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsageImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsageImpl.java new file mode 100644 index 0000000000000..9af23c3f054ff --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsageImpl.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; +import com.azure.resourcemanager.appcontainers.models.Usage; +import com.azure.resourcemanager.appcontainers.models.UsageName; + +public final class UsageImpl implements Usage { + private UsageInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + UsageImpl(UsageInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String unit() { + return this.innerModel().unit(); + } + + public int currentValue() { + return this.innerModel().currentValue(); + } + + public long limit() { + return this.innerModel().limit(); + } + + public UsageName name() { + return this.innerModel().name(); + } + + public UsageInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesClientImpl.java new file mode 100644 index 0000000000000..b66cfa70f19c2 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesClientImpl.java @@ -0,0 +1,316 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.UsagesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appcontainers.models.ListUsagesResult; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in UsagesClient. */ +public final class UsagesClientImpl implements UsagesClient { + /** The proxy service used to perform REST calls. */ + private final UsagesService service; + + /** The service client containing this operation class. */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of UsagesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + UsagesClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(UsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientUsages to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface UsagesService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/usages") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> list( + @HostParam("$host") String endpoint, + @PathParam("location") String location, + @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Gets, for the specified location, the current resource usage information as well as the limits under the + * subscription. + * + * @param location The location for which resource usage is queried. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .list( + this.client.getEndpoint(), + location, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context)) + .>map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets, for the specified location, the current resource usage information as well as the limits under the + * subscription. + * + * @param location The location for which resource usage is queried. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list( + this.client.getEndpoint(), + location, + this.client.getSubscriptionId(), + this.client.getApiVersion(), + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Gets, for the specified location, the current resource usage information as well as the limits under the + * subscription. + * + * @param location The location for which resource usage is queried. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location) { + return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets, for the specified location, the current resource usage information as well as the limits under the + * subscription. + * + * @param location The location for which resource usage is queried. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location, Context context) { + return new PagedFlux<>( + () -> listSinglePageAsync(location, context), nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets, for the specified location, the current resource usage information as well as the limits under the + * subscription. + * + * @param location The location for which resource usage is queried. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location) { + return new PagedIterable<>(listAsync(location)); + } + + /** + * Gets, for the specified location, the current resource usage information as well as the limits under the + * subscription. + * + * @param location The location for which resource usage is queried. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location, Context context) { + return new PagedIterable<>(listAsync(location, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesImpl.java new file mode 100644 index 0000000000000..37478ffe57a84 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.UsagesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; +import com.azure.resourcemanager.appcontainers.models.Usage; +import com.azure.resourcemanager.appcontainers.models.Usages; + +public final class UsagesImpl implements Usages { + private static final ClientLogger LOGGER = new ClientLogger(UsagesImpl.class); + + private final UsagesClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public UsagesImpl( + UsagesClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String location) { + PagedIterable inner = this.serviceClient().list(location); + return Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); + } + + public PagedIterable list(String location, Context context) { + PagedIterable inner = this.serviceClient().list(location, context); + return Utils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); + } + + private UsagesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkloadProfileStatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkloadProfileStatesImpl.java index 8e91506dd4319..d53fda0bcb69b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkloadProfileStatesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkloadProfileStatesImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStates; import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; @@ -36,6 +37,10 @@ public WorkloadProfileStatesProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public WorkloadProfileStatesInner innerModel() { return this.innerObject; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppInsightsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppInsightsConfiguration.java new file mode 100644 index 0000000000000..53922882495d2 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppInsightsConfiguration.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Configuration of Application Insights. */ +@Fluent +public final class AppInsightsConfiguration { + /* + * Application Insights connection string + */ + @JsonProperty(value = "connectionString") + private String connectionString; + + /** Creates an instance of AppInsightsConfiguration class. */ + public AppInsightsConfiguration() { + } + + /** + * Get the connectionString property: Application Insights connection string. + * + * @return the connectionString value. + */ + public String connectionString() { + return this.connectionString; + } + + /** + * Set the connectionString property: Application Insights connection string. + * + * @param connectionString the connectionString value to set. + * @return the AppInsightsConfiguration object itself. + */ + public AppInsightsConfiguration withConnectionString(String connectionString) { + this.connectionString = connectionString; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfig.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfig.java index 9f83b649744db..f1b43d4e421a8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfig.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfig.java @@ -78,6 +78,14 @@ public interface AuthConfig { */ HttpSettings httpSettings(); + /** + * Gets the encryptionSettings property: The configuration settings of the secrets references of encryption key and + * signing key for ContainerApp Service Authentication/Authorization. + * + * @return the encryptionSettings value. + */ + EncryptionSettings encryptionSettings(); + /** * Gets the name of the resource group. * @@ -124,7 +132,8 @@ interface WithCreate DefinitionStages.WithGlobalValidation, DefinitionStages.WithIdentityProviders, DefinitionStages.WithLogin, - DefinitionStages.WithHttpSettings { + DefinitionStages.WithHttpSettings, + DefinitionStages.WithEncryptionSettings { /** * Executes the create request. * @@ -205,6 +214,19 @@ interface WithHttpSettings { */ WithCreate withHttpSettings(HttpSettings httpSettings); } + + /** The stage of the AuthConfig definition allowing to specify encryptionSettings. */ + interface WithEncryptionSettings { + /** + * Specifies the encryptionSettings property: The configuration settings of the secrets references of + * encryption key and signing key for ContainerApp Service Authentication/Authorization.. + * + * @param encryptionSettings The configuration settings of the secrets references of encryption key and + * signing key for ContainerApp Service Authentication/Authorization. + * @return the next definition stage. + */ + WithCreate withEncryptionSettings(EncryptionSettings encryptionSettings); + } } /** @@ -220,7 +242,8 @@ interface Update UpdateStages.WithGlobalValidation, UpdateStages.WithIdentityProviders, UpdateStages.WithLogin, - UpdateStages.WithHttpSettings { + UpdateStages.WithHttpSettings, + UpdateStages.WithEncryptionSettings { /** * Executes the update request. * @@ -303,6 +326,19 @@ interface WithHttpSettings { */ Update withHttpSettings(HttpSettings httpSettings); } + + /** The stage of the AuthConfig update allowing to specify encryptionSettings. */ + interface WithEncryptionSettings { + /** + * Specifies the encryptionSettings property: The configuration settings of the secrets references of + * encryption key and signing key for ContainerApp Service Authentication/Authorization.. + * + * @param encryptionSettings The configuration settings of the secrets references of encryption key and + * signing key for ContainerApp Service Authentication/Authorization. + * @return the next definition stage. + */ + Update withEncryptionSettings(EncryptionSettings encryptionSettings); + } } /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfile.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfile.java index 9d2d444694b5d..f3a46738f9df1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfile.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfile.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; /** An immutable client-side representation of AvailableWorkloadProfile. */ @@ -43,6 +44,13 @@ public interface AvailableWorkloadProfile { */ AvailableWorkloadProfileProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner object. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfileProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfileProperties.java index 2960060ee3cfa..f28afc52ab6c5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfileProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfileProperties.java @@ -34,6 +34,12 @@ public final class AvailableWorkloadProfileProperties { @JsonProperty(value = "memoryGiB") private Integer memoryGiB; + /* + * Number of GPUs. + */ + @JsonProperty(value = "gpus") + private Integer gpus; + /* * The everyday name of the workload profile. */ @@ -124,6 +130,26 @@ public AvailableWorkloadProfileProperties withMemoryGiB(Integer memoryGiB) { return this; } + /** + * Get the gpus property: Number of GPUs. + * + * @return the gpus value. + */ + public Integer gpus() { + return this.gpus; + } + + /** + * Set the gpus property: Number of GPUs. + * + * @param gpus the gpus value to set. + * @return the AvailableWorkloadProfileProperties object itself. + */ + public AvailableWorkloadProfileProperties withGpus(Integer gpus) { + this.gpus = gpus; + return this; + } + /** * Get the displayName property: The everyday name of the workload profile. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.java index 6e78ff4210160..6de3c755721c5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.fasterxml.jackson.annotation.JsonProperty; /** Billing meter. */ @@ -23,6 +24,12 @@ public final class BillingMeter extends ProxyResource { @JsonProperty(value = "properties") private BillingMeterProperties properties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + /** Creates an instance of BillingMeter class. */ public BillingMeter() { } @@ -67,6 +74,15 @@ public BillingMeter withProperties(BillingMeterProperties properties) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BlobStorageTokenStore.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BlobStorageTokenStore.java new file mode 100644 index 0000000000000..65d2574e2dd0f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BlobStorageTokenStore.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the storage of the tokens if blob storage is used. */ +@Fluent +public final class BlobStorageTokenStore { + /* + * The name of the app secrets containing the SAS URL of the blob storage containing the tokens. + */ + @JsonProperty(value = "sasUrlSettingName", required = true) + private String sasUrlSettingName; + + /** Creates an instance of BlobStorageTokenStore class. */ + public BlobStorageTokenStore() { + } + + /** + * Get the sasUrlSettingName property: The name of the app secrets containing the SAS URL of the blob storage + * containing the tokens. + * + * @return the sasUrlSettingName value. + */ + public String sasUrlSettingName() { + return this.sasUrlSettingName; + } + + /** + * Set the sasUrlSettingName property: The name of the app secrets containing the SAS URL of the blob storage + * containing the tokens. + * + * @param sasUrlSettingName the sasUrlSettingName value to set. + * @return the BlobStorageTokenStore object itself. + */ + public BlobStorageTokenStore withSasUrlSettingName(String sasUrlSettingName) { + this.sasUrlSettingName = sasUrlSettingName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sasUrlSettingName() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property sasUrlSettingName in model BlobStorageTokenStore")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BlobStorageTokenStore.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildCollection.java new file mode 100644 index 0000000000000..37fa974c73747 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildCollection.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a BuildResource list operation. */ +@Fluent +public final class BuildCollection { + /* + * The BuildResource items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of BuildCollection class. */ + public BuildCollection() { + } + + /** + * Get the value property: The BuildResource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The BuildResource items on this page. + * + * @param value the value value to set. + * @return the BuildCollection object itself. + */ + public BuildCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the BuildCollection object itself. + */ + public BuildCollection withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property value in model BuildCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BuildCollection.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildConfiguration.java new file mode 100644 index 0000000000000..c624e165a3560 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildConfiguration.java @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Configuration of the build. */ +@Fluent +public final class BuildConfiguration { + /* + * Base OS used to build and run the app. + */ + @JsonProperty(value = "baseOs") + private String baseOs; + + /* + * Platform to be used to build and run the app. + */ + @JsonProperty(value = "platform") + private String platform; + + /* + * Platform version to be used to build and run the app. + */ + @JsonProperty(value = "platformVersion") + private String platformVersion; + + /* + * List of environment variables to be passed to the build and application runtime. + */ + @JsonProperty(value = "environmentVariables") + private List environmentVariables; + + /* + * List of steps to perform before the build. + */ + @JsonProperty(value = "preBuildSteps") + private List preBuildSteps; + + /** Creates an instance of BuildConfiguration class. */ + public BuildConfiguration() { + } + + /** + * Get the baseOs property: Base OS used to build and run the app. + * + * @return the baseOs value. + */ + public String baseOs() { + return this.baseOs; + } + + /** + * Set the baseOs property: Base OS used to build and run the app. + * + * @param baseOs the baseOs value to set. + * @return the BuildConfiguration object itself. + */ + public BuildConfiguration withBaseOs(String baseOs) { + this.baseOs = baseOs; + return this; + } + + /** + * Get the platform property: Platform to be used to build and run the app. + * + * @return the platform value. + */ + public String platform() { + return this.platform; + } + + /** + * Set the platform property: Platform to be used to build and run the app. + * + * @param platform the platform value to set. + * @return the BuildConfiguration object itself. + */ + public BuildConfiguration withPlatform(String platform) { + this.platform = platform; + return this; + } + + /** + * Get the platformVersion property: Platform version to be used to build and run the app. + * + * @return the platformVersion value. + */ + public String platformVersion() { + return this.platformVersion; + } + + /** + * Set the platformVersion property: Platform version to be used to build and run the app. + * + * @param platformVersion the platformVersion value to set. + * @return the BuildConfiguration object itself. + */ + public BuildConfiguration withPlatformVersion(String platformVersion) { + this.platformVersion = platformVersion; + return this; + } + + /** + * Get the environmentVariables property: List of environment variables to be passed to the build and application + * runtime. + * + * @return the environmentVariables value. + */ + public List environmentVariables() { + return this.environmentVariables; + } + + /** + * Set the environmentVariables property: List of environment variables to be passed to the build and application + * runtime. + * + * @param environmentVariables the environmentVariables value to set. + * @return the BuildConfiguration object itself. + */ + public BuildConfiguration withEnvironmentVariables(List environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + /** + * Get the preBuildSteps property: List of steps to perform before the build. + * + * @return the preBuildSteps value. + */ + public List preBuildSteps() { + return this.preBuildSteps; + } + + /** + * Set the preBuildSteps property: List of steps to perform before the build. + * + * @param preBuildSteps the preBuildSteps value to set. + * @return the BuildConfiguration object itself. + */ + public BuildConfiguration withPreBuildSteps(List preBuildSteps) { + this.preBuildSteps = preBuildSteps; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (environmentVariables() != null) { + environmentVariables().forEach(e -> e.validate()); + } + if (preBuildSteps() != null) { + preBuildSteps().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildProvisioningState.java new file mode 100644 index 0000000000000..70233a6726148 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildProvisioningState.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Resource instance provisioning state. */ +public final class BuildProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for BuildProvisioningState. */ + public static final BuildProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for BuildProvisioningState. */ + public static final BuildProvisioningState FAILED = fromString("Failed"); + + /** Static value Canceled for BuildProvisioningState. */ + public static final BuildProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Creating for BuildProvisioningState. */ + public static final BuildProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for BuildProvisioningState. */ + public static final BuildProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for BuildProvisioningState. */ + public static final BuildProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates a new instance of BuildProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BuildProvisioningState() { + } + + /** + * Creates or finds a BuildProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding BuildProvisioningState. + */ + @JsonCreator + public static BuildProvisioningState fromString(String name) { + return fromString(name, BuildProvisioningState.class); + } + + /** + * Gets known BuildProvisioningState values. + * + * @return known BuildProvisioningState values. + */ + public static Collection values() { + return values(BuildProvisioningState.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildResource.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildResource.java new file mode 100644 index 0000000000000..418ec94a43ab6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildResource.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; + +/** An immutable client-side representation of BuildResource. */ +public interface BuildResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: Build provisioning state. + * + * @return the provisioningState value. + */ + BuildProvisioningState provisioningState(); + + /** + * Gets the buildStatus property: Status of the build once it has been provisioned. + * + * @return the buildStatus value. + */ + BuildStatus buildStatus(); + + /** + * Gets the destinationContainerRegistry property: Container registry that the final image will be uploaded to. + * + * @return the destinationContainerRegistry value. + */ + ContainerRegistryWithCustomImage destinationContainerRegistry(); + + /** + * Gets the configuration property: Configuration of the build. + * + * @return the configuration value. + */ + BuildConfiguration configuration(); + + /** + * Gets the uploadEndpoint property: Endpoint to which the source code should be uploaded. + * + * @return the uploadEndpoint value. + */ + String uploadEndpoint(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner object. + * + * @return the inner object. + */ + BuildResourceInner innerModel(); + + /** The entirety of the BuildResource definition. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** The BuildResource definition stages. */ + interface DefinitionStages { + /** The first stage of the BuildResource definition. */ + interface Blank extends WithParentResource { + } + + /** The stage of the BuildResource definition allowing to specify parent resource. */ + interface WithParentResource { + /** + * Specifies resourceGroupName, builderName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @return the next definition stage. + */ + WithCreate withExistingBuilder(String resourceGroupName, String builderName); + } + + /** + * The stage of the BuildResource definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithDestinationContainerRegistry, DefinitionStages.WithConfiguration { + /** + * Executes the create request. + * + * @return the created resource. + */ + BuildResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + BuildResource create(Context context); + } + + /** The stage of the BuildResource definition allowing to specify destinationContainerRegistry. */ + interface WithDestinationContainerRegistry { + /** + * Specifies the destinationContainerRegistry property: Container registry that the final image will be + * uploaded to.. + * + * @param destinationContainerRegistry Container registry that the final image will be uploaded to. + * @return the next definition stage. + */ + WithCreate withDestinationContainerRegistry(ContainerRegistryWithCustomImage destinationContainerRegistry); + } + + /** The stage of the BuildResource definition allowing to specify configuration. */ + interface WithConfiguration { + /** + * Specifies the configuration property: Configuration of the build.. + * + * @param configuration Configuration of the build. + * @return the next definition stage. + */ + WithCreate withConfiguration(BuildConfiguration configuration); + } + } + + /** + * Begins update for the BuildResource resource. + * + * @return the stage of resource update. + */ + BuildResource.Update update(); + + /** The template for BuildResource update. */ + interface Update extends UpdateStages.WithDestinationContainerRegistry, UpdateStages.WithConfiguration { + /** + * Executes the update request. + * + * @return the updated resource. + */ + BuildResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + BuildResource apply(Context context); + } + + /** The BuildResource update stages. */ + interface UpdateStages { + /** The stage of the BuildResource update allowing to specify destinationContainerRegistry. */ + interface WithDestinationContainerRegistry { + /** + * Specifies the destinationContainerRegistry property: Container registry that the final image will be + * uploaded to.. + * + * @param destinationContainerRegistry Container registry that the final image will be uploaded to. + * @return the next definition stage. + */ + Update withDestinationContainerRegistry(ContainerRegistryWithCustomImage destinationContainerRegistry); + } + + /** The stage of the BuildResource update allowing to specify configuration. */ + interface WithConfiguration { + /** + * Specifies the configuration property: Configuration of the build.. + * + * @param configuration Configuration of the build. + * @return the next definition stage. + */ + Update withConfiguration(BuildConfiguration configuration); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + BuildResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + BuildResource refresh(Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildStatus.java new file mode 100644 index 0000000000000..63fd93811b54b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildStatus.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Status of the build once it has been provisioned. */ +public final class BuildStatus extends ExpandableStringEnum { + /** Static value NotStarted for BuildStatus. */ + public static final BuildStatus NOT_STARTED = fromString("NotStarted"); + + /** Static value InProgress for BuildStatus. */ + public static final BuildStatus IN_PROGRESS = fromString("InProgress"); + + /** Static value Succeeded for BuildStatus. */ + public static final BuildStatus SUCCEEDED = fromString("Succeeded"); + + /** Static value Canceled for BuildStatus. */ + public static final BuildStatus CANCELED = fromString("Canceled"); + + /** Static value Failed for BuildStatus. */ + public static final BuildStatus FAILED = fromString("Failed"); + + /** + * Creates a new instance of BuildStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BuildStatus() { + } + + /** + * Creates or finds a BuildStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding BuildStatus. + */ + @JsonCreator + public static BuildStatus fromString(String name) { + return fromString(name, BuildStatus.class); + } + + /** + * Gets known BuildStatus values. + * + * @return known BuildStatus values. + */ + public static Collection values() { + return values(BuildStatus.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderCollection.java new file mode 100644 index 0000000000000..269eeda0c18ec --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderCollection.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The response of a BuilderResource list operation. */ +@Fluent +public final class BuilderCollection { + /* + * The BuilderResource items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of BuilderCollection class. */ + public BuilderCollection() { + } + + /** + * Get the value property: The BuilderResource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The BuilderResource items on this page. + * + * @param value the value value to set. + * @return the BuilderCollection object itself. + */ + public BuilderCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the BuilderCollection object itself. + */ + public BuilderCollection withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property value in model BuilderCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BuilderCollection.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderProvisioningState.java new file mode 100644 index 0000000000000..001dc9b2ffba5 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderProvisioningState.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Resource instance provisioning state. */ +public final class BuilderProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for BuilderProvisioningState. */ + public static final BuilderProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for BuilderProvisioningState. */ + public static final BuilderProvisioningState FAILED = fromString("Failed"); + + /** Static value Canceled for BuilderProvisioningState. */ + public static final BuilderProvisioningState CANCELED = fromString("Canceled"); + + /** Static value Creating for BuilderProvisioningState. */ + public static final BuilderProvisioningState CREATING = fromString("Creating"); + + /** Static value Updating for BuilderProvisioningState. */ + public static final BuilderProvisioningState UPDATING = fromString("Updating"); + + /** Static value Deleting for BuilderProvisioningState. */ + public static final BuilderProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates a new instance of BuilderProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BuilderProvisioningState() { + } + + /** + * Creates or finds a BuilderProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding BuilderProvisioningState. + */ + @JsonCreator + public static BuilderProvisioningState fromString(String name) { + return fromString(name, BuilderProvisioningState.class); + } + + /** + * Gets known BuilderProvisioningState values. + * + * @return known BuilderProvisioningState values. + */ + public static Collection values() { + return values(BuilderProvisioningState.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResource.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResource.java new file mode 100644 index 0000000000000..291899ea04110 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResource.java @@ -0,0 +1,309 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; +import java.util.List; +import java.util.Map; + +/** An immutable client-side representation of BuilderResource. */ +public interface BuilderResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: Provisioning state of a builder resource. + * + * @return the provisioningState value. + */ + BuilderProvisioningState provisioningState(); + + /** + * Gets the environmentId property: Resource ID of the container apps environment that the builder is associated + * with. + * + * @return the environmentId value. + */ + String environmentId(); + + /** + * Gets the containerRegistries property: List of mappings of container registries and the managed identity used to + * connect to it. + * + * @return the containerRegistries value. + */ + List containerRegistries(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner object. + * + * @return the inner object. + */ + BuilderResourceInner innerModel(); + + /** The entirety of the BuilderResource definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + + /** The BuilderResource definition stages. */ + interface DefinitionStages { + /** The first stage of the BuilderResource definition. */ + interface Blank extends WithLocation { + } + + /** The stage of the BuilderResource definition allowing to specify location. */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** The stage of the BuilderResource definition allowing to specify parent resource. */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the BuilderResource definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithTags, + DefinitionStages.WithIdentity, + DefinitionStages.WithEnvironmentId, + DefinitionStages.WithContainerRegistries { + /** + * Executes the create request. + * + * @return the created resource. + */ + BuilderResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + BuilderResource create(Context context); + } + + /** The stage of the BuilderResource definition allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** The stage of the BuilderResource definition allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + + /** The stage of the BuilderResource definition allowing to specify environmentId. */ + interface WithEnvironmentId { + /** + * Specifies the environmentId property: Resource ID of the container apps environment that the builder is + * associated with.. + * + * @param environmentId Resource ID of the container apps environment that the builder is associated with. + * @return the next definition stage. + */ + WithCreate withEnvironmentId(String environmentId); + } + + /** The stage of the BuilderResource definition allowing to specify containerRegistries. */ + interface WithContainerRegistries { + /** + * Specifies the containerRegistries property: List of mappings of container registries and the managed + * identity used to connect to it.. + * + * @param containerRegistries List of mappings of container registries and the managed identity used to + * connect to it. + * @return the next definition stage. + */ + WithCreate withContainerRegistries(List containerRegistries); + } + } + + /** + * Begins update for the BuilderResource resource. + * + * @return the stage of resource update. + */ + BuilderResource.Update update(); + + /** The template for BuilderResource update. */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithEnvironmentId { + /** + * Executes the update request. + * + * @return the updated resource. + */ + BuilderResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + BuilderResource apply(Context context); + } + + /** The BuilderResource update stages. */ + interface UpdateStages { + /** The stage of the BuilderResource update allowing to specify tags. */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** The stage of the BuilderResource update allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentity identity); + } + + /** The stage of the BuilderResource update allowing to specify environmentId. */ + interface WithEnvironmentId { + /** + * Specifies the environmentId property: Resource ID of the container apps environment that the builder is + * associated with.. + * + * @param environmentId Resource ID of the container apps environment that the builder is associated with. + * @return the next definition stage. + */ + Update withEnvironmentId(String environmentId); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + BuilderResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + BuilderResource refresh(Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResourceUpdate.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResourceUpdate.java new file mode 100644 index 0000000000000..82b6e9cbb23da --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResourceUpdate.java @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceUpdateProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** The type used for update operations of the BuilderResource. */ +@Fluent +public final class BuilderResourceUpdate { + /* + * The managed service identities assigned to this resource. + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * The updatable properties of the BuilderResource. + */ + @JsonProperty(value = "properties") + private BuilderResourceUpdateProperties innerProperties; + + /** Creates an instance of BuilderResourceUpdate class. */ + public BuilderResourceUpdate() { + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the BuilderResourceUpdate object itself. + */ + public BuilderResourceUpdate withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the BuilderResourceUpdate object itself. + */ + public BuilderResourceUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the innerProperties property: The updatable properties of the BuilderResource. + * + * @return the innerProperties value. + */ + private BuilderResourceUpdateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the environmentId property: Resource ID of the container apps environment that the builder is associated + * with. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.innerProperties() == null ? null : this.innerProperties().environmentId(); + } + + /** + * Set the environmentId property: Resource ID of the container apps environment that the builder is associated + * with. + * + * @param environmentId the environmentId value to set. + * @return the BuilderResourceUpdate object itself. + */ + public BuilderResourceUpdate withEnvironmentId(String environmentId) { + if (this.innerProperties() == null) { + this.innerProperties = new BuilderResourceUpdateProperties(); + } + this.innerProperties().withEnvironmentId(environmentId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builders.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builders.java new file mode 100644 index 0000000000000..ca7fe0f0e3a72 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builders.java @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of Builders. */ +public interface Builders { + /** + * List BuilderResource resources by subscription ID. + * + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List BuilderResource resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * List BuilderResource resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List BuilderResource resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource along with {@link Response}. + */ + Response getByResourceGroupWithResponse( + String resourceGroupName, String builderName, Context context); + + /** + * Get a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource. + */ + BuilderResource getByResourceGroup(String resourceGroupName, String builderName); + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String builderName); + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String builderName, Context context); + + /** + * Get a BuilderResource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource along with {@link Response}. + */ + BuilderResource getById(String id); + + /** + * Get a BuilderResource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a BuilderResource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a BuilderResource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new BuilderResource resource. + * + * @param name resource name. + * @return the first stage of the new BuilderResource definition. + */ + BuilderResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builds.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builds.java new file mode 100644 index 0000000000000..11654dbc27521 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builds.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of Builds. */ +public interface Builds { + /** + * List BuildResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByBuilderResource(String resourceGroupName, String builderName); + + /** + * List BuildResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByBuilderResource(String resourceGroupName, String builderName, Context context); + + /** + * Get a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String builderName, String buildName, Context context); + + /** + * Get a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource. + */ + BuildResource get(String resourceGroupName, String builderName, String buildName); + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String builderName, String buildName); + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String builderName, String buildName, Context context); + + /** + * Get a BuildResource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource along with {@link Response}. + */ + BuildResource getById(String id); + + /** + * Get a BuildResource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a BuildResource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a BuildResource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new BuildResource resource. + * + * @param name resource name. + * @return the first stage of the new BuildResource definition. + */ + BuildResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java index efc126b11fcb1..567dbb7dd01e7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java @@ -79,6 +79,12 @@ public final class CertificateProperties { @JsonProperty(value = "publicKeyHash", access = JsonProperty.Access.WRITE_ONLY) private String publicKeyHash; + /* + * The type of the certificate. Allowed values are `ServerSSLCertificate` and `ImagePullTrustedCA` + */ + @JsonProperty(value = "type") + private CertificateType type; + /** Creates an instance of CertificateProperties class. */ public CertificateProperties() { } @@ -204,6 +210,28 @@ public String publicKeyHash() { return this.publicKeyHash; } + /** + * Get the type property: The type of the certificate. Allowed values are `ServerSSLCertificate` and + * `ImagePullTrustedCA`. + * + * @return the type value. + */ + public CertificateType type() { + return this.type; + } + + /** + * Set the type property: The type of the certificate. Allowed values are `ServerSSLCertificate` and + * `ImagePullTrustedCA`. + * + * @param type the type value to set. + * @return the CertificateProperties object itself. + */ + public CertificateProperties withType(CertificateType type) { + this.type = type; + return this; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateType.java new file mode 100644 index 0000000000000..3b1e5b89dae5a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateType.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The type of the certificate. Allowed values are `ServerSSLCertificate` and `ImagePullTrustedCA`. */ +public final class CertificateType extends ExpandableStringEnum { + /** Static value ServerSSLCertificate for CertificateType. */ + public static final CertificateType SERVER_SSLCERTIFICATE = fromString("ServerSSLCertificate"); + + /** Static value ImagePullTrustedCA for CertificateType. */ + public static final CertificateType IMAGE_PULL_TRUSTED_CA = fromString("ImagePullTrustedCA"); + + /** + * Creates a new instance of CertificateType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CertificateType() { + } + + /** + * Creates or finds a CertificateType from its string representation. + * + * @param name a name to look for. + * @return the corresponding CertificateType. + */ + @JsonCreator + public static CertificateType fromString(String name) { + return fromString(name, CertificateType.class); + } + + /** + * Gets known CertificateType values. + * + * @return known CertificateType values. + */ + public static Collection values() { + return values(CertificateType.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorage.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorage.java index c413cde7c5f13..7e9559af5bdc0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorage.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorage.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; @@ -37,6 +38,13 @@ public interface ConnectedEnvironmentStorage { */ ConnectedEnvironmentStorageProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the name of the resource group. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistry.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistry.java new file mode 100644 index 0000000000000..d4825a98a2dc8 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistry.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Model representing a mapping from a container registry to the identity used to connect to it. */ +@Fluent +public final class ContainerRegistry { + /* + * Login server of the container registry. + */ + @JsonProperty(value = "containerRegistryServer", required = true) + private String containerRegistryServer; + + /* + * Resource ID of the managed identity. + */ + @JsonProperty(value = "identityResourceId", required = true) + private String identityResourceId; + + /** Creates an instance of ContainerRegistry class. */ + public ContainerRegistry() { + } + + /** + * Get the containerRegistryServer property: Login server of the container registry. + * + * @return the containerRegistryServer value. + */ + public String containerRegistryServer() { + return this.containerRegistryServer; + } + + /** + * Set the containerRegistryServer property: Login server of the container registry. + * + * @param containerRegistryServer the containerRegistryServer value to set. + * @return the ContainerRegistry object itself. + */ + public ContainerRegistry withContainerRegistryServer(String containerRegistryServer) { + this.containerRegistryServer = containerRegistryServer; + return this; + } + + /** + * Get the identityResourceId property: Resource ID of the managed identity. + * + * @return the identityResourceId value. + */ + public String identityResourceId() { + return this.identityResourceId; + } + + /** + * Set the identityResourceId property: Resource ID of the managed identity. + * + * @param identityResourceId the identityResourceId value to set. + * @return the ContainerRegistry object itself. + */ + public ContainerRegistry withIdentityResourceId(String identityResourceId) { + this.identityResourceId = identityResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (containerRegistryServer() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property containerRegistryServer in model ContainerRegistry")); + } + if (identityResourceId() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property identityResourceId in model ContainerRegistry")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerRegistry.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistryWithCustomImage.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistryWithCustomImage.java new file mode 100644 index 0000000000000..141138eaad3ee --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistryWithCustomImage.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Container registry that the final image will be uploaded to. */ +@Fluent +public final class ContainerRegistryWithCustomImage { + /* + * Login server of the container registry that the final image should be uploaded to. Builder resource needs to + * have this container registry defined along with an identity to use to access it. + */ + @JsonProperty(value = "server", required = true) + private String server; + + /* + * Full name that the final image should be uploaded as, including both image name and tag. + */ + @JsonProperty(value = "image") + private String image; + + /** Creates an instance of ContainerRegistryWithCustomImage class. */ + public ContainerRegistryWithCustomImage() { + } + + /** + * Get the server property: Login server of the container registry that the final image should be uploaded to. + * Builder resource needs to have this container registry defined along with an identity to use to access it. + * + * @return the server value. + */ + public String server() { + return this.server; + } + + /** + * Set the server property: Login server of the container registry that the final image should be uploaded to. + * Builder resource needs to have this container registry defined along with an identity to use to access it. + * + * @param server the server value to set. + * @return the ContainerRegistryWithCustomImage object itself. + */ + public ContainerRegistryWithCustomImage withServer(String server) { + this.server = server; + return this; + } + + /** + * Get the image property: Full name that the final image should be uploaded as, including both image name and tag. + * + * @return the image value. + */ + public String image() { + return this.image; + } + + /** + * Set the image property: Full name that the final image should be uploaded as, including both image name and tag. + * + * @param image the image value to set. + * @return the ContainerRegistryWithCustomImage object itself. + */ + public ContainerRegistryWithCustomImage withImage(String image) { + this.image = image; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (server() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property server in model ContainerRegistryWithCustomImage")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerRegistryWithCustomImage.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java index 5b0052ba06f72..90e815740f999 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.appcontainers.models; import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; import java.util.List; @@ -32,6 +33,13 @@ public interface DaprComponent { */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the componentType property: Component type. * @@ -88,6 +96,13 @@ public interface DaprComponent { */ List scopes(); + /** + * Gets the serviceComponentBind property: List of container app services that are bound to the Dapr component. + * + * @return the serviceComponentBind value. + */ + List serviceComponentBind(); + /** * Gets the name of the resource group. * @@ -137,7 +152,8 @@ interface WithCreate DefinitionStages.WithSecrets, DefinitionStages.WithSecretStoreComponent, DefinitionStages.WithMetadata, - DefinitionStages.WithScopes { + DefinitionStages.WithScopes, + DefinitionStages.WithServiceComponentBind { /** * Executes the create request. * @@ -241,6 +257,18 @@ interface WithScopes { */ WithCreate withScopes(List scopes); } + + /** The stage of the DaprComponent definition allowing to specify serviceComponentBind. */ + interface WithServiceComponentBind { + /** + * Specifies the serviceComponentBind property: List of container app services that are bound to the Dapr + * component. + * + * @param serviceComponentBind List of container app services that are bound to the Dapr component. + * @return the next definition stage. + */ + WithCreate withServiceComponentBind(List serviceComponentBind); + } } /** @@ -259,7 +287,8 @@ interface Update UpdateStages.WithSecrets, UpdateStages.WithSecretStoreComponent, UpdateStages.WithMetadata, - UpdateStages.WithScopes { + UpdateStages.WithScopes, + UpdateStages.WithServiceComponentBind { /** * Executes the update request. * @@ -365,6 +394,18 @@ interface WithScopes { */ Update withScopes(List scopes); } + + /** The stage of the DaprComponent update allowing to specify serviceComponentBind. */ + interface WithServiceComponentBind { + /** + * Specifies the serviceComponentBind property: List of container app services that are bound to the Dapr + * component. + * + * @param serviceComponentBind List of container app services that are bound to the Dapr component. + * @return the next definition stage. + */ + Update withServiceComponentBind(List serviceComponentBind); + } } /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentServiceBinding.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentServiceBinding.java new file mode 100644 index 0000000000000..ab117ae198cf4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentServiceBinding.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Configuration to bind a Dapr Component to a dev ContainerApp Service. */ +@Fluent +public final class DaprComponentServiceBinding { + /* + * Name of the service bind + */ + @JsonProperty(value = "name") + private String name; + + /* + * Resource id of the target service + */ + @JsonProperty(value = "serviceId") + private String serviceId; + + /* + * Service bind metadata + */ + @JsonProperty(value = "metadata") + private DaprServiceBindMetadata metadata; + + /** Creates an instance of DaprComponentServiceBinding class. */ + public DaprComponentServiceBinding() { + } + + /** + * Get the name property: Name of the service bind. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the service bind. + * + * @param name the name value to set. + * @return the DaprComponentServiceBinding object itself. + */ + public DaprComponentServiceBinding withName(String name) { + this.name = name; + return this; + } + + /** + * Get the serviceId property: Resource id of the target service. + * + * @return the serviceId value. + */ + public String serviceId() { + return this.serviceId; + } + + /** + * Set the serviceId property: Resource id of the target service. + * + * @param serviceId the serviceId value to set. + * @return the DaprComponentServiceBinding object itself. + */ + public DaprComponentServiceBinding withServiceId(String serviceId) { + this.serviceId = serviceId; + return this; + } + + /** + * Get the metadata property: Service bind metadata. + * + * @return the metadata value. + */ + public DaprServiceBindMetadata metadata() { + return this.metadata; + } + + /** + * Set the metadata property: Service bind metadata. + * + * @param metadata the metadata value to set. + * @return the DaprComponentServiceBinding object itself. + */ + public DaprComponentServiceBinding withMetadata(DaprServiceBindMetadata metadata) { + this.metadata = metadata; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (metadata() != null) { + metadata().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprServiceBindMetadata.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprServiceBindMetadata.java new file mode 100644 index 0000000000000..dcbf7109cdb56 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprServiceBindMetadata.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Dapr component metadata. */ +@Fluent +public final class DaprServiceBindMetadata { + /* + * Service bind metadata property name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Service bind metadata property value. + */ + @JsonProperty(value = "value") + private String value; + + /** Creates an instance of DaprServiceBindMetadata class. */ + public DaprServiceBindMetadata() { + } + + /** + * Get the name property: Service bind metadata property name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Service bind metadata property name. + * + * @param name the name value to set. + * @return the DaprServiceBindMetadata object itself. + */ + public DaprServiceBindMetadata withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: Service bind metadata property value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Service bind metadata property value. + * + * @param value the value value to set. + * @return the DaprServiceBindMetadata object itself. + */ + public DaprServiceBindMetadata withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DataDogConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DataDogConfiguration.java new file mode 100644 index 0000000000000..ebfed88653c7f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DataDogConfiguration.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Configuration of datadog. */ +@Fluent +public final class DataDogConfiguration { + /* + * The data dog site + */ + @JsonProperty(value = "site") + private String site; + + /* + * The data dog api key + */ + @JsonProperty(value = "key") + private String key; + + /** Creates an instance of DataDogConfiguration class. */ + public DataDogConfiguration() { + } + + /** + * Get the site property: The data dog site. + * + * @return the site value. + */ + public String site() { + return this.site; + } + + /** + * Set the site property: The data dog site. + * + * @param site the site value to set. + * @return the DataDogConfiguration object itself. + */ + public DataDogConfiguration withSite(String site) { + this.site = site; + return this; + } + + /** + * Get the key property: The data dog api key. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: The data dog api key. + * + * @param key the key value to set. + * @return the DataDogConfiguration object itself. + */ + public DataDogConfiguration withKey(String key) { + this.key = key; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DestinationsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DestinationsConfiguration.java new file mode 100644 index 0000000000000..a96728117870b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DestinationsConfiguration.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Configuration of Open Telemetry destinations. */ +@Fluent +public final class DestinationsConfiguration { + /* + * Open telemetry datadog destination configuration + */ + @JsonProperty(value = "dataDogConfiguration") + private DataDogConfiguration dataDogConfiguration; + + /** Creates an instance of DestinationsConfiguration class. */ + public DestinationsConfiguration() { + } + + /** + * Get the dataDogConfiguration property: Open telemetry datadog destination configuration. + * + * @return the dataDogConfiguration value. + */ + public DataDogConfiguration dataDogConfiguration() { + return this.dataDogConfiguration; + } + + /** + * Set the dataDogConfiguration property: Open telemetry datadog destination configuration. + * + * @param dataDogConfiguration the dataDogConfiguration value to set. + * @return the DestinationsConfiguration object itself. + */ + public DestinationsConfiguration withDataDogConfiguration(DataDogConfiguration dataDogConfiguration) { + this.dataDogConfiguration = dataDogConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dataDogConfiguration() != null) { + dataDogConfiguration().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DetectionStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DetectionStatus.java new file mode 100644 index 0000000000000..c579adf007fed --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DetectionStatus.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The status of the patch detection. */ +public final class DetectionStatus extends ExpandableStringEnum { + /** Static value Succeeded for DetectionStatus. */ + public static final DetectionStatus SUCCEEDED = fromString("Succeeded"); + + /** Static value RegistryLoginFailed for DetectionStatus. */ + public static final DetectionStatus REGISTRY_LOGIN_FAILED = fromString("RegistryLoginFailed"); + + /** Static value Failed for DetectionStatus. */ + public static final DetectionStatus FAILED = fromString("Failed"); + + /** + * Creates a new instance of DetectionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DetectionStatus() { + } + + /** + * Creates or finds a DetectionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding DetectionStatus. + */ + @JsonCreator + public static DetectionStatus fromString(String name) { + return fromString(name, DetectionStatus.class); + } + + /** + * Gets known DetectionStatus values. + * + * @return known DetectionStatus values. + */ + public static Collection values() { + return values(DetectionStatus.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Diagnostics.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Diagnostics.java index 73bed89218f12..097fd4f2d489d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Diagnostics.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Diagnostics.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; /** An immutable client-side representation of Diagnostics. */ @@ -36,6 +37,13 @@ public interface Diagnostics { */ DiagnosticsProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner object. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EncryptionSettings.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EncryptionSettings.java new file mode 100644 index 0000000000000..5c3b58f056208 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EncryptionSettings.java @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The configuration settings of the secrets references of encryption key and signing key for ContainerApp Service + * Authentication/Authorization. + */ +@Fluent +public final class EncryptionSettings { + /* + * The secret name which is referenced for EncryptionKey. + */ + @JsonProperty(value = "containerAppAuthEncryptionSecretName") + private String containerAppAuthEncryptionSecretName; + + /* + * The secret name which is referenced for SigningKey. + */ + @JsonProperty(value = "containerAppAuthSigningSecretName") + private String containerAppAuthSigningSecretName; + + /** Creates an instance of EncryptionSettings class. */ + public EncryptionSettings() { + } + + /** + * Get the containerAppAuthEncryptionSecretName property: The secret name which is referenced for EncryptionKey. + * + * @return the containerAppAuthEncryptionSecretName value. + */ + public String containerAppAuthEncryptionSecretName() { + return this.containerAppAuthEncryptionSecretName; + } + + /** + * Set the containerAppAuthEncryptionSecretName property: The secret name which is referenced for EncryptionKey. + * + * @param containerAppAuthEncryptionSecretName the containerAppAuthEncryptionSecretName value to set. + * @return the EncryptionSettings object itself. + */ + public EncryptionSettings withContainerAppAuthEncryptionSecretName(String containerAppAuthEncryptionSecretName) { + this.containerAppAuthEncryptionSecretName = containerAppAuthEncryptionSecretName; + return this; + } + + /** + * Get the containerAppAuthSigningSecretName property: The secret name which is referenced for SigningKey. + * + * @return the containerAppAuthSigningSecretName value. + */ + public String containerAppAuthSigningSecretName() { + return this.containerAppAuthSigningSecretName; + } + + /** + * Set the containerAppAuthSigningSecretName property: The secret name which is referenced for SigningKey. + * + * @param containerAppAuthSigningSecretName the containerAppAuthSigningSecretName value to set. + * @return the EncryptionSettings object itself. + */ + public EncryptionSettings withContainerAppAuthSigningSecretName(String containerAppAuthSigningSecretName) { + this.containerAppAuthSigningSecretName = containerAppAuthSigningSecretName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVariable.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVariable.java new file mode 100644 index 0000000000000..98ab2e8cec300 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVariable.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Model representing an environment variable. */ +@Fluent +public final class EnvironmentVariable { + /* + * Environment variable name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * Environment variable value. + */ + @JsonProperty(value = "value", required = true) + private String value; + + /** Creates an instance of EnvironmentVariable class. */ + public EnvironmentVariable() { + } + + /** + * Get the name property: Environment variable name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Environment variable name. + * + * @param name the name value to set. + * @return the EnvironmentVariable object itself. + */ + public EnvironmentVariable withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: Environment variable value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Environment variable value. + * + * @param value the value value to set. + * @return the EnvironmentVariable object itself. + */ + public EnvironmentVariable withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model EnvironmentVariable")); + } + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property value in model EnvironmentVariable")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EnvironmentVariable.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpGet.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpGet.java new file mode 100644 index 0000000000000..16b62ea2c4c8a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpGet.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Model representing a http get request. */ +@Fluent +public final class HttpGet { + /* + * URL to make HTTP GET request against. + */ + @JsonProperty(value = "url", required = true) + private String url; + + /* + * Name of the file that the request should be saved to. + */ + @JsonProperty(value = "fileName") + private String fileName; + + /* + * List of headers to send with the request. + */ + @JsonProperty(value = "headers") + private List headers; + + /** Creates an instance of HttpGet class. */ + public HttpGet() { + } + + /** + * Get the url property: URL to make HTTP GET request against. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Set the url property: URL to make HTTP GET request against. + * + * @param url the url value to set. + * @return the HttpGet object itself. + */ + public HttpGet withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the fileName property: Name of the file that the request should be saved to. + * + * @return the fileName value. + */ + public String fileName() { + return this.fileName; + } + + /** + * Set the fileName property: Name of the file that the request should be saved to. + * + * @param fileName the fileName value to set. + * @return the HttpGet object itself. + */ + public HttpGet withFileName(String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Get the headers property: List of headers to send with the request. + * + * @return the headers value. + */ + public List headers() { + return this.headers; + } + + /** + * Set the headers property: List of headers to send with the request. + * + * @param headers the headers value to set. + * @return the HttpGet object itself. + */ + public HttpGet withHeaders(List headers) { + this.headers = headers; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (url() == null) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("Missing required property url in model HttpGet")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(HttpGet.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java index affb86e66066c..4d069728ee97f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java @@ -86,6 +86,12 @@ public final class Ingress { @JsonProperty(value = "corsPolicy") private CorsPolicy corsPolicy; + /* + * Settings to expose additional ports on container app + */ + @JsonProperty(value = "additionalPortMappings") + private List additionalPortMappings; + /** Creates an instance of Ingress class. */ public Ingress() { } @@ -325,6 +331,26 @@ public Ingress withCorsPolicy(CorsPolicy corsPolicy) { return this; } + /** + * Get the additionalPortMappings property: Settings to expose additional ports on container app. + * + * @return the additionalPortMappings value. + */ + public List additionalPortMappings() { + return this.additionalPortMappings; + } + + /** + * Set the additionalPortMappings property: Settings to expose additional ports on container app. + * + * @param additionalPortMappings the additionalPortMappings value to set. + * @return the Ingress object itself. + */ + public Ingress withAdditionalPortMappings(List additionalPortMappings) { + this.additionalPortMappings = additionalPortMappings; + return this; + } + /** * Validates the instance. * @@ -346,5 +372,8 @@ public void validate() { if (corsPolicy() != null) { corsPolicy().validate(); } + if (additionalPortMappings() != null) { + additionalPortMappings().forEach(e -> e.validate()); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressPortMapping.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressPortMapping.java new file mode 100644 index 0000000000000..1c1cdd743fb19 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressPortMapping.java @@ -0,0 +1,104 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Port mappings of container app ingress. */ +@Fluent +public final class IngressPortMapping { + /* + * Specifies whether the app port is accessible outside of the environment + */ + @JsonProperty(value = "external", required = true) + private boolean external; + + /* + * Specifies the port user's container listens on + */ + @JsonProperty(value = "targetPort", required = true) + private int targetPort; + + /* + * Specifies the exposed port for the target port. If not specified, it defaults to target port + */ + @JsonProperty(value = "exposedPort") + private Integer exposedPort; + + /** Creates an instance of IngressPortMapping class. */ + public IngressPortMapping() { + } + + /** + * Get the external property: Specifies whether the app port is accessible outside of the environment. + * + * @return the external value. + */ + public boolean external() { + return this.external; + } + + /** + * Set the external property: Specifies whether the app port is accessible outside of the environment. + * + * @param external the external value to set. + * @return the IngressPortMapping object itself. + */ + public IngressPortMapping withExternal(boolean external) { + this.external = external; + return this; + } + + /** + * Get the targetPort property: Specifies the port user's container listens on. + * + * @return the targetPort value. + */ + public int targetPort() { + return this.targetPort; + } + + /** + * Set the targetPort property: Specifies the port user's container listens on. + * + * @param targetPort the targetPort value to set. + * @return the IngressPortMapping object itself. + */ + public IngressPortMapping withTargetPort(int targetPort) { + this.targetPort = targetPort; + return this; + } + + /** + * Get the exposedPort property: Specifies the exposed port for the target port. If not specified, it defaults to + * target port. + * + * @return the exposedPort value. + */ + public Integer exposedPort() { + return this.exposedPort; + } + + /** + * Set the exposedPort property: Specifies the exposed port for the target port. If not specified, it defaults to + * target port. + * + * @param exposedPort the exposedPort value to set. + * @return the IngressPortMapping object itself. + */ + public IngressPortMapping withExposedPort(Integer exposedPort) { + this.exposedPort = exposedPort; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ListUsagesResult.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ListUsagesResult.java new file mode 100644 index 0000000000000..17b741d454b8f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ListUsagesResult.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** The ListUsagesResult model. */ +@Fluent +public final class ListUsagesResult { + /* + * The list of compute resource usages. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URI to fetch the next page of compute resource usage information. Call ListNext() with this to fetch the + * next page of compute resource usage information. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** Creates an instance of ListUsagesResult class. */ + public ListUsagesResult() { + } + + /** + * Get the value property: The list of compute resource usages. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of compute resource usages. + * + * @param value the value value to set. + * @return the ListUsagesResult object itself. + */ + public ListUsagesResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URI to fetch the next page of compute resource usage information. Call ListNext() + * with this to fetch the next page of compute resource usage information. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The URI to fetch the next page of compute resource usage information. Call ListNext() + * with this to fetch the next page of compute resource usage information. + * + * @param nextLink the nextLink value to set. + * @return the ListUsagesResult object itself. + */ + public ListUsagesResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Login.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Login.java index 2457b6865eb28..6344b11c37385 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Login.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Login.java @@ -17,6 +17,12 @@ public final class Login { @JsonProperty(value = "routes") private LoginRoutes routes; + /* + * The configuration settings of the token store. + */ + @JsonProperty(value = "tokenStore") + private TokenStore tokenStore; + /* * true if the fragments from the request are preserved after the login request is made; otherwise, * false. @@ -69,6 +75,26 @@ public Login withRoutes(LoginRoutes routes) { return this; } + /** + * Get the tokenStore property: The configuration settings of the token store. + * + * @return the tokenStore value. + */ + public TokenStore tokenStore() { + return this.tokenStore; + } + + /** + * Set the tokenStore property: The configuration settings of the token store. + * + * @param tokenStore the tokenStore value to set. + * @return the Login object itself. + */ + public Login withTokenStore(TokenStore tokenStore) { + this.tokenStore = tokenStore; + return this; + } + /** * Get the preserveUrlFragmentsForLogins property: <code>true</code> if the fragments from the request * are preserved after the login request is made; otherwise, <code>false</code>. @@ -166,6 +192,9 @@ public void validate() { if (routes() != null) { routes().validate(); } + if (tokenStore() != null) { + tokenStore().validate(); + } if (cookieExpiration() != null) { cookieExpiration().validate(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogsConfiguration.java new file mode 100644 index 0000000000000..23ca56c77bc31 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogsConfiguration.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Configuration of Open Telemetry logs. */ +@Fluent +public final class LogsConfiguration { + /* + * Open telemetry logs destinations + */ + @JsonProperty(value = "destinations") + private List destinations; + + /** Creates an instance of LogsConfiguration class. */ + public LogsConfiguration() { + } + + /** + * Get the destinations property: Open telemetry logs destinations. + * + * @return the destinations value. + */ + public List destinations() { + return this.destinations; + } + + /** + * Set the destinations property: Open telemetry logs destinations. + * + * @param destinations the destinations value to set. + * @return the LogsConfiguration object itself. + */ + public LogsConfiguration withDestinations(List destinations) { + this.destinations = destinations; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironment.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironment.java index b4064c98a6bbe..4aacc2119e26d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironment.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironment.java @@ -122,6 +122,20 @@ public interface ManagedEnvironment { */ AppLogsConfiguration appLogsConfiguration(); + /** + * Gets the appInsightsConfiguration property: Environment level Application Insights configuration. + * + * @return the appInsightsConfiguration value. + */ + AppInsightsConfiguration appInsightsConfiguration(); + + /** + * Gets the openTelemetryConfiguration property: Environment Open Telemetry configuration. + * + * @return the openTelemetryConfiguration value. + */ + OpenTelemetryConfiguration openTelemetryConfiguration(); + /** * Gets the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. * @@ -263,6 +277,8 @@ interface WithCreate DefinitionStages.WithDaprAIConnectionString, DefinitionStages.WithVnetConfiguration, DefinitionStages.WithAppLogsConfiguration, + DefinitionStages.WithAppInsightsConfiguration, + DefinitionStages.WithOpenTelemetryConfiguration, DefinitionStages.WithZoneRedundant, DefinitionStages.WithCustomDomainConfiguration, DefinitionStages.WithWorkloadProfiles, @@ -358,6 +374,28 @@ interface WithAppLogsConfiguration { WithCreate withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration); } + /** The stage of the ManagedEnvironment definition allowing to specify appInsightsConfiguration. */ + interface WithAppInsightsConfiguration { + /** + * Specifies the appInsightsConfiguration property: Environment level Application Insights configuration. + * + * @param appInsightsConfiguration Environment level Application Insights configuration. + * @return the next definition stage. + */ + WithCreate withAppInsightsConfiguration(AppInsightsConfiguration appInsightsConfiguration); + } + + /** The stage of the ManagedEnvironment definition allowing to specify openTelemetryConfiguration. */ + interface WithOpenTelemetryConfiguration { + /** + * Specifies the openTelemetryConfiguration property: Environment Open Telemetry configuration. + * + * @param openTelemetryConfiguration Environment Open Telemetry configuration. + * @return the next definition stage. + */ + WithCreate withOpenTelemetryConfiguration(OpenTelemetryConfiguration openTelemetryConfiguration); + } + /** The stage of the ManagedEnvironment definition allowing to specify zoneRedundant. */ interface WithZoneRedundant { /** @@ -455,6 +493,8 @@ interface Update UpdateStages.WithDaprAIConnectionString, UpdateStages.WithVnetConfiguration, UpdateStages.WithAppLogsConfiguration, + UpdateStages.WithAppInsightsConfiguration, + UpdateStages.WithOpenTelemetryConfiguration, UpdateStages.WithCustomDomainConfiguration, UpdateStages.WithWorkloadProfiles, UpdateStages.WithKedaConfiguration, @@ -550,6 +590,28 @@ interface WithAppLogsConfiguration { Update withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration); } + /** The stage of the ManagedEnvironment update allowing to specify appInsightsConfiguration. */ + interface WithAppInsightsConfiguration { + /** + * Specifies the appInsightsConfiguration property: Environment level Application Insights configuration. + * + * @param appInsightsConfiguration Environment level Application Insights configuration. + * @return the next definition stage. + */ + Update withAppInsightsConfiguration(AppInsightsConfiguration appInsightsConfiguration); + } + + /** The stage of the ManagedEnvironment update allowing to specify openTelemetryConfiguration. */ + interface WithOpenTelemetryConfiguration { + /** + * Specifies the openTelemetryConfiguration property: Environment Open Telemetry configuration. + * + * @param openTelemetryConfiguration Environment Open Telemetry configuration. + * @return the next definition stage. + */ + Update withOpenTelemetryConfiguration(OpenTelemetryConfiguration openTelemetryConfiguration); + } + /** The stage of the ManagedEnvironment update allowing to specify customDomainConfiguration. */ interface WithCustomDomainConfiguration { /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorage.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorage.java index 3e565811a2106..b090e56604b32 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorage.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorage.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner; @@ -37,6 +38,13 @@ public interface ManagedEnvironmentStorage { */ ManagedEnvironmentStorageProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the name of the resource group. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentUsages.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentUsages.java new file mode 100644 index 0000000000000..1a85ece381678 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentUsages.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of ManagedEnvironmentUsages. */ +public interface ManagedEnvironmentUsages { + /** + * Gets the current usage information as well as the limits for environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current usage information as well as the limits for environment as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName); + + /** + * Gets the current usage information as well as the limits for environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current usage information as well as the limits for environment as paginated response with {@link + * PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MetricsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MetricsConfiguration.java new file mode 100644 index 0000000000000..d41d0941ad19e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MetricsConfiguration.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Configuration of Open Telemetry metrics. */ +@Fluent +public final class MetricsConfiguration { + /* + * Open telemetry metrics destinations + */ + @JsonProperty(value = "destinations") + private List destinations; + + /** Creates an instance of MetricsConfiguration class. */ + public MetricsConfiguration() { + } + + /** + * Get the destinations property: Open telemetry metrics destinations. + * + * @return the destinations value. + */ + public List destinations() { + return this.destinations; + } + + /** + * Set the destinations property: Open telemetry metrics destinations. + * + * @param destinations the destinations value to set. + * @return the MetricsConfiguration object itself. + */ + public MetricsConfiguration withDestinations(List destinations) { + this.destinations = destinations; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenTelemetryConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenTelemetryConfiguration.java new file mode 100644 index 0000000000000..cb63421fa59ef --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenTelemetryConfiguration.java @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Configuration of Open Telemetry. */ +@Fluent +public final class OpenTelemetryConfiguration { + /* + * Open telemetry destinations configuration + */ + @JsonProperty(value = "destinationsConfiguration") + private DestinationsConfiguration destinationsConfiguration; + + /* + * Open telemetry trace configuration + */ + @JsonProperty(value = "tracesConfiguration") + private TracesConfiguration tracesConfiguration; + + /* + * Open telemetry logs configuration + */ + @JsonProperty(value = "logsConfiguration") + private LogsConfiguration logsConfiguration; + + /* + * Open telemetry metrics configuration + */ + @JsonProperty(value = "metricsConfiguration") + private MetricsConfiguration metricsConfiguration; + + /** Creates an instance of OpenTelemetryConfiguration class. */ + public OpenTelemetryConfiguration() { + } + + /** + * Get the destinationsConfiguration property: Open telemetry destinations configuration. + * + * @return the destinationsConfiguration value. + */ + public DestinationsConfiguration destinationsConfiguration() { + return this.destinationsConfiguration; + } + + /** + * Set the destinationsConfiguration property: Open telemetry destinations configuration. + * + * @param destinationsConfiguration the destinationsConfiguration value to set. + * @return the OpenTelemetryConfiguration object itself. + */ + public OpenTelemetryConfiguration withDestinationsConfiguration( + DestinationsConfiguration destinationsConfiguration) { + this.destinationsConfiguration = destinationsConfiguration; + return this; + } + + /** + * Get the tracesConfiguration property: Open telemetry trace configuration. + * + * @return the tracesConfiguration value. + */ + public TracesConfiguration tracesConfiguration() { + return this.tracesConfiguration; + } + + /** + * Set the tracesConfiguration property: Open telemetry trace configuration. + * + * @param tracesConfiguration the tracesConfiguration value to set. + * @return the OpenTelemetryConfiguration object itself. + */ + public OpenTelemetryConfiguration withTracesConfiguration(TracesConfiguration tracesConfiguration) { + this.tracesConfiguration = tracesConfiguration; + return this; + } + + /** + * Get the logsConfiguration property: Open telemetry logs configuration. + * + * @return the logsConfiguration value. + */ + public LogsConfiguration logsConfiguration() { + return this.logsConfiguration; + } + + /** + * Set the logsConfiguration property: Open telemetry logs configuration. + * + * @param logsConfiguration the logsConfiguration value to set. + * @return the OpenTelemetryConfiguration object itself. + */ + public OpenTelemetryConfiguration withLogsConfiguration(LogsConfiguration logsConfiguration) { + this.logsConfiguration = logsConfiguration; + return this; + } + + /** + * Get the metricsConfiguration property: Open telemetry metrics configuration. + * + * @return the metricsConfiguration value. + */ + public MetricsConfiguration metricsConfiguration() { + return this.metricsConfiguration; + } + + /** + * Set the metricsConfiguration property: Open telemetry metrics configuration. + * + * @param metricsConfiguration the metricsConfiguration value to set. + * @return the OpenTelemetryConfiguration object itself. + */ + public OpenTelemetryConfiguration withMetricsConfiguration(MetricsConfiguration metricsConfiguration) { + this.metricsConfiguration = metricsConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (destinationsConfiguration() != null) { + destinationsConfiguration().validate(); + } + if (tracesConfiguration() != null) { + tracesConfiguration().validate(); + } + if (logsConfiguration() != null) { + logsConfiguration().validate(); + } + if (metricsConfiguration() != null) { + metricsConfiguration().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchApplyStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchApplyStatus.java new file mode 100644 index 0000000000000..890b6cf135957 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchApplyStatus.java @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The status of the patch once it has been provisioned. */ +public final class PatchApplyStatus extends ExpandableStringEnum { + /** Static value NotStarted for PatchApplyStatus. */ + public static final PatchApplyStatus NOT_STARTED = fromString("NotStarted"); + + /** Static value RebaseInProgress for PatchApplyStatus. */ + public static final PatchApplyStatus REBASE_IN_PROGRESS = fromString("RebaseInProgress"); + + /** Static value CreatingRevision for PatchApplyStatus. */ + public static final PatchApplyStatus CREATING_REVISION = fromString("CreatingRevision"); + + /** Static value Succeeded for PatchApplyStatus. */ + public static final PatchApplyStatus SUCCEEDED = fromString("Succeeded"); + + /** Static value Canceled for PatchApplyStatus. */ + public static final PatchApplyStatus CANCELED = fromString("Canceled"); + + /** Static value RebaseFailed for PatchApplyStatus. */ + public static final PatchApplyStatus REBASE_FAILED = fromString("RebaseFailed"); + + /** Static value RevisionCreationFailed for PatchApplyStatus. */ + public static final PatchApplyStatus REVISION_CREATION_FAILED = fromString("RevisionCreationFailed"); + + /** Static value ImagePushPullFailed for PatchApplyStatus. */ + public static final PatchApplyStatus IMAGE_PUSH_PULL_FAILED = fromString("ImagePushPullFailed"); + + /** Static value ManuallySkipped for PatchApplyStatus. */ + public static final PatchApplyStatus MANUALLY_SKIPPED = fromString("ManuallySkipped"); + + /** + * Creates a new instance of PatchApplyStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PatchApplyStatus() { + } + + /** + * Creates or finds a PatchApplyStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding PatchApplyStatus. + */ + @JsonCreator + public static PatchApplyStatus fromString(String name) { + return fromString(name, PatchApplyStatus.class); + } + + /** + * Gets known PatchApplyStatus values. + * + * @return known PatchApplyStatus values. + */ + public static Collection values() { + return values(PatchApplyStatus.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchCollection.java new file mode 100644 index 0000000000000..68d1f5d755a1c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchCollection.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.resourcemanager.appcontainers.fluent.models.PatchCollectionInner; +import java.util.List; + +/** An immutable client-side representation of PatchCollection. */ +public interface PatchCollection { + /** + * Gets the value property: Collection of patch resources. + * + * @return the value value. + */ + List value(); + + /** + * Gets the nextLink property: the link to the next page of items. + * + * @return the nextLink value. + */ + String nextLink(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.PatchCollectionInner object. + * + * @return the inner object. + */ + PatchCollectionInner innerModel(); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetails.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetails.java new file mode 100644 index 0000000000000..49c2314fef9fa --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetails.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** The detailed info of patch operation performing when applying a patch. */ +@Immutable +public final class PatchDetails { + /* + * The name of the target container for the patch. + */ + @JsonProperty(value = "targetContainerName", required = true, access = JsonProperty.Access.WRITE_ONLY) + private String targetContainerName; + + /* + * The name of the target image for the patch. + */ + @JsonProperty(value = "targetImage", required = true, access = JsonProperty.Access.WRITE_ONLY) + private String targetImage; + + /* + * The UTC timestamp that describes the latest detection was done. + */ + @JsonProperty(value = "lastDetectionTime", required = true, access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastDetectionTime; + + /* + * The status of the patch detection. + */ + @JsonProperty(value = "detectionStatus", required = true, access = JsonProperty.Access.WRITE_ONLY) + private DetectionStatus detectionStatus; + + /* + * The name of the new image created by the patch. + */ + @JsonProperty(value = "newImageName", access = JsonProperty.Access.WRITE_ONLY) + private String newImageName; + + /* + * New layer update details in the target image. + */ + @JsonProperty(value = "newLayer", access = JsonProperty.Access.WRITE_ONLY) + private PatchDetailsNewLayer newLayer; + + /* + * The old layer details in the target image. + */ + @JsonProperty(value = "oldLayer", access = JsonProperty.Access.WRITE_ONLY) + private PatchDetailsOldLayer oldLayer; + + /* + * The type for the patch. + */ + @JsonProperty(value = "patchType", access = JsonProperty.Access.WRITE_ONLY) + private PatchType patchType; + + /** Creates an instance of PatchDetails class. */ + public PatchDetails() { + } + + /** + * Get the targetContainerName property: The name of the target container for the patch. + * + * @return the targetContainerName value. + */ + public String targetContainerName() { + return this.targetContainerName; + } + + /** + * Get the targetImage property: The name of the target image for the patch. + * + * @return the targetImage value. + */ + public String targetImage() { + return this.targetImage; + } + + /** + * Get the lastDetectionTime property: The UTC timestamp that describes the latest detection was done. + * + * @return the lastDetectionTime value. + */ + public OffsetDateTime lastDetectionTime() { + return this.lastDetectionTime; + } + + /** + * Get the detectionStatus property: The status of the patch detection. + * + * @return the detectionStatus value. + */ + public DetectionStatus detectionStatus() { + return this.detectionStatus; + } + + /** + * Get the newImageName property: The name of the new image created by the patch. + * + * @return the newImageName value. + */ + public String newImageName() { + return this.newImageName; + } + + /** + * Get the newLayer property: New layer update details in the target image. + * + * @return the newLayer value. + */ + public PatchDetailsNewLayer newLayer() { + return this.newLayer; + } + + /** + * Get the oldLayer property: The old layer details in the target image. + * + * @return the oldLayer value. + */ + public PatchDetailsOldLayer oldLayer() { + return this.oldLayer; + } + + /** + * Get the patchType property: The type for the patch. + * + * @return the patchType value. + */ + public PatchType patchType() { + return this.patchType; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (newLayer() != null) { + newLayer().validate(); + } + if (oldLayer() != null) { + oldLayer().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsNewLayer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsNewLayer.java new file mode 100644 index 0000000000000..885035fb8f8a3 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsNewLayer.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** New layer update details in the target image. */ +@Fluent +public final class PatchDetailsNewLayer { + /* + * The details of the new layer for the target image. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The framework and its version in the new run image for the target image. + */ + @JsonProperty(value = "frameworkAndVersion") + private String frameworkAndVersion; + + /* + * The OS name and its version in the new run image for the target image. + */ + @JsonProperty(value = "osAndVersion") + private String osAndVersion; + + /** Creates an instance of PatchDetailsNewLayer class. */ + public PatchDetailsNewLayer() { + } + + /** + * Get the name property: The details of the new layer for the target image. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The details of the new layer for the target image. + * + * @param name the name value to set. + * @return the PatchDetailsNewLayer object itself. + */ + public PatchDetailsNewLayer withName(String name) { + this.name = name; + return this; + } + + /** + * Get the frameworkAndVersion property: The framework and its version in the new run image for the target image. + * + * @return the frameworkAndVersion value. + */ + public String frameworkAndVersion() { + return this.frameworkAndVersion; + } + + /** + * Set the frameworkAndVersion property: The framework and its version in the new run image for the target image. + * + * @param frameworkAndVersion the frameworkAndVersion value to set. + * @return the PatchDetailsNewLayer object itself. + */ + public PatchDetailsNewLayer withFrameworkAndVersion(String frameworkAndVersion) { + this.frameworkAndVersion = frameworkAndVersion; + return this; + } + + /** + * Get the osAndVersion property: The OS name and its version in the new run image for the target image. + * + * @return the osAndVersion value. + */ + public String osAndVersion() { + return this.osAndVersion; + } + + /** + * Set the osAndVersion property: The OS name and its version in the new run image for the target image. + * + * @param osAndVersion the osAndVersion value to set. + * @return the PatchDetailsNewLayer object itself. + */ + public PatchDetailsNewLayer withOsAndVersion(String osAndVersion) { + this.osAndVersion = osAndVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsOldLayer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsOldLayer.java new file mode 100644 index 0000000000000..4f4377ce93a20 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsOldLayer.java @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The old layer details in the target image. */ +@Fluent +public final class PatchDetailsOldLayer { + /* + * The details of the old layer for the target image. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The framework and its version in the old run image for the target image. + */ + @JsonProperty(value = "frameworkAndVersion") + private String frameworkAndVersion; + + /* + * The OS name and its version in the old run image for the target image. + */ + @JsonProperty(value = "osAndVersion") + private String osAndVersion; + + /** Creates an instance of PatchDetailsOldLayer class. */ + public PatchDetailsOldLayer() { + } + + /** + * Get the name property: The details of the old layer for the target image. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The details of the old layer for the target image. + * + * @param name the name value to set. + * @return the PatchDetailsOldLayer object itself. + */ + public PatchDetailsOldLayer withName(String name) { + this.name = name; + return this; + } + + /** + * Get the frameworkAndVersion property: The framework and its version in the old run image for the target image. + * + * @return the frameworkAndVersion value. + */ + public String frameworkAndVersion() { + return this.frameworkAndVersion; + } + + /** + * Set the frameworkAndVersion property: The framework and its version in the old run image for the target image. + * + * @param frameworkAndVersion the frameworkAndVersion value to set. + * @return the PatchDetailsOldLayer object itself. + */ + public PatchDetailsOldLayer withFrameworkAndVersion(String frameworkAndVersion) { + this.frameworkAndVersion = frameworkAndVersion; + return this; + } + + /** + * Get the osAndVersion property: The OS name and its version in the old run image for the target image. + * + * @return the osAndVersion value. + */ + public String osAndVersion() { + return this.osAndVersion; + } + + /** + * Set the osAndVersion property: The OS name and its version in the old run image for the target image. + * + * @param osAndVersion the osAndVersion value to set. + * @return the PatchDetailsOldLayer object itself. + */ + public PatchDetailsOldLayer withOsAndVersion(String osAndVersion) { + this.osAndVersion = osAndVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchProperties.java new file mode 100644 index 0000000000000..ee3bfe9bf095a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchProperties.java @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.List; + +/** The PatchProperties model. */ +@Fluent +public final class PatchProperties { + /* + * The id of the target environment for the patch. + */ + @JsonProperty(value = "targetEnvironmentId") + private String targetEnvironmentId; + + /* + * The id of the target container app for the patch. + */ + @JsonProperty(value = "targetContainerAppId") + private String targetContainerAppId; + + /* + * The id of the target revision for the patch. + */ + @JsonProperty(value = "targetRevisionId") + private String targetRevisionId; + + /* + * Patch provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PatchProvisioningState provisioningState; + + /* + * The status of the patch operation once it has been provisioned + */ + @JsonProperty(value = "patchApplyStatus", access = JsonProperty.Access.WRITE_ONLY) + private PatchApplyStatus patchApplyStatus; + + /* + * The UTC timestamp that describes when the patch object was created. + */ + @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdTime; + + /* + * The UTC timestamp that describes when the patch object was last updated. + */ + @JsonProperty(value = "updatedTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime updatedTime; + + /* + * Detailed info describes the patch operation for the target container app. + */ + @JsonProperty(value = "patchDetails", access = JsonProperty.Access.WRITE_ONLY) + private List patchDetails; + + /** Creates an instance of PatchProperties class. */ + public PatchProperties() { + } + + /** + * Get the targetEnvironmentId property: The id of the target environment for the patch. + * + * @return the targetEnvironmentId value. + */ + public String targetEnvironmentId() { + return this.targetEnvironmentId; + } + + /** + * Set the targetEnvironmentId property: The id of the target environment for the patch. + * + * @param targetEnvironmentId the targetEnvironmentId value to set. + * @return the PatchProperties object itself. + */ + public PatchProperties withTargetEnvironmentId(String targetEnvironmentId) { + this.targetEnvironmentId = targetEnvironmentId; + return this; + } + + /** + * Get the targetContainerAppId property: The id of the target container app for the patch. + * + * @return the targetContainerAppId value. + */ + public String targetContainerAppId() { + return this.targetContainerAppId; + } + + /** + * Set the targetContainerAppId property: The id of the target container app for the patch. + * + * @param targetContainerAppId the targetContainerAppId value to set. + * @return the PatchProperties object itself. + */ + public PatchProperties withTargetContainerAppId(String targetContainerAppId) { + this.targetContainerAppId = targetContainerAppId; + return this; + } + + /** + * Get the targetRevisionId property: The id of the target revision for the patch. + * + * @return the targetRevisionId value. + */ + public String targetRevisionId() { + return this.targetRevisionId; + } + + /** + * Set the targetRevisionId property: The id of the target revision for the patch. + * + * @param targetRevisionId the targetRevisionId value to set. + * @return the PatchProperties object itself. + */ + public PatchProperties withTargetRevisionId(String targetRevisionId) { + this.targetRevisionId = targetRevisionId; + return this; + } + + /** + * Get the provisioningState property: Patch provisioning state. + * + * @return the provisioningState value. + */ + public PatchProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the patchApplyStatus property: The status of the patch operation once it has been provisioned. + * + * @return the patchApplyStatus value. + */ + public PatchApplyStatus patchApplyStatus() { + return this.patchApplyStatus; + } + + /** + * Get the createdTime property: The UTC timestamp that describes when the patch object was created. + * + * @return the createdTime value. + */ + public OffsetDateTime createdTime() { + return this.createdTime; + } + + /** + * Get the updatedTime property: The UTC timestamp that describes when the patch object was last updated. + * + * @return the updatedTime value. + */ + public OffsetDateTime updatedTime() { + return this.updatedTime; + } + + /** + * Get the patchDetails property: Detailed info describes the patch operation for the target container app. + * + * @return the patchDetails value. + */ + public List patchDetails() { + return this.patchDetails; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (patchDetails() != null) { + patchDetails().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchProvisioningState.java new file mode 100644 index 0000000000000..c11f51905d2b1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchProvisioningState.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Resource instance provisioning state. */ +public final class PatchProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for PatchProvisioningState. */ + public static final PatchProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for PatchProvisioningState. */ + public static final PatchProvisioningState FAILED = fromString("Failed"); + + /** Static value Canceled for PatchProvisioningState. */ + public static final PatchProvisioningState CANCELED = fromString("Canceled"); + + /** + * Creates a new instance of PatchProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PatchProvisioningState() { + } + + /** + * Creates or finds a PatchProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding PatchProvisioningState. + */ + @JsonCreator + public static PatchProvisioningState fromString(String name) { + return fromString(name, PatchProvisioningState.class); + } + + /** + * Gets known PatchProvisioningState values. + * + * @return known PatchProvisioningState values. + */ + public static Collection values() { + return values(PatchProvisioningState.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchResource.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchResource.java new file mode 100644 index 0000000000000..cf4b18509a8b2 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchResource.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.fluent.models.PatchResourceInner; + +/** An immutable client-side representation of PatchResource. */ +public interface PatchResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: Properties that describes current states of the patch resource. + * + * @return the properties value. + */ + PatchProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.PatchResourceInner object. + * + * @return the inner object. + */ + PatchResourceInner innerModel(); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchType.java new file mode 100644 index 0000000000000..5abab6408c7c6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** The type for the patch. */ +public final class PatchType extends ExpandableStringEnum { + /** Static value FrameworkSecurity for PatchType. */ + public static final PatchType FRAMEWORK_SECURITY = fromString("FrameworkSecurity"); + + /** Static value OSSecurity for PatchType. */ + public static final PatchType OSSECURITY = fromString("OSSecurity"); + + /** Static value FrameworkAndOSSecurity for PatchType. */ + public static final PatchType FRAMEWORK_AND_OSSECURITY = fromString("FrameworkAndOSSecurity"); + + /** Static value Other for PatchType. */ + public static final PatchType OTHER = fromString("Other"); + + /** + * Creates a new instance of PatchType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PatchType() { + } + + /** + * Creates or finds a PatchType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PatchType. + */ + @JsonCreator + public static PatchType fromString(String name) { + return fromString(name, PatchType.class); + } + + /** + * Gets known PatchType values. + * + * @return known PatchType values. + */ + public static Collection values() { + return values(PatchType.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Patches.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Patches.java new file mode 100644 index 0000000000000..2f451e9f150ae --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Patches.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of Patches. */ +public interface Patches { + /** + * List PatchResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param filter The filter to apply on the operation. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App SourceToCloud patch collection along with {@link Response}. + */ + Response listByBuilderResourceWithResponse( + String resourceGroupName, String builderName, String filter, Context context); + + /** + * List PatchResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App SourceToCloud patch collection. + */ + PatchCollection listByBuilderResource(String resourceGroupName, String builderName); + + /** + * Get details for specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details for specific patch by patch name along with {@link Response}. + */ + Response getWithResponse( + String resourceGroupName, String builderName, String patchName, Context context); + + /** + * Get details for specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details for specific patch by patch name. + */ + PatchResource get(String resourceGroupName, String builderName, String patchName); + + /** + * Delete specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String builderName, String patchName); + + /** + * Delete specific patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String builderName, String patchName, Context context); + + /** + * Configure the patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void skipConfigure(String resourceGroupName, String builderName, String patchName, boolean patchSkipConfig); + + /** + * Configure the patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void skipConfigure( + String resourceGroupName, String builderName, String patchName, boolean patchSkipConfig, Context context); + + /** + * Apply a PatchResource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Patch. + */ + PatchResource apply(String resourceGroupName, String builderName, String patchName); + + /** + * Apply a PatchResource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Patch. + */ + PatchResource apply(String resourceGroupName, String builderName, String patchName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PreBuildStep.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PreBuildStep.java new file mode 100644 index 0000000000000..fa53f1ecadaae --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PreBuildStep.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Model representing a pre-build step. */ +@Fluent +public final class PreBuildStep { + /* + * Description of the pre-build step. + */ + @JsonProperty(value = "description") + private String description; + + /* + * List of custom commands to run. + */ + @JsonProperty(value = "scripts") + private List scripts; + + /* + * Http get request to send before the build. + */ + @JsonProperty(value = "httpGet") + private HttpGet httpGet; + + /** Creates an instance of PreBuildStep class. */ + public PreBuildStep() { + } + + /** + * Get the description property: Description of the pre-build step. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the pre-build step. + * + * @param description the description value to set. + * @return the PreBuildStep object itself. + */ + public PreBuildStep withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the scripts property: List of custom commands to run. + * + * @return the scripts value. + */ + public List scripts() { + return this.scripts; + } + + /** + * Set the scripts property: List of custom commands to run. + * + * @param scripts the scripts value to set. + * @return the PreBuildStep object itself. + */ + public PreBuildStep withScripts(List scripts) { + this.scripts = scripts; + return this; + } + + /** + * Get the httpGet property: Http get request to send before the build. + * + * @return the httpGet value. + */ + public HttpGet httpGet() { + return this.httpGet; + } + + /** + * Set the httpGet property: Http get request to send before the build. + * + * @param httpGet the httpGet value to set. + * @return the PreBuildStep object itself. + */ + public PreBuildStep withHttpGet(HttpGet httpGet) { + this.httpGet = httpGet; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (httpGet() != null) { + httpGet().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Replica.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Replica.java index f3df8cdf13fe8..6d183d5126565 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Replica.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Replica.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; import java.time.OffsetDateTime; import java.util.List; @@ -31,6 +32,13 @@ public interface Replica { */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the createdTime property: Timestamp describing when the pod was created by controller. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ResourceProviders.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ResourceProviders.java index 548ce75182790..c842305e375f9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ResourceProviders.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ResourceProviders.java @@ -38,4 +38,26 @@ Response jobExecutionWithResponse( * @return details of a single job execution. */ JobExecution jobExecution(String resourceGroupName, String jobName, String jobExecutionName); + + /** + * Get the verification id of a subscription used for verifying custom domains. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the verification id of a subscription used for verifying custom domains along with {@link Response}. + */ + Response getCustomDomainVerificationIdWithResponse(Context context); + + /** + * Get the verification id of a subscription used for verifying custom domains. + * + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the verification id of a subscription used for verifying custom domains. + */ + String getCustomDomainVerificationId(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java index 5e2eeb58945e8..d8a070ce555de 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; import java.time.OffsetDateTime; @@ -30,6 +31,13 @@ public interface Revision { */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the createdTime property: Timestamp describing when the revision was created by controller. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControl.java index e1e9cf9f49351..4827f52b88fae 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; @@ -30,6 +31,13 @@ public interface SourceControl { */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the operationState property: Current provisioning State of the operation. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TokenStore.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TokenStore.java new file mode 100644 index 0000000000000..4a29feda66c82 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TokenStore.java @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The configuration settings of the token store. */ +@Fluent +public final class TokenStore { + /* + * true to durably store platform-specific security tokens that are obtained during login flows; + * otherwise, false. + * The default is false. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * The number of hours after session token expiration that a session token can be used to + * call the token refresh API. The default is 72 hours. + */ + @JsonProperty(value = "tokenRefreshExtensionHours") + private Double tokenRefreshExtensionHours; + + /* + * The configuration settings of the storage of the tokens if blob storage is used. + */ + @JsonProperty(value = "azureBlobStorage") + private BlobStorageTokenStore azureBlobStorage; + + /** Creates an instance of TokenStore class. */ + public TokenStore() { + } + + /** + * Get the enabled property: <code>true</code> to durably store platform-specific security tokens that + * are obtained during login flows; otherwise, <code>false</code>. The default is + * <code>false</code>. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: <code>true</code> to durably store platform-specific security tokens that + * are obtained during login flows; otherwise, <code>false</code>. The default is + * <code>false</code>. + * + * @param enabled the enabled value to set. + * @return the TokenStore object itself. + */ + public TokenStore withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the tokenRefreshExtensionHours property: The number of hours after session token expiration that a session + * token can be used to call the token refresh API. The default is 72 hours. + * + * @return the tokenRefreshExtensionHours value. + */ + public Double tokenRefreshExtensionHours() { + return this.tokenRefreshExtensionHours; + } + + /** + * Set the tokenRefreshExtensionHours property: The number of hours after session token expiration that a session + * token can be used to call the token refresh API. The default is 72 hours. + * + * @param tokenRefreshExtensionHours the tokenRefreshExtensionHours value to set. + * @return the TokenStore object itself. + */ + public TokenStore withTokenRefreshExtensionHours(Double tokenRefreshExtensionHours) { + this.tokenRefreshExtensionHours = tokenRefreshExtensionHours; + return this; + } + + /** + * Get the azureBlobStorage property: The configuration settings of the storage of the tokens if blob storage is + * used. + * + * @return the azureBlobStorage value. + */ + public BlobStorageTokenStore azureBlobStorage() { + return this.azureBlobStorage; + } + + /** + * Set the azureBlobStorage property: The configuration settings of the storage of the tokens if blob storage is + * used. + * + * @param azureBlobStorage the azureBlobStorage value to set. + * @return the TokenStore object itself. + */ + public TokenStore withAzureBlobStorage(BlobStorageTokenStore azureBlobStorage) { + this.azureBlobStorage = azureBlobStorage; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (azureBlobStorage() != null) { + azureBlobStorage().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TracesConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TracesConfiguration.java new file mode 100644 index 0000000000000..c2c02d6603316 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TracesConfiguration.java @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Configuration of Open Telemetry traces. */ +@Fluent +public final class TracesConfiguration { + /* + * Open telemetry traces destinations + */ + @JsonProperty(value = "destinations") + private List destinations; + + /** Creates an instance of TracesConfiguration class. */ + public TracesConfiguration() { + } + + /** + * Get the destinations property: Open telemetry traces destinations. + * + * @return the destinations value. + */ + public List destinations() { + return this.destinations; + } + + /** + * Set the destinations property: Open telemetry traces destinations. + * + * @param destinations the destinations value to set. + * @return the TracesConfiguration object itself. + */ + public TracesConfiguration withDestinations(List destinations) { + this.destinations = destinations; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Usage.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Usage.java new file mode 100644 index 0000000000000..73d4fd0362c56 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Usage.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; + +/** An immutable client-side representation of Usage. */ +public interface Usage { + /** + * Gets the unit property: An enum describing the unit of usage measurement. + * + * @return the unit value. + */ + String unit(); + + /** + * Gets the currentValue property: The current usage of the resource. + * + * @return the currentValue value. + */ + int currentValue(); + + /** + * Gets the limit property: The maximum permitted usage of the resource. + * + * @return the limit value. + */ + long limit(); + + /** + * Gets the name property: The name of the type of usage. + * + * @return the name value. + */ + UsageName name(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.UsageInner object. + * + * @return the inner object. + */ + UsageInner innerModel(); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UsageName.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UsageName.java new file mode 100644 index 0000000000000..2b5b53edea3d3 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UsageName.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** The Usage Names. */ +@Fluent +public final class UsageName { + /* + * The name of the resource. + */ + @JsonProperty(value = "value") + private String value; + + /* + * The localized name of the resource. + */ + @JsonProperty(value = "localizedValue") + private String localizedValue; + + /** Creates an instance of UsageName class. */ + public UsageName() { + } + + /** + * Get the value property: The name of the resource. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: The name of the resource. + * + * @param value the value value to set. + * @return the UsageName object itself. + */ + public UsageName withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the localizedValue property: The localized name of the resource. + * + * @return the localizedValue value. + */ + public String localizedValue() { + return this.localizedValue; + } + + /** + * Set the localizedValue property: The localized name of the resource. + * + * @param localizedValue the localizedValue value to set. + * @return the UsageName object itself. + */ + public UsageName withLocalizedValue(String localizedValue) { + this.localizedValue = localizedValue; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Usages.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Usages.java new file mode 100644 index 0000000000000..c8f28be96952f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Usages.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of Usages. */ +public interface Usages { + /** + * Gets, for the specified location, the current resource usage information as well as the limits under the + * subscription. + * + * @param location The location for which resource usage is queried. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location); + + /** + * Gets, for the specified location, the current resource usage information as well as the limits under the + * subscription. + * + * @param location The location for which resource usage is queried. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStates.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStates.java index db01b9b5bb5a5..a09c589800a99 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStates.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStates.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; /** An immutable client-side representation of WorkloadProfileStates. */ @@ -36,6 +37,13 @@ public interface WorkloadProfileStates { */ WorkloadProfileStatesProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner object. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java index fc26f7c84d77e..c931731eadd85 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for AvailableWorkloadProfiles Get. */ public final class AvailableWorkloadProfilesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AvailableWorkloadProfiles_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/AvailableWorkloadProfiles_Get.json */ /** * Sample code: BillingMeters_Get. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java index 2d96fe6be1492..57588e90d0456 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java @@ -7,7 +7,7 @@ /** Samples for BillingMeters Get. */ public final class BillingMetersGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/BillingMeters_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/BillingMeters_Get.json */ /** * Sample code: BillingMeters_Get. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..465c9f385a2b9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateSamples.java @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Builders CreateOrUpdate. */ +public final class BuildersCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builders_CreateOrUpdate.json + */ + /** + * Sample code: Builders_CreateOrUpdate_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildersCreateOrUpdate0( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .builders() + .define("testBuilder") + .withRegion("eastus") + .withExistingResourceGroup("rg") + .withTags(mapOf("company", "Microsoft")) + .withIdentity( + new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities( + mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", + new UserAssignedIdentity()))) + .withEnvironmentId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv") + .withContainerRegistries( + Arrays + .asList( + new ContainerRegistry() + .withContainerRegistryServer("test.azurecr.io") + .withIdentityResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"), + new ContainerRegistry() + .withContainerRegistryServer("test2.azurecr.io") + .withIdentityResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersDeleteSamples.java new file mode 100644 index 0000000000000..9a27eab886a55 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersDeleteSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** Samples for Builders Delete. */ +public final class BuildersDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builders_Delete.json + */ + /** + * Sample code: Builders_Delete_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildersDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builders().delete("rg", "testBuilder", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupSamples.java new file mode 100644 index 0000000000000..86ca4082399ca --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** Samples for Builders GetByResourceGroup. */ +public final class BuildersGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builders_Get.json + */ + /** + * Sample code: Builders_Get_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildersGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builders().getByResourceGroupWithResponse("rg", "testBuilder", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupSamples.java new file mode 100644 index 0000000000000..774e3d5664225 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** Samples for Builders ListByResourceGroup. */ +public final class BuildersListByResourceGroupSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builders_ListByResourceGroup.json + */ + /** + * Sample code: Builders_ListByResourceGroup_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildersListByResourceGroup0( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builders().listByResourceGroup("rg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListSamples.java new file mode 100644 index 0000000000000..7b28955be9142 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** Samples for Builders List. */ +public final class BuildersListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builders_ListBySubscription.json + */ + /** + * Sample code: Builders_ListBySubscription_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildersListBySubscription0( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builders().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersUpdateSamples.java new file mode 100644 index 0000000000000..5fdab4be3a427 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.resourcemanager.appcontainers.models.BuilderResource; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Builders Update. */ +public final class BuildersUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builders_Update.json + */ + /** + * Sample code: Builders_Update_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildersUpdate0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + BuilderResource resource = + manager + .builders() + .getByResourceGroupWithResponse("rg", "testBuilder", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withTags(mapOf("mytag1", "myvalue1")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsCreateOrUpdateSamples.java new file mode 100644 index 0000000000000..e6db0c91a2f92 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsCreateOrUpdateSamples.java @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.resourcemanager.appcontainers.models.BuildConfiguration; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; +import com.azure.resourcemanager.appcontainers.models.EnvironmentVariable; +import com.azure.resourcemanager.appcontainers.models.HttpGet; +import com.azure.resourcemanager.appcontainers.models.PreBuildStep; +import java.util.Arrays; + +/** Samples for Builds CreateOrUpdate. */ +public final class BuildsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_CreateOrUpdate.json + */ + /** + * Sample code: Builds_CreateOrUpdate_WithConfig. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildsCreateOrUpdateWithConfig( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .builds() + .define("testBuild-123456789az") + .withExistingBuilder("rg", "testBuilder") + .withDestinationContainerRegistry( + new ContainerRegistryWithCustomImage() + .withServer("test.azurecr.io") + .withImage("test.azurecr.io/repo:tag")) + .withConfiguration( + new BuildConfiguration() + .withBaseOs("DebianBullseye") + .withPlatform("dotnetcore") + .withPlatformVersion("7.0") + .withEnvironmentVariables( + Arrays + .asList( + new EnvironmentVariable().withName("foo1").withValue("bar1"), + new EnvironmentVariable().withName("foo2").withValue("bar2"))) + .withPreBuildSteps( + Arrays + .asList( + new PreBuildStep() + .withDescription("First pre build step.") + .withScripts(Arrays.asList("echo 'hello'", "echo 'world'")) + .withHttpGet( + new HttpGet() + .withUrl("https://microsoft.com") + .withFileName("output.txt") + .withHeaders(Arrays.asList("foo", "bar"))), + new PreBuildStep() + .withDescription("Second pre build step.") + .withScripts(Arrays.asList("echo 'hello'", "echo 'again'")) + .withHttpGet( + new HttpGet() + .withUrl("https://microsoft.com") + .withFileName("output.txt") + .withHeaders(Arrays.asList("foo")))))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_CreateOrUpdate_NoConfig.json + */ + /** + * Sample code: Builds_CreateOrUpdate_NoConfig. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildsCreateOrUpdateNoConfig( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builds().define("testBuild").withExistingBuilder("rg", "testBuilder").create(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsDeleteSamples.java new file mode 100644 index 0000000000000..1781b1d5b4cab --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsDeleteSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** Samples for Builds Delete. */ +public final class BuildsDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_Delete.json + */ + /** + * Sample code: Builds_Delete_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildsDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builds().delete("rg", "testBuilder", "testBuild", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsGetSamples.java new file mode 100644 index 0000000000000..e95b8d8209e28 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsGetSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** Samples for Builds Get. */ +public final class BuildsGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_Get.json + */ + /** + * Sample code: Builds_Get_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildsGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builds().getWithResponse("rg", "testBuilder", "testBuild", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsListByBuilderResourceSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsListByBuilderResourceSamples.java new file mode 100644 index 0000000000000..4dcadec29d266 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsListByBuilderResourceSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** Samples for Builds ListByBuilderResource. */ +public final class BuildsListByBuilderResourceSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Builds_ListByBuilderResource.json + */ + /** + * Sample code: Builds_ListByBuilderResource_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildsListByBuilderResource0( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builds().listByBuilderResource("rg", "testBuilder", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java index 7d3ada5340872..5c167c944146f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java @@ -6,11 +6,12 @@ import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; import com.azure.resourcemanager.appcontainers.models.CertificateProperties; +import com.azure.resourcemanager.appcontainers.models.CertificateType; /** Samples for Certificates CreateOrUpdate. */ public final class CertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Certificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -30,7 +31,8 @@ public static void createOrUpdateCertificate( .withProperties( new CertificateProperties() .withPassword("fakeTokenPlaceholder") - .withValue("Y2VydA==".getBytes())), + .withValue("Y2VydA==".getBytes()) + .withType(CertificateType.IMAGE_PULL_TRUSTED_CA)), com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java index cc39bc23942ec..4966a6e0da3f1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Certificates Delete. */ public final class CertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Certificate_Delete.json */ /** * Sample code: Delete Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java index cd2c70dc99a4d..11795119a4116 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for Certificates Get. */ public final class CertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Certificate_Get.json */ /** * Sample code: Get Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java index b22269ab3bdbc..fb0d502e0c178 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java @@ -7,7 +7,7 @@ /** Samples for Certificates List. */ public final class CertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Certificates_ListByManagedEnvironment.json */ /** * Sample code: List Certificates by Managed Environment. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java index 709fe08925a65..16da8fc2fd43a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for Certificates Update. */ public final class CertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Certificates_Patch.json */ /** * Sample code: Patch Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java index 34426b12ab877..7f3df4266d4ff 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for ConnectedEnvironmentsCertificates CreateOrUpdate. */ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java index d61ec9dbec42b..41fa9bd08c336 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironmentsCertificates Delete. */ public final class ConnectedEnvironmentsCertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json */ /** * Sample code: Delete Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java index e6631de95ac40..ee6877c24c39e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironmentsCertificates Get. */ public final class ConnectedEnvironmentsCertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json */ /** * Sample code: Get Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java index 2c2a8fd6e499a..7952420933993 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironmentsCertificates List. */ public final class ConnectedEnvironmentsCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json */ /** * Sample code: List Certificates by Connected Environment. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java index 2ad18da66708d..042d4830b948d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for ConnectedEnvironmentsCertificates Update. */ public final class ConnectedEnvironmentsCertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json */ /** * Sample code: Patch Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java index 0d86087d57820..3e56f4f9d0279 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java @@ -9,7 +9,7 @@ /** Samples for ConnectedEnvironments CheckNameAvailability. */ public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java index e6faa26d9ac2a..2a9bd2ea71bae 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java @@ -9,7 +9,7 @@ /** Samples for ConnectedEnvironments CreateOrUpdate. */ public final class ConnectedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create kube environments. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java index 0f41b4e6ae475..1f93f9980e841 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java @@ -4,14 +4,16 @@ package com.azure.resourcemanager.appcontainers.generated; +import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; +import com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata; import com.azure.resourcemanager.appcontainers.models.Secret; import java.util.Arrays; /** Samples for ConnectedEnvironmentsDaprComponents CreateOrUpdate. */ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json */ /** * Sample code: Create or update dapr component. @@ -37,6 +39,15 @@ public static void createOrUpdateDaprComponent( new DaprMetadata().withName("collection").withValue("items"), new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .withServiceComponentBind( + Arrays + .asList( + new DaprComponentServiceBinding() + .withName("statestore") + .withServiceId( + "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") + .withMetadata( + new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))) .create(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java index 08213cdf047d3..f1f8b8d4554d1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironmentsDaprComponents Delete. */ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json */ /** * Sample code: Delete dapr component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java index c315b1ce87e1e..5ee907c342276 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironmentsDaprComponents Get. */ public final class ConnectedEnvironmentsDaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json */ /** * Sample code: Get Dapr Component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java index 48092b3d64ff2..5ddcd85b7a80b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironmentsDaprComponents List. */ public final class ConnectedEnvironmentsDaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json */ /** * Sample code: List Dapr Components. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java index 905baafb61987..a9ba885bce13d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironmentsDaprComponents ListSecrets. */ public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java index a2ab7dbff31a1..019a229a25f86 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironments Delete. */ public final class ConnectedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironments_Delete.json */ /** * Sample code: Delete connected environment by connectedEnvironmentName. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java index 87c6e351dc178..49cbbb3ad54a5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironments GetByResourceGroup. */ public final class ConnectedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironments_Get.json */ /** * Sample code: Get connected environment by connectedEnvironmentName. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java index 24e8daf8315be..f07a58f614860 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironments ListByResourceGroup. */ public final class ConnectedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java index c902a717b52be..318dbac0eabf9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironments List. */ public final class ConnectedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironments_ListBySubscription.json */ /** * Sample code: List connected environments by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java index 3139a930bc9f1..5c9530fd1ef6c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for ConnectedEnvironmentsStorages CreateOrUpdate. */ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java index b6501e6c33f91..5cb96abacaeb9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironmentsStorages Delete. */ public final class ConnectedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java index 890dbec721347..1725d297c8df0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironmentsStorages Get. */ public final class ConnectedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java index e0c78e04ddf88..a4b90fe781894 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironmentsStorages List. */ public final class ConnectedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java index da3c24d3deccb..618c8ccb443dd 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java @@ -7,7 +7,7 @@ /** Samples for ConnectedEnvironments Update. */ public final class ConnectedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ConnectedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java index 9241aee1c4365..3a820e10c9459 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java @@ -6,6 +6,7 @@ import com.azure.resourcemanager.appcontainers.models.AppRegistration; import com.azure.resourcemanager.appcontainers.models.AuthPlatform; +import com.azure.resourcemanager.appcontainers.models.EncryptionSettings; import com.azure.resourcemanager.appcontainers.models.Facebook; import com.azure.resourcemanager.appcontainers.models.GlobalValidation; import com.azure.resourcemanager.appcontainers.models.IdentityProviders; @@ -14,7 +15,7 @@ /** Samples for ContainerAppsAuthConfigs CreateOrUpdate. */ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/AuthConfigs_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App AuthConfig. @@ -38,6 +39,10 @@ public static void createOrUpdateContainerAppAuthConfig( new AppRegistration() .withAppId("123") .withAppSecretSettingName("fakeTokenPlaceholder")))) + .withEncryptionSettings( + new EncryptionSettings() + .withContainerAppAuthEncryptionSecretName("fakeTokenPlaceholder") + .withContainerAppAuthSigningSecretName("fakeTokenPlaceholder")) .create(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java index 8cff519593580..9b3fdcb82340d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerAppsAuthConfigs Delete. */ public final class ContainerAppsAuthConfigsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/AuthConfigs_Delete.json */ /** * Sample code: Delete Container App AuthConfig. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java index c496745171404..9830b2fd8a63f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerAppsAuthConfigs Get. */ public final class ContainerAppsAuthConfigsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/AuthConfigs_Get.json */ /** * Sample code: Get Container App's AuthConfig. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java index 2f6c9020681d8..a3ec5d64a037f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerAppsAuthConfigs ListByContainerApp. */ public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/AuthConfigs_ListByContainer.json */ /** * Sample code: List Auth Configs by Container Apps. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java index 9e67a629cb81b..9e916a28fc715 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java @@ -21,6 +21,7 @@ import com.azure.resourcemanager.appcontainers.models.Dapr; import com.azure.resourcemanager.appcontainers.models.Ingress; import com.azure.resourcemanager.appcontainers.models.IngressClientCertificateMode; +import com.azure.resourcemanager.appcontainers.models.IngressPortMapping; import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; import com.azure.resourcemanager.appcontainers.models.InitContainer; @@ -41,7 +42,7 @@ /** Samples for ContainerApps CreateOrUpdate. */ public final class ContainerAppsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App. @@ -108,7 +109,15 @@ public static void createOrUpdateContainerApp( .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")) .withMaxAge(1234) - .withAllowCredentials(true))) + .withAllowCredentials(true)) + .withAdditionalPortMappings( + Arrays + .asList( + new IngressPortMapping().withExternal(true).withTargetPort(1234), + new IngressPortMapping() + .withExternal(false) + .withTargetPort(2345) + .withExposedPort(3456)))) .withDapr( new Dapr() .withEnabled(true) @@ -178,7 +187,7 @@ public static void createOrUpdateContainerApp( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_TcpApp_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json */ /** * Sample code: Create or Update Tcp App. @@ -239,7 +248,7 @@ public static void createOrUpdateTcpApp(com.azure.resourcemanager.appcontainers. } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ManagedBy_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json */ /** * Sample code: Create or Update ManagedBy App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java index d7b8bc4e1f7ac..99c950ef81bc3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerApps Delete. */ public final class ContainerAppsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_Delete.json */ /** * Sample code: Delete Container App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java index 992e7aa9bb034..0025bab6a8107 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerAppsDiagnostics GetDetector. */ public final class ContainerAppsDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerAppsDiagnostics_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerAppsDiagnostics_Get.json */ /** * Sample code: Get Container App's diagnostics info. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java index bd0c74d90e31c..d092862fc1631 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerAppsDiagnostics GetRevision. */ public final class ContainerAppsDiagnosticsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java index 937fbe5d46b82..955d55e54ef2a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerAppsDiagnostics GetRoot. */ public final class ContainerAppsDiagnosticsGetRootSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java index 390c12f486780..b584dc4f4ed52 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerAppsDiagnostics ListDetectors. */ public final class ContainerAppsDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerAppsDiagnostics_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerAppsDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostics for a given Container App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java index 20d47c4b4c604..4ca2f7e836b2e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerAppsDiagnostics ListRevisions. */ public final class ContainerAppsDiagnosticsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java index 8b1ba6a70851e..136cede0756b7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerApps GetAuthToken. */ public final class ContainerAppsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_GetAuthToken.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_GetAuthToken.json */ /** * Sample code: Get Container App Auth Token. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java index 9edea0317e640..ef9c1d18301ec 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerApps GetByResourceGroup. */ public final class ContainerAppsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java index 7bcf0aa375b08..769679bf95f80 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerApps ListByResourceGroup. */ public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_ListByResourceGroup.json */ /** * Sample code: List Container Apps by resource group. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java index 52c21100e52a0..7d800a0756af3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerApps ListCustomHostnameAnalysis. */ public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListCustomHostNameAnalysis.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json */ /** * Sample code: Analyze Custom Hostname. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java index 18ab90f2c3182..9d40020d44b41 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerApps List. */ public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_ListBySubscription.json */ /** * Sample code: List Container Apps by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java index aeb01c17975dc..ff0dd90ed5ad9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerApps ListSecrets. */ public final class ContainerAppsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java index 40ee7800d55b7..6176306a86bfb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerAppsRevisionReplicas GetReplica. */ public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Replicas_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Replicas_Get.json */ /** * Sample code: Get Container App's revision replica. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java index 7e7f5f482af56..75ae60c949273 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerAppsRevisionReplicas ListReplicas. */ public final class ContainerAppsRevisionReplicasListReplicasSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Replicas_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Replicas_List.json */ /** * Sample code: List Container App's replicas. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java index 39ec41f8b7678..e413bcb2499bb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerAppsRevisions ActivateRevision. */ public final class ContainerAppsRevisionsActivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Activate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Revisions_Activate.json */ /** * Sample code: Activate Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java index 5cb88570661f3..7cee6ec6f4aa9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerAppsRevisions DeactivateRevision. */ public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Deactivate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Revisions_Deactivate.json */ /** * Sample code: Deactivate Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java index 97956a6143760..11f4362086128 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerAppsRevisions GetRevision. */ public final class ContainerAppsRevisionsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java index 985067a2c45da..e761eaa1f906d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerAppsRevisions ListRevisions. */ public final class ContainerAppsRevisionsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java index bce649a169019..89ad735c28240 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerAppsRevisions RestartRevision. */ public final class ContainerAppsRevisionsRestartRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Restart.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Revisions_Restart.json */ /** * Sample code: Restart Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java index 8c03624e124b4..4cc628d9123b7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for ContainerAppsSourceControls CreateOrUpdate. */ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/SourceControls_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App SourceControl. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java index 54d5428861c18..2e4f1f2407969 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerAppsSourceControls Delete. */ public final class ContainerAppsSourceControlsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/SourceControls_Delete.json */ /** * Sample code: Delete Container App SourceControl. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java index f4e6fa68ec2c4..dd6a6f8944201 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerAppsSourceControls Get. */ public final class ContainerAppsSourceControlsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/SourceControls_Get.json */ /** * Sample code: Get Container App's SourceControl. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java index 883a72b2f8503..11bedf5315636 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerAppsSourceControls ListByContainerApp. */ public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/SourceControls_ListByContainer.json */ /** * Sample code: List App's Source Controls. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java index b1f49ae8f313f..53ac3fb50c8cf 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerApps Start. */ public final class ContainerAppsStartSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Start.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_Start.json */ /** * Sample code: Start Container App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java index ae4ab7a00a884..969cd99af830d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java @@ -7,7 +7,7 @@ /** Samples for ContainerApps Stop. */ public final class ContainerAppsStopSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Stop.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_Stop.json */ /** * Sample code: Stop Container App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java index dcdce3b8d1186..d0c2c9774f468 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java @@ -37,7 +37,7 @@ /** Samples for ContainerApps Update. */ public final class ContainerAppsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_Patch.json */ /** * Sample code: Patch Container App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCreateOrUpdateSamples.java index 30857b58e6c47..681abb32c8a61 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCreateOrUpdateSamples.java @@ -5,14 +5,16 @@ package com.azure.resourcemanager.appcontainers.generated; import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; +import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; +import com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata; import com.azure.resourcemanager.appcontainers.models.Secret; import java.util.Arrays; /** Samples for DaprComponents CreateOrUpdate. */ public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_CreateOrUpdate_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json */ /** * Sample code: Create or update dapr component with secrets. @@ -40,12 +42,23 @@ public static void createOrUpdateDaprComponentWithSecrets( new DaprMetadata().withName("database").withValue("itemsDB"), new DaprMetadata().withName("collection").withValue("items"), new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")), + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .withServiceComponentBind( + Arrays + .asList( + new DaprComponentServiceBinding() + .withName("statestore") + .withServiceId( + "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") + .withMetadata( + new DaprServiceBindMetadata() + .withName("daprcomponentBind") + .withValue("redis-bind")))), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json */ /** * Sample code: Create or update dapr component with secret store component. @@ -73,7 +86,18 @@ public static void createOrUpdateDaprComponentWithSecretStoreComponent( new DaprMetadata().withName("database").withValue("itemsDB"), new DaprMetadata().withName("collection").withValue("items"), new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")), + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .withServiceComponentBind( + Arrays + .asList( + new DaprComponentServiceBinding() + .withName("statestore") + .withServiceId( + "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") + .withMetadata( + new DaprServiceBindMetadata() + .withName("daprcomponentBind") + .withValue("redis-bind")))), com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java index b43543b25ff92..84a4f521f5a3a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for DaprComponents Delete. */ public final class DaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_Delete.json */ /** * Sample code: Delete dapr component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java index 9d78dfd7338a1..b3a1449e003b5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java @@ -7,7 +7,7 @@ /** Samples for DaprComponents Get. */ public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_Get_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json */ /** * Sample code: Get Dapr Component with secret store component. @@ -22,7 +22,7 @@ public static void getDaprComponentWithSecretStoreComponent( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_Get_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_Get_Secrets.json */ /** * Sample code: Get Dapr Component with secrets. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java index 42a07bc738808..edbf28b744136 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java @@ -7,7 +7,7 @@ /** Samples for DaprComponents List. */ public final class DaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_List.json */ /** * Sample code: List Dapr Components. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java index a08f7ca6bfce5..662dc7e1e3b8e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java @@ -7,7 +7,7 @@ /** Samples for DaprComponents ListSecrets. */ public final class DaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/DaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsCreateOrUpdateSamples.java index 016f291626e5f..e7fbdd72dda49 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsCreateOrUpdateSamples.java @@ -26,7 +26,7 @@ /** Samples for Jobs CreateOrUpdate. */ public final class JobsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_CreateorUpdate_EventTrigger.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_CreateorUpdate_EventTrigger.json */ /** * Sample code: Create or Update Container Apps Job With Event Driven Trigger. @@ -90,7 +90,7 @@ public static void createOrUpdateContainerAppsJobWithEventDrivenTrigger( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_CreateorUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_CreateorUpdate.json */ /** * Sample code: Create or Update Container Apps Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteSamples.java index 871bcabeac07d..e455ec00ed1fe 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for Jobs Delete. */ public final class JobsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Delete.json */ /** * Sample code: Delete Container Apps Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListSamples.java index e4c7ee3ca564a..bed6793c21605 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListSamples.java @@ -7,7 +7,7 @@ /** Samples for JobsExecutions List. */ public final class JobsExecutionsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Executions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Executions_Get.json */ /** * Sample code: Get a Container Apps Job Executions. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetByResourceGroupSamples.java index a874e18846807..67d4c58380fc4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for Jobs GetByResourceGroup. */ public final class JobsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Get.json */ /** * Sample code: Get Container Apps Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java index cc7de8ef684de..807a7e570b010 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for Jobs ListByResourceGroup. */ public final class JobsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Jobs_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Jobs_ListByResourceGroup.json */ /** * Sample code: List Container Apps Jobs by resource group. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java index 0e97b2fc3b37a..ff4da48ef0450 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Jobs List. */ public final class JobsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Jobs_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Jobs_ListBySubscription.json */ /** * Sample code: List Container Apps Jobs by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSecretsSamples.java index 6c143787f249d..72a43c79334f3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSecretsSamples.java @@ -7,7 +7,7 @@ /** Samples for Jobs ListSecrets. */ public final class JobsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_ListSecrets.json */ /** * Sample code: List Container Apps Job Secrets. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStartSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStartSamples.java index f816938a3c82d..c8644abfd67b2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStartSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStartSamples.java @@ -12,7 +12,7 @@ /** Samples for Jobs Start. */ public final class JobsStartSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Start.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Start.json */ /** * Sample code: Run a Container Apps Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionSamples.java index bdc43bc3fe758..9a0d9cc1d2935 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionSamples.java @@ -7,7 +7,7 @@ /** Samples for Jobs StopExecution. */ public final class JobsStopExecutionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Stop_Execution.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Stop_Execution.json */ /** * Sample code: Terminate a Container Apps Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsSamples.java index cdd0821a101d2..5034d0f9d323b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsSamples.java @@ -7,7 +7,7 @@ /** Samples for Jobs StopMultipleExecutions. */ public final class JobsStopMultipleExecutionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Stop_Multiple.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Stop_Multiple.json */ /** * Sample code: Terminate Multiple Container Apps Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsUpdateSamples.java index 6d27fb4dbcd33..3e584086623d3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsUpdateSamples.java @@ -22,7 +22,7 @@ /** Samples for Jobs Update. */ public final class JobsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Patch.json */ /** * Sample code: Patch Container Apps Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java index 4edc4b3c8106b..75e8d53a35510 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java @@ -10,7 +10,7 @@ /** Samples for ManagedCertificates CreateOrUpdate. */ public final class ManagedCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedCertificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java index ca06075abb5ab..2afda871caf81 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ManagedCertificates Delete. */ public final class ManagedCertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedCertificate_Delete.json */ /** * Sample code: Delete Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java index 103bf88d56713..c9e4459d9d948 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for ManagedCertificates Get. */ public final class ManagedCertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedCertificate_Get.json */ /** * Sample code: Get Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java index 41123accf3f86..8b52f4312fdfc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java @@ -7,7 +7,7 @@ /** Samples for ManagedCertificates List. */ public final class ManagedCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedCertificates_ListByManagedEnvironment.json */ /** * Sample code: List Managed Certificates by Managed Environment. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java index f2a73091a95c8..559651335593e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for ManagedCertificates Update. */ public final class ManagedCertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedCertificates_Patch.json */ /** * Sample code: Patch Managed Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java index 87b75b6d922e1..9f6404babe279 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironmentDiagnostics GetDetector. */ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentDiagnostics_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json */ /** * Sample code: Get diagnostic data for a managed environments. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java index f7704984eafd1..48dd8c6a784e3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironmentDiagnostics ListDetectors. */ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentDiagnostics_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostic data for a managed environments. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListSamples.java new file mode 100644 index 0000000000000..9d5549e71cbbb --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListSamples.java @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** Samples for ManagedEnvironmentUsages List. */ +public final class ManagedEnvironmentUsagesListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentUsages_List.json + */ + /** + * Sample code: List managed environment usages. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listManagedEnvironmentUsages( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironmentUsages().list("examplerg", "jlaw-demo1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java index 05df7f2c4a9c3..c7d9118be1570 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java @@ -4,11 +4,18 @@ package com.azure.resourcemanager.appcontainers.generated; +import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; +import com.azure.resourcemanager.appcontainers.models.DataDogConfiguration; +import com.azure.resourcemanager.appcontainers.models.DestinationsConfiguration; import com.azure.resourcemanager.appcontainers.models.LogAnalyticsConfiguration; +import com.azure.resourcemanager.appcontainers.models.LogsConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; +import com.azure.resourcemanager.appcontainers.models.MetricsConfiguration; import com.azure.resourcemanager.appcontainers.models.Mtls; +import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; +import com.azure.resourcemanager.appcontainers.models.TracesConfiguration; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import java.util.Arrays; @@ -16,7 +23,7 @@ /** Samples for ManagedEnvironments CreateOrUpdate. */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json */ /** * Sample code: Create environment with custom infrastructureResourceGroup. @@ -70,7 +77,7 @@ public static void createEnvironmentWithCustomInfrastructureResourceGroup( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create environments. @@ -93,6 +100,19 @@ public static void createEnvironments(com.azure.resourcemanager.appcontainers.Co new AppLogsConfiguration() .withLogAnalyticsConfiguration( new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("fakeTokenPlaceholder"))) + .withAppInsightsConfiguration( + new AppInsightsConfiguration() + .withConnectionString( + "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/")) + .withOpenTelemetryConfiguration( + new OpenTelemetryConfiguration() + .withDestinationsConfiguration( + new DestinationsConfiguration() + .withDataDogConfiguration( + new DataDogConfiguration().withSite("string").withKey("fakeTokenPlaceholder"))) + .withTracesConfiguration(new TracesConfiguration().withDestinations(Arrays.asList("appInsights"))) + .withLogsConfiguration(new LogsConfiguration().withDestinations(Arrays.asList("appInsights"))) + .withMetricsConfiguration(new MetricsConfiguration().withDestinations(Arrays.asList("dataDog")))) .withZoneRedundant(true) .withCustomDomainConfiguration( new CustomDomainConfiguration() diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java index 054f73203210b..a21cc62a67d2d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironments Delete. */ public final class ManagedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_Delete.json */ /** * Sample code: Delete environment by name. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java index ce30d1f231370..4afc1018851ea 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironmentsDiagnostics GetRoot. */ public final class ManagedEnvironmentsDiagnosticsGetRootSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java index 75360fb7b838d..72c24d0b81c1e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironments GetAuthToken. */ public final class ManagedEnvironmentsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_GetAuthToken.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_GetAuthToken.json */ /** * Sample code: Get Managed Environment Auth Token. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java index 92cc0793165c3..d05975388b8c6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironments GetByResourceGroup. */ public final class ManagedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java index 393cc7c3e5b0b..1c027d605c39e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironments ListByResourceGroup. */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java index f7411924aff87..ce0d770d58835 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironments List. */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_ListBySubscription.json */ /** * Sample code: List environments by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java index 307209c681a17..1b685419c443b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironments ListWorkloadProfileStates. */ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_ListWorkloadProfileStates.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json */ /** * Sample code: List environments by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java index a9312d5fa604d..b6b3145e3b592 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for ManagedEnvironmentsStorages CreateOrUpdate. */ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java index dd6296422fc5a..e0b6d83b03be4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironmentsStorages Delete. */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java index 5e0eeb477f66c..649095196527f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironmentsStorages Get. */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java index 077dbf57477ae..37dd002c38639 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java @@ -7,7 +7,7 @@ /** Samples for ManagedEnvironmentsStorages List. */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java index 473995a4eb266..55ca54c54eefe 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for ManagedEnvironments Update. */ public final class ManagedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ManagedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java index 8a68bc86390ca..9ac5d25967d6b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java @@ -9,7 +9,7 @@ /** Samples for Namespaces CheckNameAvailability. */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Certificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -30,7 +30,7 @@ public static void certificatesCheckNameAvailability( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/ContainerApps_CheckNameAvailability.json */ /** * Sample code: ContainerApps_CheckNameAvailability. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java index 6453506f85a34..c66828f0203d1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java @@ -7,7 +7,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Operations_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Operations_List.json */ /** * Sample code: List all operations. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/PatchesApplySamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/PatchesApplySamples.java new file mode 100644 index 0000000000000..8621b7746a59a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/PatchesApplySamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** Samples for Patches Apply. */ +public final class PatchesApplySamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Patches_Apply.json + */ + /** + * Sample code: Patches_Apply_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchesApply0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.patches().apply("rg", "testBuilder", "testPatch-25fe4b", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/PatchesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/PatchesDeleteSamples.java new file mode 100644 index 0000000000000..ae937a7ec08bd --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/PatchesDeleteSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** Samples for Patches Delete. */ +public final class PatchesDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Patches_Delete.json + */ + /** + * Sample code: Patches_Delete_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchesDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.patches().delete("rg", "testBuilder", "testPatch-25fe4b", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/PatchesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/PatchesGetSamples.java new file mode 100644 index 0000000000000..ccea1d5f2104d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/PatchesGetSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** Samples for Patches Get. */ +public final class PatchesGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Patches_Get.json + */ + /** + * Sample code: Patches_Get_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchesGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.patches().getWithResponse("rg", "testBuilder", "testPatch-25fe4b", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/PatchesListByBuilderResourceSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/PatchesListByBuilderResourceSamples.java new file mode 100644 index 0000000000000..e96dd492f98fd --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/PatchesListByBuilderResourceSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** Samples for Patches ListByBuilderResource. */ +public final class PatchesListByBuilderResourceSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Patches_ListByBuilderResource.json + */ + /** + * Sample code: Patches_ListByBuilderResource_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchesListByBuilderResource0( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .patches() + .listByBuilderResourceWithResponse("rg", "testBuilder", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/PatchesSkipConfigureSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/PatchesSkipConfigureSamples.java new file mode 100644 index 0000000000000..57a4b593016dc --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/PatchesSkipConfigureSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** Samples for Patches SkipConfigure. */ +public final class PatchesSkipConfigureSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Patches_Skip_Configure.json + */ + /** + * Sample code: Patches_Skip_Configure_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchesSkipConfigure0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .patches() + .skipConfigure("rg", "testBuilder", "testPatch-25fe4b", true, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderGetCustomDomainVerificationIdSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderGetCustomDomainVerificationIdSamples.java new file mode 100644 index 0000000000000..5f14c95477a8f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderGetCustomDomainVerificationIdSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** Samples for ResourceProvider GetCustomDomainVerificationId. */ +public final class ResourceProviderGetCustomDomainVerificationIdSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Subscriptions_GetCustomDomainVerificationId.json + */ + /** + * Sample code: List all operations. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listAllOperations(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.resourceProviders().getCustomDomainVerificationIdWithResponse(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java index 1a03ed51d5e3a..1fc785207683c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java @@ -7,7 +7,7 @@ /** Samples for ResourceProvider JobExecution. */ public final class ResourceProviderJobExecutionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Execution_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Job_Execution_Get.json */ /** * Sample code: Get a single Job Execution. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/UsagesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/UsagesListSamples.java new file mode 100644 index 0000000000000..71da7d949512c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/UsagesListSamples.java @@ -0,0 +1,20 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** Samples for Usages List. */ +public final class UsagesListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-08-01-preview/examples/Usages_List.json + */ + /** + * Sample code: List usages. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listUsages(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.usages().list("westus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java deleted file mode 100644 index 5f3f4f48f8680..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedAudiencesValidation; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AllowedAudiencesValidationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AllowedAudiencesValidation model = - BinaryData - .fromString("{\"allowedAudiences\":[\"wzrlovmclwhij\",\"oejctbzaqsqsy\"]}") - .toObject(AllowedAudiencesValidation.class); - Assertions.assertEquals("wzrlovmclwhij", model.allowedAudiences().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllowedAudiencesValidation model = - new AllowedAudiencesValidation().withAllowedAudiences(Arrays.asList("wzrlovmclwhij", "oejctbzaqsqsy")); - model = BinaryData.fromObject(model).toObject(AllowedAudiencesValidation.class); - Assertions.assertEquals("wzrlovmclwhij", model.allowedAudiences().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.java deleted file mode 100644 index 72c21b159380a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedPrincipals; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AllowedPrincipalsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AllowedPrincipals model = - BinaryData - .fromString("{\"groups\":[\"xhcr\",\"nohjt\"],\"identities\":[\"h\",\"soifiyipjxsqw\",\"gr\"]}") - .toObject(AllowedPrincipals.class); - Assertions.assertEquals("xhcr", model.groups().get(0)); - Assertions.assertEquals("h", model.identities().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllowedPrincipals model = - new AllowedPrincipals() - .withGroups(Arrays.asList("xhcr", "nohjt")) - .withIdentities(Arrays.asList("h", "soifiyipjxsqw", "gr")); - model = BinaryData.fromObject(model).toObject(AllowedPrincipals.class); - Assertions.assertEquals("xhcr", model.groups().get(0)); - Assertions.assertEquals("h", model.identities().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigCollectionTests.java deleted file mode 100644 index 3f774f15d4666..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigCollectionTests.java +++ /dev/null @@ -1,364 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; -import com.azure.resourcemanager.appcontainers.models.AllowedAudiencesValidation; -import com.azure.resourcemanager.appcontainers.models.AppRegistration; -import com.azure.resourcemanager.appcontainers.models.Apple; -import com.azure.resourcemanager.appcontainers.models.AppleRegistration; -import com.azure.resourcemanager.appcontainers.models.AuthConfigCollection; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectory; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryLogin; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryRegistration; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryValidation; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebApps; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebAppsRegistration; -import com.azure.resourcemanager.appcontainers.models.ClientRegistration; -import com.azure.resourcemanager.appcontainers.models.CookieExpiration; -import com.azure.resourcemanager.appcontainers.models.CookieExpirationConvention; -import com.azure.resourcemanager.appcontainers.models.CustomOpenIdConnectProvider; -import com.azure.resourcemanager.appcontainers.models.Facebook; -import com.azure.resourcemanager.appcontainers.models.ForwardProxy; -import com.azure.resourcemanager.appcontainers.models.ForwardProxyConvention; -import com.azure.resourcemanager.appcontainers.models.GitHub; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.Google; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.HttpSettingsRoutes; -import com.azure.resourcemanager.appcontainers.models.IdentityProviders; -import com.azure.resourcemanager.appcontainers.models.Login; -import com.azure.resourcemanager.appcontainers.models.LoginRoutes; -import com.azure.resourcemanager.appcontainers.models.LoginScopes; -import com.azure.resourcemanager.appcontainers.models.Nonce; -import com.azure.resourcemanager.appcontainers.models.Twitter; -import com.azure.resourcemanager.appcontainers.models.TwitterRegistration; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AuthConfigCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AuthConfigCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"platform\":{\"enabled\":false,\"runtimeVersion\":\"gjxpybczmehmt\"},\"globalValidation\":{\"unauthenticatedClientAction\":\"Return403\",\"redirectToProvider\":\"phrupidgsybbejhp\",\"excludedPaths\":[\"cmsxaobhdxbm\"]},\"identityProviders\":{\"azureActiveDirectory\":{\"enabled\":false,\"registration\":{},\"login\":{},\"validation\":{},\"isAutoProvisioned\":false},\"facebook\":{\"enabled\":false,\"registration\":{},\"graphApiVersion\":\"ownoizhw\",\"login\":{}},\"gitHub\":{\"enabled\":false,\"registration\":{},\"login\":{}},\"google\":{\"enabled\":false,\"registration\":{},\"login\":{},\"validation\":{}},\"twitter\":{\"enabled\":true,\"registration\":{}},\"apple\":{\"enabled\":true,\"registration\":{},\"login\":{}},\"azureStaticWebApps\":{\"enabled\":false,\"registration\":{}},\"customOpenIdConnectProviders\":{\"nrbtcqqjnq\":{}}},\"login\":{\"routes\":{\"logoutEndpoint\":\"gnufoooj\"},\"preserveUrlFragmentsForLogins\":true,\"allowedExternalRedirectUrls\":[\"qes\"],\"cookieExpiration\":{\"convention\":\"IdentityProviderDerived\",\"timeToExpiration\":\"mglzlhj\"},\"nonce\":{\"validateNonce\":false,\"nonceExpirationInterval\":\"wmrvktsizntocipa\"}},\"httpSettings\":{\"requireHttps\":false,\"routes\":{\"apiPrefix\":\"qucmpo\"},\"forwardProxy\":{\"convention\":\"Standard\",\"customHostHeaderName\":\"ogknygjofjdd\",\"customProtoHeaderName\":\"s\"}}},\"id\":\"eupewnwreitjz\",\"name\":\"flusarhmof\",\"type\":\"qhsmyurkdtml\"},{\"properties\":{\"platform\":{\"enabled\":true,\"runtimeVersion\":\"sjtxukcdmp\"},\"globalValidation\":{\"unauthenticatedClientAction\":\"Return403\",\"redirectToProvider\":\"uanzwuxzdx\",\"excludedPaths\":[\"rlhm\",\"hfpmrqobmtukknr\",\"rtihfxtijbpz\",\"gnwzsymglzufc\"]},\"identityProviders\":{\"azureActiveDirectory\":{\"enabled\":false,\"registration\":{},\"login\":{},\"validation\":{},\"isAutoProvisioned\":true},\"facebook\":{\"enabled\":false,\"registration\":{},\"graphApiVersion\":\"cbjy\",\"login\":{}},\"gitHub\":{\"enabled\":false,\"registration\":{},\"login\":{}},\"google\":{\"enabled\":true,\"registration\":{},\"login\":{},\"validation\":{}},\"twitter\":{\"enabled\":true,\"registration\":{}},\"apple\":{\"enabled\":false,\"registration\":{},\"login\":{}},\"azureStaticWebApps\":{\"enabled\":false,\"registration\":{}},\"customOpenIdConnectProviders\":{\"uhivyqniw\":{}}},\"login\":{\"routes\":{\"logoutEndpoint\":\"k\"},\"preserveUrlFragmentsForLogins\":true,\"allowedExternalRedirectUrls\":[\"jgrtfwvukxga\"],\"cookieExpiration\":{\"convention\":\"FixedTime\",\"timeToExpiration\":\"nhsjcnyej\"},\"nonce\":{\"validateNonce\":true,\"nonceExpirationInterval\":\"tnapczwlokjyemkk\"}},\"httpSettings\":{\"requireHttps\":true,\"routes\":{\"apiPrefix\":\"xzjnchgejs\"},\"forwardProxy\":{\"convention\":\"Custom\",\"customHostHeaderName\":\"ilzyd\",\"customProtoHeaderName\":\"o\"}}},\"id\":\"yahux\",\"name\":\"npmqnjaqwixjspro\",\"type\":\"vcputegj\"},{\"properties\":{\"platform\":{\"enabled\":false,\"runtimeVersion\":\"t\"},\"globalValidation\":{\"unauthenticatedClientAction\":\"Return403\",\"redirectToProvider\":\"pjhulsuuvmkj\",\"excludedPaths\":[\"rwfndiod\"]},\"identityProviders\":{\"azureActiveDirectory\":{\"enabled\":false,\"registration\":{},\"login\":{},\"validation\":{},\"isAutoProvisioned\":true},\"facebook\":{\"enabled\":true,\"registration\":{},\"graphApiVersion\":\"psoacctazakljl\",\"login\":{}},\"gitHub\":{\"enabled\":true,\"registration\":{},\"login\":{}},\"google\":{\"enabled\":false,\"registration\":{},\"login\":{},\"validation\":{}},\"twitter\":{\"enabled\":false,\"registration\":{}},\"apple\":{\"enabled\":true,\"registration\":{},\"login\":{}},\"azureStaticWebApps\":{\"enabled\":true,\"registration\":{}},\"customOpenIdConnectProviders\":{\"jhcrz\":{},\"vdphlxaolthqtr\":{},\"qjbpfzfsin\":{},\"gvfcj\":{}}},\"login\":{\"routes\":{\"logoutEndpoint\":\"xxjtfe\"},\"preserveUrlFragmentsForLogins\":true,\"allowedExternalRedirectUrls\":[\"zitonpeqfpjkjl\",\"ofpdvh\"],\"cookieExpiration\":{\"convention\":\"IdentityProviderDerived\",\"timeToExpiration\":\"pini\"},\"nonce\":{\"validateNonce\":true,\"nonceExpirationInterval\":\"uybbkpodep\"}},\"httpSettings\":{\"requireHttps\":true,\"routes\":{\"apiPrefix\":\"vamih\"},\"forwardProxy\":{\"convention\":\"Custom\",\"customHostHeaderName\":\"rxzxtheo\",\"customProtoHeaderName\":\"si\"}}},\"id\":\"evcciqihnhun\",\"name\":\"bwjzr\",\"type\":\"fygxgispemvtzfk\"}],\"nextLink\":\"ubljofxqe\"}") - .toObject(AuthConfigCollection.class); - Assertions.assertEquals(false, model.value().get(0).platform().enabled()); - Assertions.assertEquals("gjxpybczmehmt", model.value().get(0).platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN403, - model.value().get(0).globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("phrupidgsybbejhp", model.value().get(0).globalValidation().redirectToProvider()); - Assertions.assertEquals("cmsxaobhdxbm", model.value().get(0).globalValidation().excludedPaths().get(0)); - Assertions.assertEquals(false, model.value().get(0).identityProviders().azureActiveDirectory().enabled()); - Assertions - .assertEquals(false, model.value().get(0).identityProviders().azureActiveDirectory().isAutoProvisioned()); - Assertions.assertEquals(false, model.value().get(0).identityProviders().facebook().enabled()); - Assertions.assertEquals("ownoizhw", model.value().get(0).identityProviders().facebook().graphApiVersion()); - Assertions.assertEquals(false, model.value().get(0).identityProviders().gitHub().enabled()); - Assertions.assertEquals(false, model.value().get(0).identityProviders().google().enabled()); - Assertions.assertEquals(true, model.value().get(0).identityProviders().twitter().enabled()); - Assertions.assertEquals(true, model.value().get(0).identityProviders().apple().enabled()); - Assertions.assertEquals(false, model.value().get(0).identityProviders().azureStaticWebApps().enabled()); - Assertions.assertEquals("gnufoooj", model.value().get(0).login().routes().logoutEndpoint()); - Assertions.assertEquals(true, model.value().get(0).login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals("qes", model.value().get(0).login().allowedExternalRedirectUrls().get(0)); - Assertions - .assertEquals( - CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, - model.value().get(0).login().cookieExpiration().convention()); - Assertions.assertEquals("mglzlhj", model.value().get(0).login().cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.value().get(0).login().nonce().validateNonce()); - Assertions.assertEquals("wmrvktsizntocipa", model.value().get(0).login().nonce().nonceExpirationInterval()); - Assertions.assertEquals(false, model.value().get(0).httpSettings().requireHttps()); - Assertions.assertEquals("qucmpo", model.value().get(0).httpSettings().routes().apiPrefix()); - Assertions - .assertEquals( - ForwardProxyConvention.STANDARD, model.value().get(0).httpSettings().forwardProxy().convention()); - Assertions - .assertEquals("ogknygjofjdd", model.value().get(0).httpSettings().forwardProxy().customHostHeaderName()); - Assertions.assertEquals("s", model.value().get(0).httpSettings().forwardProxy().customProtoHeaderName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthConfigCollection model = - new AuthConfigCollection() - .withValue( - Arrays - .asList( - new AuthConfigInner() - .withPlatform(new AuthPlatform().withEnabled(false).withRuntimeVersion("gjxpybczmehmt")) - .withGlobalValidation( - new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.RETURN403) - .withRedirectToProvider("phrupidgsybbejhp") - .withExcludedPaths(Arrays.asList("cmsxaobhdxbm"))) - .withIdentityProviders( - new IdentityProviders() - .withAzureActiveDirectory( - new AzureActiveDirectory() - .withEnabled(false) - .withRegistration(new AzureActiveDirectoryRegistration()) - .withLogin(new AzureActiveDirectoryLogin()) - .withValidation(new AzureActiveDirectoryValidation()) - .withIsAutoProvisioned(false)) - .withFacebook( - new Facebook() - .withEnabled(false) - .withRegistration(new AppRegistration()) - .withGraphApiVersion("ownoizhw") - .withLogin(new LoginScopes())) - .withGitHub( - new GitHub() - .withEnabled(false) - .withRegistration(new ClientRegistration()) - .withLogin(new LoginScopes())) - .withGoogle( - new Google() - .withEnabled(false) - .withRegistration(new ClientRegistration()) - .withLogin(new LoginScopes()) - .withValidation(new AllowedAudiencesValidation())) - .withTwitter( - new Twitter().withEnabled(true).withRegistration(new TwitterRegistration())) - .withApple( - new Apple() - .withEnabled(true) - .withRegistration(new AppleRegistration()) - .withLogin(new LoginScopes())) - .withAzureStaticWebApps( - new AzureStaticWebApps() - .withEnabled(false) - .withRegistration(new AzureStaticWebAppsRegistration())) - .withCustomOpenIdConnectProviders( - mapOf("nrbtcqqjnq", new CustomOpenIdConnectProvider()))) - .withLogin( - new Login() - .withRoutes(new LoginRoutes().withLogoutEndpoint("gnufoooj")) - .withPreserveUrlFragmentsForLogins(true) - .withAllowedExternalRedirectUrls(Arrays.asList("qes")) - .withCookieExpiration( - new CookieExpiration() - .withConvention(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED) - .withTimeToExpiration("mglzlhj")) - .withNonce( - new Nonce() - .withValidateNonce(false) - .withNonceExpirationInterval("wmrvktsizntocipa"))) - .withHttpSettings( - new HttpSettings() - .withRequireHttps(false) - .withRoutes(new HttpSettingsRoutes().withApiPrefix("qucmpo")) - .withForwardProxy( - new ForwardProxy() - .withConvention(ForwardProxyConvention.STANDARD) - .withCustomHostHeaderName("ogknygjofjdd") - .withCustomProtoHeaderName("s"))), - new AuthConfigInner() - .withPlatform(new AuthPlatform().withEnabled(true).withRuntimeVersion("sjtxukcdmp")) - .withGlobalValidation( - new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.RETURN403) - .withRedirectToProvider("uanzwuxzdx") - .withExcludedPaths( - Arrays.asList("rlhm", "hfpmrqobmtukknr", "rtihfxtijbpz", "gnwzsymglzufc"))) - .withIdentityProviders( - new IdentityProviders() - .withAzureActiveDirectory( - new AzureActiveDirectory() - .withEnabled(false) - .withRegistration(new AzureActiveDirectoryRegistration()) - .withLogin(new AzureActiveDirectoryLogin()) - .withValidation(new AzureActiveDirectoryValidation()) - .withIsAutoProvisioned(true)) - .withFacebook( - new Facebook() - .withEnabled(false) - .withRegistration(new AppRegistration()) - .withGraphApiVersion("cbjy") - .withLogin(new LoginScopes())) - .withGitHub( - new GitHub() - .withEnabled(false) - .withRegistration(new ClientRegistration()) - .withLogin(new LoginScopes())) - .withGoogle( - new Google() - .withEnabled(true) - .withRegistration(new ClientRegistration()) - .withLogin(new LoginScopes()) - .withValidation(new AllowedAudiencesValidation())) - .withTwitter( - new Twitter().withEnabled(true).withRegistration(new TwitterRegistration())) - .withApple( - new Apple() - .withEnabled(false) - .withRegistration(new AppleRegistration()) - .withLogin(new LoginScopes())) - .withAzureStaticWebApps( - new AzureStaticWebApps() - .withEnabled(false) - .withRegistration(new AzureStaticWebAppsRegistration())) - .withCustomOpenIdConnectProviders( - mapOf("uhivyqniw", new CustomOpenIdConnectProvider()))) - .withLogin( - new Login() - .withRoutes(new LoginRoutes().withLogoutEndpoint("k")) - .withPreserveUrlFragmentsForLogins(true) - .withAllowedExternalRedirectUrls(Arrays.asList("jgrtfwvukxga")) - .withCookieExpiration( - new CookieExpiration() - .withConvention(CookieExpirationConvention.FIXED_TIME) - .withTimeToExpiration("nhsjcnyej")) - .withNonce( - new Nonce() - .withValidateNonce(true) - .withNonceExpirationInterval("tnapczwlokjyemkk"))) - .withHttpSettings( - new HttpSettings() - .withRequireHttps(true) - .withRoutes(new HttpSettingsRoutes().withApiPrefix("xzjnchgejs")) - .withForwardProxy( - new ForwardProxy() - .withConvention(ForwardProxyConvention.CUSTOM) - .withCustomHostHeaderName("ilzyd") - .withCustomProtoHeaderName("o"))), - new AuthConfigInner() - .withPlatform(new AuthPlatform().withEnabled(false).withRuntimeVersion("t")) - .withGlobalValidation( - new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.RETURN403) - .withRedirectToProvider("pjhulsuuvmkj") - .withExcludedPaths(Arrays.asList("rwfndiod"))) - .withIdentityProviders( - new IdentityProviders() - .withAzureActiveDirectory( - new AzureActiveDirectory() - .withEnabled(false) - .withRegistration(new AzureActiveDirectoryRegistration()) - .withLogin(new AzureActiveDirectoryLogin()) - .withValidation(new AzureActiveDirectoryValidation()) - .withIsAutoProvisioned(true)) - .withFacebook( - new Facebook() - .withEnabled(true) - .withRegistration(new AppRegistration()) - .withGraphApiVersion("psoacctazakljl") - .withLogin(new LoginScopes())) - .withGitHub( - new GitHub() - .withEnabled(true) - .withRegistration(new ClientRegistration()) - .withLogin(new LoginScopes())) - .withGoogle( - new Google() - .withEnabled(false) - .withRegistration(new ClientRegistration()) - .withLogin(new LoginScopes()) - .withValidation(new AllowedAudiencesValidation())) - .withTwitter( - new Twitter() - .withEnabled(false) - .withRegistration(new TwitterRegistration())) - .withApple( - new Apple() - .withEnabled(true) - .withRegistration(new AppleRegistration()) - .withLogin(new LoginScopes())) - .withAzureStaticWebApps( - new AzureStaticWebApps() - .withEnabled(true) - .withRegistration(new AzureStaticWebAppsRegistration())) - .withCustomOpenIdConnectProviders( - mapOf( - "jhcrz", - new CustomOpenIdConnectProvider(), - "vdphlxaolthqtr", - new CustomOpenIdConnectProvider(), - "qjbpfzfsin", - new CustomOpenIdConnectProvider(), - "gvfcj", - new CustomOpenIdConnectProvider()))) - .withLogin( - new Login() - .withRoutes(new LoginRoutes().withLogoutEndpoint("xxjtfe")) - .withPreserveUrlFragmentsForLogins(true) - .withAllowedExternalRedirectUrls(Arrays.asList("zitonpeqfpjkjl", "ofpdvh")) - .withCookieExpiration( - new CookieExpiration() - .withConvention(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED) - .withTimeToExpiration("pini")) - .withNonce( - new Nonce() - .withValidateNonce(true) - .withNonceExpirationInterval("uybbkpodep"))) - .withHttpSettings( - new HttpSettings() - .withRequireHttps(true) - .withRoutes(new HttpSettingsRoutes().withApiPrefix("vamih")) - .withForwardProxy( - new ForwardProxy() - .withConvention(ForwardProxyConvention.CUSTOM) - .withCustomHostHeaderName("rxzxtheo") - .withCustomProtoHeaderName("si"))))); - model = BinaryData.fromObject(model).toObject(AuthConfigCollection.class); - Assertions.assertEquals(false, model.value().get(0).platform().enabled()); - Assertions.assertEquals("gjxpybczmehmt", model.value().get(0).platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN403, - model.value().get(0).globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("phrupidgsybbejhp", model.value().get(0).globalValidation().redirectToProvider()); - Assertions.assertEquals("cmsxaobhdxbm", model.value().get(0).globalValidation().excludedPaths().get(0)); - Assertions.assertEquals(false, model.value().get(0).identityProviders().azureActiveDirectory().enabled()); - Assertions - .assertEquals(false, model.value().get(0).identityProviders().azureActiveDirectory().isAutoProvisioned()); - Assertions.assertEquals(false, model.value().get(0).identityProviders().facebook().enabled()); - Assertions.assertEquals("ownoizhw", model.value().get(0).identityProviders().facebook().graphApiVersion()); - Assertions.assertEquals(false, model.value().get(0).identityProviders().gitHub().enabled()); - Assertions.assertEquals(false, model.value().get(0).identityProviders().google().enabled()); - Assertions.assertEquals(true, model.value().get(0).identityProviders().twitter().enabled()); - Assertions.assertEquals(true, model.value().get(0).identityProviders().apple().enabled()); - Assertions.assertEquals(false, model.value().get(0).identityProviders().azureStaticWebApps().enabled()); - Assertions.assertEquals("gnufoooj", model.value().get(0).login().routes().logoutEndpoint()); - Assertions.assertEquals(true, model.value().get(0).login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals("qes", model.value().get(0).login().allowedExternalRedirectUrls().get(0)); - Assertions - .assertEquals( - CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, - model.value().get(0).login().cookieExpiration().convention()); - Assertions.assertEquals("mglzlhj", model.value().get(0).login().cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.value().get(0).login().nonce().validateNonce()); - Assertions.assertEquals("wmrvktsizntocipa", model.value().get(0).login().nonce().nonceExpirationInterval()); - Assertions.assertEquals(false, model.value().get(0).httpSettings().requireHttps()); - Assertions.assertEquals("qucmpo", model.value().get(0).httpSettings().routes().apiPrefix()); - Assertions - .assertEquals( - ForwardProxyConvention.STANDARD, model.value().get(0).httpSettings().forwardProxy().convention()); - Assertions - .assertEquals("ogknygjofjdd", model.value().get(0).httpSettings().forwardProxy().customHostHeaderName()); - Assertions.assertEquals("s", model.value().get(0).httpSettings().forwardProxy().customProtoHeaderName()); - } - - // 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/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java deleted file mode 100644 index bd6d1c94b9cd0..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import org.junit.jupiter.api.Assertions; - -public final class AuthPlatformTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AuthPlatform model = - BinaryData.fromString("{\"enabled\":true,\"runtimeVersion\":\"dvkaozw\"}").toObject(AuthPlatform.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("dvkaozw", model.runtimeVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthPlatform model = new AuthPlatform().withEnabled(true).withRuntimeVersion("dvkaozw"); - model = BinaryData.fromObject(model).toObject(AuthPlatform.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("dvkaozw", model.runtimeVersion()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.java deleted file mode 100644 index 5f5385f1bf94e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -import com.azure.resourcemanager.appcontainers.models.AvailableOperations; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AvailableOperationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableOperations model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"pfhoqcaaewdao\",\"isDataAction\":true,\"display\":{\"provider\":\"pjxxkzb\",\"resource\":\"sgeivsiy\",\"operation\":\"kdncj\",\"description\":\"onbzoggculapzwy\"},\"origin\":\"gogtqxepnylbf\"}],\"nextLink\":\"jlyjtlvofq\"}") - .toObject(AvailableOperations.class); - Assertions.assertEquals("pfhoqcaaewdao", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("pjxxkzb", model.value().get(0).display().provider()); - Assertions.assertEquals("sgeivsiy", model.value().get(0).display().resource()); - Assertions.assertEquals("kdncj", model.value().get(0).display().operation()); - Assertions.assertEquals("onbzoggculapzwy", model.value().get(0).display().description()); - Assertions.assertEquals("gogtqxepnylbf", model.value().get(0).origin()); - Assertions.assertEquals("jlyjtlvofq", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableOperations model = - new AvailableOperations() - .withValue( - Arrays - .asList( - new OperationDetailInner() - .withName("pfhoqcaaewdao") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("pjxxkzb") - .withResource("sgeivsiy") - .withOperation("kdncj") - .withDescription("onbzoggculapzwy")) - .withOrigin("gogtqxepnylbf"))) - .withNextLink("jlyjtlvofq"); - model = BinaryData.fromObject(model).toObject(AvailableOperations.class); - Assertions.assertEquals("pfhoqcaaewdao", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("pjxxkzb", model.value().get(0).display().provider()); - Assertions.assertEquals("sgeivsiy", model.value().get(0).display().resource()); - Assertions.assertEquals("kdncj", model.value().get(0).display().operation()); - Assertions.assertEquals("onbzoggculapzwy", model.value().get(0).display().description()); - Assertions.assertEquals("gogtqxepnylbf", model.value().get(0).origin()); - Assertions.assertEquals("jlyjtlvofq", model.nextLink()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfileInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfileInnerTests.java deleted file mode 100644 index 9cf8caa44ee7e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfileInnerTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import org.junit.jupiter.api.Assertions; - -public final class AvailableWorkloadProfileInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableWorkloadProfileInner model = - BinaryData - .fromString( - "{\"location\":\"efovgmk\",\"properties\":{\"category\":\"eyyvxyqjpkcat\",\"applicability\":\"LocationDefault\",\"cores\":1698610201,\"memoryGiB\":1035421848,\"displayName\":\"czsqpjhvm\"},\"id\":\"ajvnysounqe\",\"name\":\"a\",\"type\":\"oaeupfhyhltrpmo\"}") - .toObject(AvailableWorkloadProfileInner.class); - Assertions.assertEquals("efovgmk", model.location()); - Assertions.assertEquals("eyyvxyqjpkcat", model.properties().category()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.properties().applicability()); - Assertions.assertEquals(1698610201, model.properties().cores()); - Assertions.assertEquals(1035421848, model.properties().memoryGiB()); - Assertions.assertEquals("czsqpjhvm", model.properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableWorkloadProfileInner model = - new AvailableWorkloadProfileInner() - .withLocation("efovgmk") - .withProperties( - new AvailableWorkloadProfileProperties() - .withCategory("eyyvxyqjpkcat") - .withApplicability(Applicability.LOCATION_DEFAULT) - .withCores(1698610201) - .withMemoryGiB(1035421848) - .withDisplayName("czsqpjhvm")); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileInner.class); - Assertions.assertEquals("efovgmk", model.location()); - Assertions.assertEquals("eyyvxyqjpkcat", model.properties().category()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.properties().applicability()); - Assertions.assertEquals(1698610201, model.properties().cores()); - Assertions.assertEquals(1035421848, model.properties().memoryGiB()); - Assertions.assertEquals("czsqpjhvm", model.properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilePropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilePropertiesTests.java deleted file mode 100644 index 41f6a1b78e406..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilePropertiesTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import org.junit.jupiter.api.Assertions; - -public final class AvailableWorkloadProfilePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableWorkloadProfileProperties model = - BinaryData - .fromString( - "{\"category\":\"mcmatuokthfuiu\",\"applicability\":\"Custom\",\"cores\":680550088,\"memoryGiB\":397485144,\"displayName\":\"vxodpu\"}") - .toObject(AvailableWorkloadProfileProperties.class); - Assertions.assertEquals("mcmatuokthfuiu", model.category()); - Assertions.assertEquals(Applicability.CUSTOM, model.applicability()); - Assertions.assertEquals(680550088, model.cores()); - Assertions.assertEquals(397485144, model.memoryGiB()); - Assertions.assertEquals("vxodpu", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableWorkloadProfileProperties model = - new AvailableWorkloadProfileProperties() - .withCategory("mcmatuokthfuiu") - .withApplicability(Applicability.CUSTOM) - .withCores(680550088) - .withMemoryGiB(397485144) - .withDisplayName("vxodpu"); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileProperties.class); - Assertions.assertEquals("mcmatuokthfuiu", model.category()); - Assertions.assertEquals(Applicability.CUSTOM, model.applicability()); - Assertions.assertEquals(680550088, model.cores()); - Assertions.assertEquals(397485144, model.memoryGiB()); - Assertions.assertEquals("vxodpu", model.displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesCollectionTests.java deleted file mode 100644 index 1fb36c62a1ee2..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesCollectionTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfilesCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AvailableWorkloadProfilesCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableWorkloadProfilesCollection model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"jbdlwtgrhpdjpju\",\"properties\":{\"category\":\"xazjpqyegual\",\"applicability\":\"Custom\",\"cores\":1163750271,\"memoryGiB\":344964368,\"displayName\":\"zzvdudgwds\"},\"id\":\"fhotw\",\"name\":\"cynpwlbjnp\",\"type\":\"acfta\"},{\"location\":\"h\",\"properties\":{\"category\":\"tyfsoppusuesn\",\"applicability\":\"LocationDefault\",\"cores\":317621756,\"memoryGiB\":600821678,\"displayName\":\"orxzdmohctbqvud\"},\"id\":\"xdn\",\"name\":\"nvowgujju\",\"type\":\"wdkcglhsl\"},{\"location\":\"jdyggdtji\",\"properties\":{\"category\":\"kuofqweykhme\",\"applicability\":\"LocationDefault\",\"cores\":1463310275,\"memoryGiB\":669612849,\"displayName\":\"whybcib\"},\"id\":\"yvdcsitynnaa\",\"name\":\"dectehfiqsc\",\"type\":\"eypvhezrkg\"}],\"nextLink\":\"c\"}") - .toObject(AvailableWorkloadProfilesCollection.class); - Assertions.assertEquals("jbdlwtgrhpdjpju", model.value().get(0).location()); - Assertions.assertEquals("xazjpqyegual", model.value().get(0).properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, model.value().get(0).properties().applicability()); - Assertions.assertEquals(1163750271, model.value().get(0).properties().cores()); - Assertions.assertEquals(344964368, model.value().get(0).properties().memoryGiB()); - Assertions.assertEquals("zzvdudgwds", model.value().get(0).properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableWorkloadProfilesCollection model = - new AvailableWorkloadProfilesCollection() - .withValue( - Arrays - .asList( - new AvailableWorkloadProfileInner() - .withLocation("jbdlwtgrhpdjpju") - .withProperties( - new AvailableWorkloadProfileProperties() - .withCategory("xazjpqyegual") - .withApplicability(Applicability.CUSTOM) - .withCores(1163750271) - .withMemoryGiB(344964368) - .withDisplayName("zzvdudgwds")), - new AvailableWorkloadProfileInner() - .withLocation("h") - .withProperties( - new AvailableWorkloadProfileProperties() - .withCategory("tyfsoppusuesn") - .withApplicability(Applicability.LOCATION_DEFAULT) - .withCores(317621756) - .withMemoryGiB(600821678) - .withDisplayName("orxzdmohctbqvud")), - new AvailableWorkloadProfileInner() - .withLocation("jdyggdtji") - .withProperties( - new AvailableWorkloadProfileProperties() - .withCategory("kuofqweykhme") - .withApplicability(Applicability.LOCATION_DEFAULT) - .withCores(1463310275) - .withMemoryGiB(669612849) - .withDisplayName("whybcib")))); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfilesCollection.class); - Assertions.assertEquals("jbdlwtgrhpdjpju", model.value().get(0).location()); - Assertions.assertEquals("xazjpqyegual", model.value().get(0).properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, model.value().get(0).properties().applicability()); - Assertions.assertEquals(1163750271, model.value().get(0).properties().cores()); - Assertions.assertEquals(344964368, model.value().get(0).properties().memoryGiB()); - Assertions.assertEquals("zzvdudgwds", model.value().get(0).properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetMockTests.java deleted file mode 100644 index 996c49a12b5b9..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfile; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AvailableWorkloadProfilesGetMockTests { - @Test - public void testGet() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"location\":\"uxtyasiibmi\",\"properties\":{\"category\":\"nustgnljh\",\"applicability\":\"LocationDefault\",\"cores\":1287166393,\"memoryGiB\":1773419326,\"displayName\":\"avmqfoudor\"},\"id\":\"cgyypro\",\"name\":\"wy\",\"type\":\"undmbx\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.availableWorkloadProfiles().get("nuciqdsmexiit", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("uxtyasiibmi", response.iterator().next().location()); - Assertions.assertEquals("nustgnljh", response.iterator().next().properties().category()); - Assertions - .assertEquals(Applicability.LOCATION_DEFAULT, response.iterator().next().properties().applicability()); - Assertions.assertEquals(1287166393, response.iterator().next().properties().cores()); - Assertions.assertEquals(1773419326, response.iterator().next().properties().memoryGiB()); - Assertions.assertEquals("avmqfoudor", response.iterator().next().properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryLoginTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryLoginTests.java deleted file mode 100644 index b16765ab966f9..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryLoginTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryLogin; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AzureActiveDirectoryLoginTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureActiveDirectoryLogin model = - BinaryData - .fromString( - "{\"loginParameters\":[\"kzsmodm\",\"lougpbkw\",\"mutduqktaps\"],\"disableWWWAuthenticate\":false}") - .toObject(AzureActiveDirectoryLogin.class); - Assertions.assertEquals("kzsmodm", model.loginParameters().get(0)); - Assertions.assertEquals(false, model.disableWwwAuthenticate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureActiveDirectoryLogin model = - new AzureActiveDirectoryLogin() - .withLoginParameters(Arrays.asList("kzsmodm", "lougpbkw", "mutduqktaps")) - .withDisableWwwAuthenticate(false); - model = BinaryData.fromObject(model).toObject(AzureActiveDirectoryLogin.class); - Assertions.assertEquals("kzsmodm", model.loginParameters().get(0)); - Assertions.assertEquals(false, model.disableWwwAuthenticate()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java deleted file mode 100644 index f4180d4eee4ca..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebAppsRegistration; -import org.junit.jupiter.api.Assertions; - -public final class AzureStaticWebAppsRegistrationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureStaticWebAppsRegistration model = - BinaryData.fromString("{\"clientId\":\"uhrhcffcyddgl\"}").toObject(AzureStaticWebAppsRegistration.class); - Assertions.assertEquals("uhrhcffcyddgl", model.clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureStaticWebAppsRegistration model = new AzureStaticWebAppsRegistration().withClientId("uhrhcffcyddgl"); - model = BinaryData.fromObject(model).toObject(AzureStaticWebAppsRegistration.class); - Assertions.assertEquals("uhrhcffcyddgl", model.clientId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsTests.java deleted file mode 100644 index 82093c81aa911..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebApps; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebAppsRegistration; -import org.junit.jupiter.api.Assertions; - -public final class AzureStaticWebAppsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureStaticWebApps model = - BinaryData - .fromString("{\"enabled\":false,\"registration\":{\"clientId\":\"icbtwnpzao\"}}") - .toObject(AzureStaticWebApps.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("icbtwnpzao", model.registration().clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureStaticWebApps model = - new AzureStaticWebApps() - .withEnabled(false) - .withRegistration(new AzureStaticWebAppsRegistration().withClientId("icbtwnpzao")); - model = BinaryData.fromObject(model).toObject(AzureStaticWebApps.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("icbtwnpzao", model.registration().clientId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.java deleted file mode 100644 index 7cc2ffd7f104e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; -import com.azure.resourcemanager.appcontainers.models.BillingMeter; -import com.azure.resourcemanager.appcontainers.models.BillingMeterProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BillingMeterCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BillingMeterCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"yzydagfuaxbezyi\",\"properties\":{\"category\":\"ktwh\",\"meterType\":\"xw\",\"displayName\":\"wqsmbsur\"},\"id\":\"xim\",\"name\":\"ryocfsfksymdd\",\"type\":\"stkiiuxhqyud\"},{\"location\":\"rrqnbpoczvyifqrv\",\"properties\":{\"category\":\"jsllrmv\",\"meterType\":\"f\",\"displayName\":\"t\"},\"id\":\"pnpulexxbczwtru\",\"name\":\"iqzbq\",\"type\":\"vsovmyokac\"},{\"location\":\"kwlhzdo\",\"properties\":{\"category\":\"jmflbvvnch\",\"meterType\":\"cciw\",\"displayName\":\"juqk\"},\"id\":\"rsa\",\"name\":\"iwkuofos\",\"type\":\"ghsauuimjmvxied\"}]}") - .toObject(BillingMeterCollectionInner.class); - Assertions.assertEquals("yzydagfuaxbezyi", model.value().get(0).location()); - Assertions.assertEquals("ktwh", model.value().get(0).properties().category()); - Assertions.assertEquals("xw", model.value().get(0).properties().meterType()); - Assertions.assertEquals("wqsmbsur", model.value().get(0).properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingMeterCollectionInner model = - new BillingMeterCollectionInner() - .withValue( - Arrays - .asList( - new BillingMeter() - .withLocation("yzydagfuaxbezyi") - .withProperties( - new BillingMeterProperties() - .withCategory("ktwh") - .withMeterType("xw") - .withDisplayName("wqsmbsur")), - new BillingMeter() - .withLocation("rrqnbpoczvyifqrv") - .withProperties( - new BillingMeterProperties() - .withCategory("jsllrmv") - .withMeterType("f") - .withDisplayName("t")), - new BillingMeter() - .withLocation("kwlhzdo") - .withProperties( - new BillingMeterProperties() - .withCategory("jmflbvvnch") - .withMeterType("cciw") - .withDisplayName("juqk")))); - model = BinaryData.fromObject(model).toObject(BillingMeterCollectionInner.class); - Assertions.assertEquals("yzydagfuaxbezyi", model.value().get(0).location()); - Assertions.assertEquals("ktwh", model.value().get(0).properties().category()); - Assertions.assertEquals("xw", model.value().get(0).properties().meterType()); - Assertions.assertEquals("wqsmbsur", model.value().get(0).properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterPropertiesTests.java deleted file mode 100644 index dffbe371cd092..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterPropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BillingMeterProperties; -import org.junit.jupiter.api.Assertions; - -public final class BillingMeterPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BillingMeterProperties model = - BinaryData - .fromString("{\"category\":\"ur\",\"meterType\":\"xxjnspydptk\",\"displayName\":\"nkoukn\"}") - .toObject(BillingMeterProperties.class); - Assertions.assertEquals("ur", model.category()); - Assertions.assertEquals("xxjnspydptk", model.meterType()); - Assertions.assertEquals("nkoukn", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingMeterProperties model = - new BillingMeterProperties().withCategory("ur").withMeterType("xxjnspydptk").withDisplayName("nkoukn"); - model = BinaryData.fromObject(model).toObject(BillingMeterProperties.class); - Assertions.assertEquals("ur", model.category()); - Assertions.assertEquals("xxjnspydptk", model.meterType()); - Assertions.assertEquals("nkoukn", model.displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterTests.java deleted file mode 100644 index 79cbea3b4c3f1..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BillingMeter; -import com.azure.resourcemanager.appcontainers.models.BillingMeterProperties; -import org.junit.jupiter.api.Assertions; - -public final class BillingMeterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BillingMeter model = - BinaryData - .fromString( - "{\"location\":\"gidyjrrf\",\"properties\":{\"category\":\"osvexcsonpclhoc\",\"meterType\":\"slkevle\",\"displayName\":\"zfbuhf\"},\"id\":\"vfaxkffeiith\",\"name\":\"vmezy\",\"type\":\"shxmzsbbzoggigrx\"}") - .toObject(BillingMeter.class); - Assertions.assertEquals("gidyjrrf", model.location()); - Assertions.assertEquals("osvexcsonpclhoc", model.properties().category()); - Assertions.assertEquals("slkevle", model.properties().meterType()); - Assertions.assertEquals("zfbuhf", model.properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingMeter model = - new BillingMeter() - .withLocation("gidyjrrf") - .withProperties( - new BillingMeterProperties() - .withCategory("osvexcsonpclhoc") - .withMeterType("slkevle") - .withDisplayName("zfbuhf")); - model = BinaryData.fromObject(model).toObject(BillingMeter.class); - Assertions.assertEquals("gidyjrrf", model.location()); - Assertions.assertEquals("osvexcsonpclhoc", model.properties().category()); - Assertions.assertEquals("slkevle", model.properties().meterType()); - Assertions.assertEquals("zfbuhf", model.properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetWithResponseMockTests.java deleted file mode 100644 index 67a8fd8e1b530..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.BillingMeterCollection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BillingMetersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"location\":\"pmdtz\",\"properties\":{\"category\":\"tfvnz\",\"meterType\":\"jtotpvopvpbd\",\"displayName\":\"qgqqihedsvqwthmk\"},\"id\":\"ibcysihsgqc\",\"name\":\"dhohsdtmcdzsuf\",\"type\":\"ohdxbzlmcmu\"},{\"location\":\"cvhd\",\"properties\":{\"category\":\"wqqxeysko\",\"meterType\":\"zinkfkbgbzbowxeq\",\"displayName\":\"ljmygvkzqkjjeokb\"},\"id\":\"efezrxcczurtlei\",\"name\":\"q\",\"type\":\"bkwvzg\"},{\"location\":\"v\",\"properties\":{\"category\":\"zdix\",\"meterType\":\"q\",\"displayName\":\"odawopqhewjptmcg\"},\"id\":\"bostzel\",\"name\":\"dlat\",\"type\":\"tmzlbiojlv\"},{\"location\":\"rbbpneqvcwwyy\",\"properties\":{\"category\":\"ochpprpr\",\"meterType\":\"mo\",\"displayName\":\"yzejnhlbk\"},\"id\":\"bzpcpiljhahzvec\",\"name\":\"ndbnwieh\",\"type\":\"lewjwiuubwef\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BillingMeterCollection response = - manager.billingMeters().getWithResponse("ugcmjkavlgorb", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("pmdtz", response.value().get(0).location()); - Assertions.assertEquals("tfvnz", response.value().get(0).properties().category()); - Assertions.assertEquals("jtotpvopvpbd", response.value().get(0).properties().meterType()); - Assertions.assertEquals("qgqqihedsvqwthmk", response.value().get(0).properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.java deleted file mode 100644 index f35aba2d25b3c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CertificatePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CertificatePatch model = - BinaryData - .fromString( - "{\"tags\":{\"flz\":\"ukgri\",\"qzahmgkbrp\":\"fbxzpuzycisp\",\"hibnuqqkpika\":\"y\",\"buynhijggm\":\"rgvtqag\"}}") - .toObject(CertificatePatch.class); - Assertions.assertEquals("ukgri", model.tags().get("flz")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CertificatePatch model = - new CertificatePatch() - .withTags( - mapOf("flz", "ukgri", "qzahmgkbrp", "fbxzpuzycisp", "hibnuqqkpika", "y", "buynhijggm", "rgvtqag")); - model = BinaryData.fromObject(model).toObject(CertificatePatch.class); - Assertions.assertEquals("ukgri", model.tags().get("flz")); - } - - // 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/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteWithResponseMockTests.java deleted file mode 100644 index 5b585901c86bf..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class CertificatesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .certificates() - .deleteWithResponse("afjrqpjiyrqjcrg", "xwmzwdfkbnrz", "rpdltbq", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java deleted file mode 100644 index 692d3ffcf8f7b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityRequest model = - BinaryData - .fromString("{\"name\":\"idokgjlj\",\"type\":\"xgvcl\"}") - .toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("idokgjlj", model.name()); - Assertions.assertEquals("xgvcl", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityRequest model = new CheckNameAvailabilityRequest().withName("idokgjlj").withType("xgvcl"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("idokgjlj", model.name()); - Assertions.assertEquals("xgvcl", model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.java deleted file mode 100644 index 747841faabc2a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityResponseInner model = - BinaryData - .fromString("{\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"ghkjeszzhbi\"}") - .toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); - Assertions.assertEquals("ghkjeszzhbi", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityResponseInner model = - new CheckNameAvailabilityResponseInner() - .withNameAvailable(true) - .withReason(CheckNameAvailabilityReason.INVALID) - .withMessage("ghkjeszzhbi"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); - Assertions.assertEquals("ghkjeszzhbi", model.message()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests.java deleted file mode 100644 index eb4d7837e45a8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .connectedEnvironmentsCertificates() - .deleteWithResponse("sqqw", "tcmwqkchc", "waxfewzjkj", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 64f135a178207..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"nameAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"mbnkb\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameAvailabilityResponse response = - manager - .connectedEnvironments() - .checkNameAvailabilityWithResponse( - "yqo", - "mpqoxw", - new CheckNameAvailabilityRequest().withName("fdbxiqxeiiqbim").withType("mwwinhehfqpofv"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("mbnkb", response.message()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests.java deleted file mode 100644 index b32238da4cebb..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .connectedEnvironmentsDaprComponents() - .deleteWithResponse("tsxoatftgz", "npbs", "vefloccsrmozihmi", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests.java deleted file mode 100644 index f40867f2a5d18..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests { - @Test - public void testListSecretsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"ilrmcaykggnox\",\"value\":\"t\"},{\"name\":\"sxwpndfcpfnznthj\",\"value\":\"kjaosrxuzv\"},{\"name\":\"mktcqiosmgbza\",\"value\":\"xqdlyrtltlapr\"},{\"name\":\"zkatb\",\"value\":\"mznnbsoqeqalarvl\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DaprSecretsCollection response = - manager - .connectedEnvironmentsDaprComponents() - .listSecretsWithResponse("g", "wtxxpkyjcx", "jxgrytfmp", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.java deleted file mode 100644 index e17158608086c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.connectedEnvironments().delete("lnwcltyjed", "xxmlfmkqscazua", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteWithResponseMockTests.java deleted file mode 100644 index 9ab93659458b8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsStoragesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .connectedEnvironmentsStorages() - .deleteWithResponse("xff", "shkwfbkgozxwopd", "yd", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppJobExecutionsInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppJobExecutionsInnerTests.java deleted file mode 100644 index 739ced9b872b0..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppJobExecutionsInnerTests.java +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppJobExecutionsInner; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVar; -import com.azure.resourcemanager.appcontainers.models.JobExecutionContainer; -import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppJobExecutionsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppJobExecutionsInner model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"djhlimm\",\"id\":\"x\",\"type\":\"bcporxvxcjzhqizx\",\"status\":\"Degraded\",\"startTime\":\"2021-01-04T20:39:53Z\",\"endTime\":\"2021-03-07T05:50:04Z\",\"template\":{\"containers\":[{\"image\":\"ftjuh\",\"name\":\"azkmtgguwp\",\"command\":[\"ajc\"],\"args\":[\"mghfcfiwrxgkne\"],\"env\":[{},{},{}],\"resources\":{}}],\"initContainers\":[{\"image\":\"o\",\"name\":\"vpgshoxgsgbp\",\"command\":[\"djtxvzflbq\",\"gaqvlgafcqusrd\",\"etnwsdtutnw\"],\"args\":[\"ycvuzhyrmewipmv\",\"k\",\"xukuqgsj\",\"xundxgk\"],\"env\":[{},{},{},{}],\"resources\":{}},{\"image\":\"hzjhf\",\"name\":\"hvvmuvgpmun\",\"command\":[\"xvmhf\"],\"args\":[\"jyihsasbhudypo\"],\"env\":[{},{}],\"resources\":{}},{\"image\":\"slynsqyrpfoo\",\"name\":\"lttymsjn\",\"command\":[\"dnfwqzdzg\",\"ilaxhn\",\"hqlyvijo\"],\"args\":[\"vk\"],\"env\":[{},{},{},{}],\"resources\":{}}]}},{\"name\":\"nbixxrti\",\"id\":\"cpwpg\",\"type\":\"rc\",\"status\":\"Degraded\",\"startTime\":\"2021-01-12T06:52:04Z\",\"endTime\":\"2020-12-22T20:01:29Z\",\"template\":{\"containers\":[{\"image\":\"xpmyyefrpmpdnq\",\"name\":\"ka\",\"command\":[\"qvmmbn\"],\"args\":[\"rtql\"],\"env\":[{},{}],\"resources\":{}},{\"image\":\"nitgvkxlz\",\"name\":\"drf\",\"command\":[\"ealzxwhcansymoyq\",\"lwigdivbkbx\"],\"args\":[\"fajuwas\"],\"env\":[{},{}],\"resources\":{}},{\"image\":\"y\",\"name\":\"uxakjsqzhzbezk\",\"command\":[\"sidxasicdd\",\"vvjskgfmocwahp\",\"gat\",\"eaahhvjhhn\"],\"args\":[\"ybbjjidjksyx\",\"yxvxevblbjed\"],\"env\":[{},{}],\"resources\":{}}],\"initContainers\":[{\"image\":\"uaulxunsm\",\"name\":\"nkppxynen\",\"command\":[\"xeizzg\"],\"args\":[\"nsrmffeycx\",\"ktp\"],\"env\":[{},{},{},{}],\"resources\":{}},{\"image\":\"teeammxqiekkkzd\",\"name\":\"tkgdojbmxva\",\"command\":[\"fdeesvecuijpxtx\",\"uwprtujwsawd\"],\"args\":[\"babxvitit\",\"tzeexav\",\"xtfglecdmdqb\",\"pypqtgsfj\"],\"env\":[{}],\"resources\":{}}]}}],\"nextLink\":\"hhxud\"}") - .toObject(ContainerAppJobExecutionsInner.class); - Assertions.assertEquals("djhlimm", model.value().get(0).name()); - Assertions.assertEquals("x", model.value().get(0).id()); - Assertions.assertEquals("bcporxvxcjzhqizx", model.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-04T20:39:53Z"), model.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-07T05:50:04Z"), model.value().get(0).endTime()); - Assertions.assertEquals("ftjuh", model.value().get(0).template().containers().get(0).image()); - Assertions.assertEquals("azkmtgguwp", model.value().get(0).template().containers().get(0).name()); - Assertions.assertEquals("ajc", model.value().get(0).template().containers().get(0).command().get(0)); - Assertions.assertEquals("mghfcfiwrxgkne", model.value().get(0).template().containers().get(0).args().get(0)); - Assertions.assertEquals("o", model.value().get(0).template().initContainers().get(0).image()); - Assertions.assertEquals("vpgshoxgsgbp", model.value().get(0).template().initContainers().get(0).name()); - Assertions.assertEquals("djtxvzflbq", model.value().get(0).template().initContainers().get(0).command().get(0)); - Assertions - .assertEquals("ycvuzhyrmewipmv", model.value().get(0).template().initContainers().get(0).args().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppJobExecutionsInner model = - new ContainerAppJobExecutionsInner() - .withValue( - Arrays - .asList( - new JobExecutionInner() - .withName("djhlimm") - .withId("x") - .withType("bcporxvxcjzhqizx") - .withStartTime(OffsetDateTime.parse("2021-01-04T20:39:53Z")) - .withEndTime(OffsetDateTime.parse("2021-03-07T05:50:04Z")) - .withTemplate( - new JobExecutionTemplate() - .withContainers( - Arrays - .asList( - new JobExecutionContainer() - .withImage("ftjuh") - .withName("azkmtgguwp") - .withCommand(Arrays.asList("ajc")) - .withArgs(Arrays.asList("mghfcfiwrxgkne")) - .withEnv( - Arrays - .asList( - new EnvironmentVar(), - new EnvironmentVar(), - new EnvironmentVar())) - .withResources(new ContainerResources()))) - .withInitContainers( - Arrays - .asList( - new JobExecutionContainer() - .withImage("o") - .withName("vpgshoxgsgbp") - .withCommand( - Arrays - .asList("djtxvzflbq", "gaqvlgafcqusrd", "etnwsdtutnw")) - .withArgs( - Arrays - .asList("ycvuzhyrmewipmv", "k", "xukuqgsj", "xundxgk")) - .withEnv( - Arrays - .asList( - new EnvironmentVar(), - new EnvironmentVar(), - new EnvironmentVar(), - new EnvironmentVar())) - .withResources(new ContainerResources()), - new JobExecutionContainer() - .withImage("hzjhf") - .withName("hvvmuvgpmun") - .withCommand(Arrays.asList("xvmhf")) - .withArgs(Arrays.asList("jyihsasbhudypo")) - .withEnv( - Arrays.asList(new EnvironmentVar(), new EnvironmentVar())) - .withResources(new ContainerResources()), - new JobExecutionContainer() - .withImage("slynsqyrpfoo") - .withName("lttymsjn") - .withCommand(Arrays.asList("dnfwqzdzg", "ilaxhn", "hqlyvijo")) - .withArgs(Arrays.asList("vk")) - .withEnv( - Arrays - .asList( - new EnvironmentVar(), - new EnvironmentVar(), - new EnvironmentVar(), - new EnvironmentVar())) - .withResources(new ContainerResources())))), - new JobExecutionInner() - .withName("nbixxrti") - .withId("cpwpg") - .withType("rc") - .withStartTime(OffsetDateTime.parse("2021-01-12T06:52:04Z")) - .withEndTime(OffsetDateTime.parse("2020-12-22T20:01:29Z")) - .withTemplate( - new JobExecutionTemplate() - .withContainers( - Arrays - .asList( - new JobExecutionContainer() - .withImage("xpmyyefrpmpdnq") - .withName("ka") - .withCommand(Arrays.asList("qvmmbn")) - .withArgs(Arrays.asList("rtql")) - .withEnv( - Arrays.asList(new EnvironmentVar(), new EnvironmentVar())) - .withResources(new ContainerResources()), - new JobExecutionContainer() - .withImage("nitgvkxlz") - .withName("drf") - .withCommand(Arrays.asList("ealzxwhcansymoyq", "lwigdivbkbx")) - .withArgs(Arrays.asList("fajuwas")) - .withEnv( - Arrays.asList(new EnvironmentVar(), new EnvironmentVar())) - .withResources(new ContainerResources()), - new JobExecutionContainer() - .withImage("y") - .withName("uxakjsqzhzbezk") - .withCommand( - Arrays - .asList( - "sidxasicdd", - "vvjskgfmocwahp", - "gat", - "eaahhvjhhn")) - .withArgs(Arrays.asList("ybbjjidjksyx", "yxvxevblbjed")) - .withEnv( - Arrays.asList(new EnvironmentVar(), new EnvironmentVar())) - .withResources(new ContainerResources()))) - .withInitContainers( - Arrays - .asList( - new JobExecutionContainer() - .withImage("uaulxunsm") - .withName("nkppxynen") - .withCommand(Arrays.asList("xeizzg")) - .withArgs(Arrays.asList("nsrmffeycx", "ktp")) - .withEnv( - Arrays - .asList( - new EnvironmentVar(), - new EnvironmentVar(), - new EnvironmentVar(), - new EnvironmentVar())) - .withResources(new ContainerResources()), - new JobExecutionContainer() - .withImage("teeammxqiekkkzd") - .withName("tkgdojbmxva") - .withCommand(Arrays.asList("fdeesvecuijpxtx", "uwprtujwsawd")) - .withArgs( - Arrays - .asList( - "babxvitit", - "tzeexav", - "xtfglecdmdqb", - "pypqtgsfj")) - .withEnv(Arrays.asList(new EnvironmentVar())) - .withResources(new ContainerResources())))))); - model = BinaryData.fromObject(model).toObject(ContainerAppJobExecutionsInner.class); - Assertions.assertEquals("djhlimm", model.value().get(0).name()); - Assertions.assertEquals("x", model.value().get(0).id()); - Assertions.assertEquals("bcporxvxcjzhqizx", model.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-04T20:39:53Z"), model.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-07T05:50:04Z"), model.value().get(0).endTime()); - Assertions.assertEquals("ftjuh", model.value().get(0).template().containers().get(0).image()); - Assertions.assertEquals("azkmtgguwp", model.value().get(0).template().containers().get(0).name()); - Assertions.assertEquals("ajc", model.value().get(0).template().containers().get(0).command().get(0)); - Assertions.assertEquals("mghfcfiwrxgkne", model.value().get(0).template().containers().get(0).args().get(0)); - Assertions.assertEquals("o", model.value().get(0).template().initContainers().get(0).image()); - Assertions.assertEquals("vpgshoxgsgbp", model.value().get(0).template().initContainers().get(0).name()); - Assertions.assertEquals("djtxvzflbq", model.value().get(0).template().initContainers().get(0).command().get(0)); - Assertions - .assertEquals("ycvuzhyrmewipmv", model.value().get(0).template().initContainers().get(0).args().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.java deleted file mode 100644 index 80a9d6dc75b84..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppProbeHttpGetHttpHeadersItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppProbeHttpGetHttpHeadersItem model = - BinaryData - .fromString("{\"name\":\"hzoymibmrqy\",\"value\":\"bahwfl\"}") - .toObject(ContainerAppProbeHttpGetHttpHeadersItem.class); - Assertions.assertEquals("hzoymibmrqy", model.name()); - Assertions.assertEquals("bahwfl", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeHttpGetHttpHeadersItem model = - new ContainerAppProbeHttpGetHttpHeadersItem().withName("hzoymibmrqy").withValue("bahwfl"); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeHttpGetHttpHeadersItem.class); - Assertions.assertEquals("hzoymibmrqy", model.name()); - Assertions.assertEquals("bahwfl", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetTests.java deleted file mode 100644 index 6053fe33e51cc..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import com.azure.resourcemanager.appcontainers.models.Scheme; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppProbeHttpGetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppProbeHttpGet model = - BinaryData - .fromString( - "{\"host\":\"quxvypomgkop\",\"httpHeaders\":[{\"name\":\"ojvpa\",\"value\":\"qgxy\"},{\"name\":\"mocmbqfqvmk\",\"value\":\"xozap\"},{\"name\":\"helxprglya\",\"value\":\"dd\"},{\"name\":\"kcbcue\",\"value\":\"rjxgciqib\"}],\"path\":\"osx\",\"port\":341443712,\"scheme\":\"HTTP\"}") - .toObject(ContainerAppProbeHttpGet.class); - Assertions.assertEquals("quxvypomgkop", model.host()); - Assertions.assertEquals("ojvpa", model.httpHeaders().get(0).name()); - Assertions.assertEquals("qgxy", model.httpHeaders().get(0).value()); - Assertions.assertEquals("osx", model.path()); - Assertions.assertEquals(341443712, model.port()); - Assertions.assertEquals(Scheme.HTTP, model.scheme()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeHttpGet model = - new ContainerAppProbeHttpGet() - .withHost("quxvypomgkop") - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem().withName("ojvpa").withValue("qgxy"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("mocmbqfqvmk").withValue("xozap"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("helxprglya").withValue("dd"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("kcbcue").withValue("rjxgciqib"))) - .withPath("osx") - .withPort(341443712) - .withScheme(Scheme.HTTP); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeHttpGet.class); - Assertions.assertEquals("quxvypomgkop", model.host()); - Assertions.assertEquals("ojvpa", model.httpHeaders().get(0).name()); - Assertions.assertEquals("qgxy", model.httpHeaders().get(0).value()); - Assertions.assertEquals("osx", model.path()); - Assertions.assertEquals(341443712, model.port()); - Assertions.assertEquals(Scheme.HTTP, model.scheme()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTcpSocketTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTcpSocketTests.java deleted file mode 100644 index d35547dd69c04..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTcpSocketTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppProbeTcpSocketTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppProbeTcpSocket model = - BinaryData - .fromString("{\"host\":\"zdtmhrkwofy\",\"port\":1026914225}") - .toObject(ContainerAppProbeTcpSocket.class); - Assertions.assertEquals("zdtmhrkwofy", model.host()); - Assertions.assertEquals(1026914225, model.port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeTcpSocket model = - new ContainerAppProbeTcpSocket().withHost("zdtmhrkwofy").withPort(1026914225); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeTcpSocket.class); - Assertions.assertEquals("zdtmhrkwofy", model.host()); - Assertions.assertEquals(1026914225, model.port()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTests.java deleted file mode 100644 index f945085b6144f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; -import com.azure.resourcemanager.appcontainers.models.Scheme; -import com.azure.resourcemanager.appcontainers.models.Type; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppProbeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppProbe model = - BinaryData - .fromString( - "{\"failureThreshold\":1317619791,\"httpGet\":{\"host\":\"kzzlvmbmpaxmodf\",\"httpHeaders\":[{\"name\":\"fy\",\"value\":\"sbpfvmwyhr\"}],\"path\":\"uyfta\",\"port\":1378791233,\"scheme\":\"HTTPS\"},\"initialDelaySeconds\":369562825,\"periodSeconds\":1040923285,\"successThreshold\":842537299,\"tcpSocket\":{\"host\":\"nubexk\",\"port\":1989438546},\"terminationGracePeriodSeconds\":5387832879483701613,\"timeoutSeconds\":487764269,\"type\":\"Startup\"}") - .toObject(ContainerAppProbe.class); - Assertions.assertEquals(1317619791, model.failureThreshold()); - Assertions.assertEquals("kzzlvmbmpaxmodf", model.httpGet().host()); - Assertions.assertEquals("fy", model.httpGet().httpHeaders().get(0).name()); - Assertions.assertEquals("sbpfvmwyhr", model.httpGet().httpHeaders().get(0).value()); - Assertions.assertEquals("uyfta", model.httpGet().path()); - Assertions.assertEquals(1378791233, model.httpGet().port()); - Assertions.assertEquals(Scheme.HTTPS, model.httpGet().scheme()); - Assertions.assertEquals(369562825, model.initialDelaySeconds()); - Assertions.assertEquals(1040923285, model.periodSeconds()); - Assertions.assertEquals(842537299, model.successThreshold()); - Assertions.assertEquals("nubexk", model.tcpSocket().host()); - Assertions.assertEquals(1989438546, model.tcpSocket().port()); - Assertions.assertEquals(5387832879483701613L, model.terminationGracePeriodSeconds()); - Assertions.assertEquals(487764269, model.timeoutSeconds()); - Assertions.assertEquals(Type.STARTUP, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbe model = - new ContainerAppProbe() - .withFailureThreshold(1317619791) - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHost("kzzlvmbmpaxmodf") - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("fy") - .withValue("sbpfvmwyhr"))) - .withPath("uyfta") - .withPort(1378791233) - .withScheme(Scheme.HTTPS)) - .withInitialDelaySeconds(369562825) - .withPeriodSeconds(1040923285) - .withSuccessThreshold(842537299) - .withTcpSocket(new ContainerAppProbeTcpSocket().withHost("nubexk").withPort(1989438546)) - .withTerminationGracePeriodSeconds(5387832879483701613L) - .withTimeoutSeconds(487764269) - .withType(Type.STARTUP); - model = BinaryData.fromObject(model).toObject(ContainerAppProbe.class); - Assertions.assertEquals(1317619791, model.failureThreshold()); - Assertions.assertEquals("kzzlvmbmpaxmodf", model.httpGet().host()); - Assertions.assertEquals("fy", model.httpGet().httpHeaders().get(0).name()); - Assertions.assertEquals("sbpfvmwyhr", model.httpGet().httpHeaders().get(0).value()); - Assertions.assertEquals("uyfta", model.httpGet().path()); - Assertions.assertEquals(1378791233, model.httpGet().port()); - Assertions.assertEquals(Scheme.HTTPS, model.httpGet().scheme()); - Assertions.assertEquals(369562825, model.initialDelaySeconds()); - Assertions.assertEquals(1040923285, model.periodSeconds()); - Assertions.assertEquals(842537299, model.successThreshold()); - Assertions.assertEquals("nubexk", model.tcpSocket().host()); - Assertions.assertEquals(1989438546, model.tcpSocket().port()); - Assertions.assertEquals(5387832879483701613L, model.terminationGracePeriodSeconds()); - Assertions.assertEquals(487764269, model.timeoutSeconds()); - Assertions.assertEquals(Type.STARTUP, model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteWithResponseMockTests.java deleted file mode 100644 index 80c20b9b23f16..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsAuthConfigsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .containerAppsAuthConfigs() - .deleteWithResponse("mfp", "hojeevy", "yhsgz", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.java deleted file mode 100644 index 75f04d9e9f246..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.containerApps().delete("ilkmk", "holvdn", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorWithResponseMockTests.java deleted file mode 100644 index 579b6aa1dd416..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorWithResponseMockTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDiagnosticsGetDetectorWithResponseMockTests { - @Test - public void testGetDetectorWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"metadata\":{\"id\":\"omzisglrrcz\",\"name\":\"k\",\"description\":\"ltn\",\"author\":\"dhqoawj\",\"category\":\"yueayfbpcmsp\",\"supportTopicList\":[{\"id\":\"rueqthwm\",\"pesId\":\"mbscbbx\"},{\"id\":\"dhxiidlopedbwd\",\"pesId\":\"qyybxubmdnafcbq\"}],\"analysisTypes\":[\"mjel\"],\"type\":\"acigel\",\"score\":74.37067},\"dataset\":[{\"table\":{\"tableName\":\"vwzkj\",\"columns\":[{},{},{},{}],\"rows\":[\"dataonrlkwzdqybxceak\",\"datacptsoqfyiase\",\"datachkrttzr\",\"datazisgykiuemvanb\"]},\"renderingProperties\":{\"type\":974039641,\"title\":\"nrxxbsojklin\",\"description\":\"dptysprqs\",\"isVisible\":true}},{\"table\":{\"tableName\":\"jp\",\"columns\":[{},{},{},{}],\"rows\":[\"datag\",\"dataliufiqwoyxq\"]},\"renderingProperties\":{\"type\":711463850,\"title\":\"hhoucq\",\"description\":\"oj\",\"isVisible\":false}},{\"table\":{\"tableName\":\"zdcgdzbenr\",\"columns\":[{},{},{}],\"rows\":[\"dataetzqd\",\"datatjwfljhznamtua\",\"datamzwcjjncqt\",\"dataz\"]},\"renderingProperties\":{\"type\":1502507838,\"title\":\"bgatzu\",\"description\":\"bxn\",\"isVisible\":false}},{\"table\":{\"tableName\":\"ggahtt\",\"columns\":[{},{}],\"rows\":[\"dataajqfutlx\"]},\"renderingProperties\":{\"type\":1442149444,\"title\":\"sunwqrjzfrgqhaoh\",\"description\":\"buocnjr\",\"isVisible\":true}}],\"status\":{\"message\":\"yryxameblydyv\",\"statusId\":2057319587},\"dataProviderMetadata\":{\"providerName\":\"ocxnehvsmtodl\",\"propertyBag\":[{\"name\":\"pucygvoavyunss\",\"value\":\"ghiee\"},{\"name\":\"lgvvpaseksgbu\",\"value\":\"ntuygdhgaqipir\"},{\"name\":\"wrq\",\"value\":\"ulopmjnlexwhcb\"}]}},\"id\":\"pibkephuu\",\"name\":\"erctatoyin\",\"type\":\"qpbrlc\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Diagnostics response = - manager - .containerAppsDiagnostics() - .getDetectorWithResponse("iowxi", "spnxwqagnepzw", "klsbsbqqqagw", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("mjel", response.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("vwzkj", response.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(974039641, response.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("nrxxbsojklin", response.properties().dataset().get(0).renderingProperties().title()); - Assertions - .assertEquals("dptysprqs", response.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, response.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("yryxameblydyv", response.properties().status().message()); - Assertions.assertEquals(2057319587, response.properties().status().statusId()); - Assertions.assertEquals("ocxnehvsmtodl", response.properties().dataProviderMetadata().providerName()); - Assertions - .assertEquals("pucygvoavyunss", response.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("ghiee", response.properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java deleted file mode 100644 index 3736d16590e06..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDiagnosticsListDetectorsMockTests { - @Test - public void testListDetectors() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"metadata\":{\"id\":\"gvgovpbbttefjo\",\"name\":\"ssqyzqedik\",\"description\":\"rdbiqmrjge\",\"author\":\"fqlggw\",\"category\":\"wzcxmjpbyephmgt\",\"supportTopicList\":[{\"id\":\"rc\",\"pesId\":\"fqip\"}],\"analysisTypes\":[\"npomy\"],\"type\":\"cabvnuil\",\"score\":64.833626},\"dataset\":[{\"table\":{\"tableName\":\"paugmrmfjlrxwt\",\"columns\":[{},{}],\"rows\":[\"datafkvcisi\",\"datamoaedsxj\",\"datauivedwcgyeewxeiq\",\"datapsmgo\"]},\"renderingProperties\":{\"type\":1932184921,\"title\":\"ljdlrgmspl\",\"description\":\"auf\",\"isVisible\":true}},{\"table\":{\"tableName\":\"new\",\"columns\":[{}],\"rows\":[\"datampqanxrjkixtwbt\",\"dataoypnyg\",\"datashxcylhkg\",\"datansghp\"]},\"renderingProperties\":{\"type\":1324259721,\"title\":\"drwjjkhvyom\",\"description\":\"luzvxnq\",\"isVisible\":false}},{\"table\":{\"tableName\":\"pd\",\"columns\":[{},{},{}],\"rows\":[\"dataisqcssffxuifmcs\"]},\"renderingProperties\":{\"type\":861169012,\"title\":\"dqzrdzsyloll\",\"description\":\"rc\",\"isVisible\":false}}],\"status\":{\"message\":\"xzji\",\"statusId\":1590781119},\"dataProviderMetadata\":{\"providerName\":\"urkihci\",\"propertyBag\":[{\"name\":\"fx\",\"value\":\"c\"},{\"name\":\"nbkkjanurnnq\",\"value\":\"q\"}]}},\"id\":\"pizxqltgrdogyp\",\"name\":\"rxvbfihwuh\",\"type\":\"ctafsrbxrblm\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.containerAppsDiagnostics().listDetectors("xxkubvphavp", "h", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("npomy", response.iterator().next().properties().metadata().analysisTypes().get(0)); - Assertions - .assertEquals( - "paugmrmfjlrxwt", response.iterator().next().properties().dataset().get(0).table().tableName()); - Assertions - .assertEquals( - 1932184921, response.iterator().next().properties().dataset().get(0).renderingProperties().type()); - Assertions - .assertEquals( - "ljdlrgmspl", response.iterator().next().properties().dataset().get(0).renderingProperties().title()); - Assertions - .assertEquals( - "auf", response.iterator().next().properties().dataset().get(0).renderingProperties().description()); - Assertions - .assertEquals( - true, response.iterator().next().properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("xzji", response.iterator().next().properties().status().message()); - Assertions.assertEquals(1590781119, response.iterator().next().properties().status().statusId()); - Assertions - .assertEquals("urkihci", response.iterator().next().properties().dataProviderMetadata().providerName()); - Assertions - .assertEquals( - "fx", response.iterator().next().properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions - .assertEquals( - "c", response.iterator().next().properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests.java deleted file mode 100644 index 9adf3b9355043..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Replica; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests { - @Test - public void testGetReplicaWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"createdTime\":\"2021-04-22T19:07:29Z\",\"runningState\":\"Running\",\"runningStateDetails\":\"nsq\",\"containers\":[{\"name\":\"comlikytwvczc\",\"containerId\":\"k\",\"ready\":false,\"started\":false,\"restartCount\":789888473,\"runningState\":\"Terminated\",\"runningStateDetails\":\"vhb\",\"logStreamEndpoint\":\"nfxtgdd\",\"execEndpoint\":\"th\"}],\"initContainers\":[{\"name\":\"naoyank\",\"containerId\":\"eqswanklty\",\"ready\":false,\"started\":true,\"restartCount\":1174469585,\"runningState\":\"Terminated\",\"runningStateDetails\":\"drlktg\",\"logStreamEndpoint\":\"sggux\",\"execEndpoint\":\"mlwywaeeczg\"}]},\"id\":\"bukklels\",\"name\":\"xblycsxzuj\",\"type\":\"srlsmd\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Replica response = - manager - .containerAppsRevisionReplicas() - .getReplicaWithResponse("rhpw", "gddeimaw", "o", "gkkumuikjcj", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("comlikytwvczc", response.containers().get(0).name()); - Assertions.assertEquals("k", response.containers().get(0).containerId()); - Assertions.assertEquals(false, response.containers().get(0).ready()); - Assertions.assertEquals(false, response.containers().get(0).started()); - Assertions.assertEquals(789888473, response.containers().get(0).restartCount()); - Assertions.assertEquals("naoyank", response.initContainers().get(0).name()); - Assertions.assertEquals("eqswanklty", response.initContainers().get(0).containerId()); - Assertions.assertEquals(false, response.initContainers().get(0).ready()); - Assertions.assertEquals(true, response.initContainers().get(0).started()); - Assertions.assertEquals(1174469585, response.initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasWithResponseMockTests.java deleted file mode 100644 index 188a36db323b3..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasWithResponseMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ReplicaCollection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionReplicasListReplicasWithResponseMockTests { - @Test - public void testListReplicasWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-08-20T05:45:20Z\",\"runningState\":\"Unknown\",\"runningStateDetails\":\"vuhx\",\"containers\":[{},{},{},{}],\"initContainers\":[{},{},{}]},\"id\":\"tznabao\",\"name\":\"nslujd\",\"type\":\"ltymkmvguihywart\"},{\"properties\":{\"createdTime\":\"2021-01-15T23:22:51Z\",\"runningState\":\"Running\",\"runningStateDetails\":\"ky\",\"containers\":[{}],\"initContainers\":[{}]},\"id\":\"j\",\"name\":\"emmucfxh\",\"type\":\"kkflrmymyincqlhr\"},{\"properties\":{\"createdTime\":\"2021-10-10T16:10:58Z\",\"runningState\":\"NotRunning\",\"runningStateDetails\":\"iiovgqcgxu\",\"containers\":[{},{},{},{}],\"initContainers\":[{},{},{}]},\"id\":\"totiowlxteqdptjg\",\"name\":\"dtguk\",\"type\":\"anblwphqlkccu\"},{\"properties\":{\"createdTime\":\"2021-06-12T18:54:42Z\",\"runningState\":\"NotRunning\",\"runningStateDetails\":\"hoi\",\"containers\":[{},{}],\"initContainers\":[{},{},{}]},\"id\":\"iip\",\"name\":\"glvawuwzdufypivl\",\"type\":\"bbjpmcubkmif\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ReplicaCollection response = - manager - .containerAppsRevisionReplicas() - .listReplicasWithResponse( - "sqplpvmjcd", "ewbidyvteowxv", "piudeugfsxzecpa", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionWithResponseMockTests.java deleted file mode 100644 index cbeef4941d5ad..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionsActivateRevisionWithResponseMockTests { - @Test - public void testActivateRevisionWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .containerAppsRevisions() - .activateRevisionWithResponse("obbpihehc", "cy", "mrqbrjbbmpxdlv", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests.java deleted file mode 100644 index abbcebd7f7cd8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests { - @Test - public void testDeactivateRevisionWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .containerAppsRevisions() - .deactivateRevisionWithResponse("kfrexcrseqwjks", "hud", "zhxogjggsvo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionWithResponseMockTests.java deleted file mode 100644 index adfd8cfe9a9b4..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionsRestartRevisionWithResponseMockTests { - @Test - public void testRestartRevisionWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .containerAppsRevisions() - .restartRevisionWithResponse("jkxibda", "hrkmdyomkxfbvfbh", "y", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java deleted file mode 100644 index 2f123cd1fd8a9..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsSourceControlsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .containerAppsSourceControls() - .delete("efgnaavuagnt", "taoutnpdct", "hspfefyihd", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java deleted file mode 100644 index 421a48460236b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import org.junit.jupiter.api.Assertions; - -public final class ContainerResourcesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerResources model = - BinaryData - .fromString( - "{\"cpu\":4.886296094520515,\"memory\":\"muwlauwzizxbm\",\"ephemeralStorage\":\"cjefuzmu\"}") - .toObject(ContainerResources.class); - Assertions.assertEquals(4.886296094520515D, model.cpu()); - Assertions.assertEquals("muwlauwzizxbm", model.memory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerResources model = new ContainerResources().withCpu(4.886296094520515D).withMemory("muwlauwzizxbm"); - model = BinaryData.fromObject(model).toObject(ContainerResources.class); - Assertions.assertEquals(4.886296094520515D, model.cpu()); - Assertions.assertEquals("muwlauwzizxbm", model.memory()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.java deleted file mode 100644 index a520ea88850d8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CookieExpiration; -import com.azure.resourcemanager.appcontainers.models.CookieExpirationConvention; -import org.junit.jupiter.api.Assertions; - -public final class CookieExpirationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CookieExpiration model = - BinaryData - .fromString("{\"convention\":\"FixedTime\",\"timeToExpiration\":\"y\"}") - .toObject(CookieExpiration.class); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.convention()); - Assertions.assertEquals("y", model.timeToExpiration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CookieExpiration model = - new CookieExpiration().withConvention(CookieExpirationConvention.FIXED_TIME).withTimeToExpiration("y"); - model = BinaryData.fromObject(model).toObject(CookieExpiration.class); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.convention()); - Assertions.assertEquals("y", model.timeToExpiration()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.java deleted file mode 100644 index 8d6738b7f3ca9..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BindingType; -import com.azure.resourcemanager.appcontainers.models.CustomDomain; -import org.junit.jupiter.api.Assertions; - -public final class CustomDomainTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomDomain model = - BinaryData - .fromString("{\"name\":\"ac\",\"bindingType\":\"SniEnabled\",\"certificateId\":\"fqrhhuaopppc\"}") - .toObject(CustomDomain.class); - Assertions.assertEquals("ac", model.name()); - Assertions.assertEquals(BindingType.SNI_ENABLED, model.bindingType()); - Assertions.assertEquals("fqrhhuaopppc", model.certificateId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomDomain model = - new CustomDomain() - .withName("ac") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId("fqrhhuaopppc"); - model = BinaryData.fromObject(model).toObject(CustomDomain.class); - Assertions.assertEquals("ac", model.name()); - Assertions.assertEquals(BindingType.SNI_ENABLED, model.bindingType()); - Assertions.assertEquals("fqrhhuaopppc", model.certificateId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteWithResponseMockTests.java deleted file mode 100644 index 5758d5a08d1c7..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DaprComponentsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .daprComponents() - .deleteWithResponse("zjiihjr", "ybmrzoepnxwd", "wnjkgvfn", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsWithResponseMockTests.java deleted file mode 100644 index a748b5bfa896d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DaprComponentsListSecretsWithResponseMockTests { - @Test - public void testListSecretsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"sbede\",\"value\":\"exkxbhx\"},{\"name\":\"cnulgmnhjevdy\",\"value\":\"fajs\"},{\"name\":\"skmqozzkivyhj\",\"value\":\"iizjixlqfhefkwa\"},{\"name\":\"olro\",\"value\":\"qlmgnlqxsjxt\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DaprSecretsCollection response = - manager - .daprComponents() - .listSecretsWithResponse("xaurs", "ftibtyibuyvpirfq", "pnqn", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprConfigurationTests.java deleted file mode 100644 index 7007877b3e7a3..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprConfigurationTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprConfiguration; - -public final class DaprConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprConfiguration model = - BinaryData.fromString("{\"version\":\"idfcxsspuunnoxyh\"}").toObject(DaprConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprConfiguration model = new DaprConfiguration(); - model = BinaryData.fromObject(model).toObject(DaprConfiguration.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretTests.java deleted file mode 100644 index 27ed39a23269f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprSecret; - -public final class DaprSecretTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSecret model = - BinaryData.fromString("{\"name\":\"eil\",\"value\":\"notyfjfcnjbkcn\"}").toObject(DaprSecret.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSecret model = new DaprSecret(); - model = BinaryData.fromObject(model).toObject(DaprSecret.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.java deleted file mode 100644 index a270b848efff6..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.DaprSecret; -import java.util.Arrays; - -public final class DaprSecretsCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSecretsCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"vpesapskrdqmhjjd\",\"value\":\"ldwkyzxuutkn\"},{\"name\":\"scwsv\",\"value\":\"otogtwrupqs\"},{\"name\":\"nmic\",\"value\":\"vce\"}]}") - .toObject(DaprSecretsCollectionInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSecretsCollectionInner model = - new DaprSecretsCollectionInner() - .withValue(Arrays.asList(new DaprSecret(), new DaprSecret(), new DaprSecret())); - model = BinaryData.fromObject(model).toObject(DaprSecretsCollectionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java deleted file mode 100644 index 96f6f41ecfe6c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AppProtocol; -import com.azure.resourcemanager.appcontainers.models.Dapr; -import com.azure.resourcemanager.appcontainers.models.LogLevel; -import org.junit.jupiter.api.Assertions; - -public final class DaprTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Dapr model = - BinaryData - .fromString( - "{\"enabled\":false,\"appId\":\"rfbjf\",\"appProtocol\":\"http\",\"appPort\":2146010865,\"httpReadBufferSize\":22179172,\"httpMaxRequestSize\":2101794539,\"logLevel\":\"info\",\"enableApiLogging\":true}") - .toObject(Dapr.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("rfbjf", model.appId()); - Assertions.assertEquals(AppProtocol.HTTP, model.appProtocol()); - Assertions.assertEquals(2146010865, model.appPort()); - Assertions.assertEquals(22179172, model.httpReadBufferSize()); - Assertions.assertEquals(2101794539, model.httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.INFO, model.logLevel()); - Assertions.assertEquals(true, model.enableApiLogging()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Dapr model = - new Dapr() - .withEnabled(false) - .withAppId("rfbjf") - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(2146010865) - .withHttpReadBufferSize(22179172) - .withHttpMaxRequestSize(2101794539) - .withLogLevel(LogLevel.INFO) - .withEnableApiLogging(true); - model = BinaryData.fromObject(model).toObject(Dapr.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("rfbjf", model.appId()); - Assertions.assertEquals(AppProtocol.HTTP, model.appProtocol()); - Assertions.assertEquals(2146010865, model.appPort()); - Assertions.assertEquals(22179172, model.httpReadBufferSize()); - Assertions.assertEquals(2101794539, model.httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.INFO, model.logLevel()); - Assertions.assertEquals(true, model.enableApiLogging()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.java deleted file mode 100644 index 1ce9050dcdfd6..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedPrincipals; -import com.azure.resourcemanager.appcontainers.models.DefaultAuthorizationPolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DefaultAuthorizationPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DefaultAuthorizationPolicy model = - BinaryData - .fromString( - "{\"allowedPrincipals\":{\"groups\":[\"mxdcufufsrp\",\"mzidnsezcxtb\"],\"identities\":[\"fycc\",\"newmdwzjeiachbo\"]},\"allowedApplications\":[\"lnrosfqp\",\"eeh\",\"zvypyqrimzinp\",\"swjdkirso\"]}") - .toObject(DefaultAuthorizationPolicy.class); - Assertions.assertEquals("mxdcufufsrp", model.allowedPrincipals().groups().get(0)); - Assertions.assertEquals("fycc", model.allowedPrincipals().identities().get(0)); - Assertions.assertEquals("lnrosfqp", model.allowedApplications().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultAuthorizationPolicy model = - new DefaultAuthorizationPolicy() - .withAllowedPrincipals( - new AllowedPrincipals() - .withGroups(Arrays.asList("mxdcufufsrp", "mzidnsezcxtb")) - .withIdentities(Arrays.asList("fycc", "newmdwzjeiachbo"))) - .withAllowedApplications(Arrays.asList("lnrosfqp", "eeh", "zvypyqrimzinp", "swjdkirso")); - model = BinaryData.fromObject(model).toObject(DefaultAuthorizationPolicy.class); - Assertions.assertEquals("mxdcufufsrp", model.allowedPrincipals().groups().get(0)); - Assertions.assertEquals("fycc", model.allowedPrincipals().identities().get(0)); - Assertions.assertEquals("lnrosfqp", model.allowedApplications().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultErrorResponseErrorTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultErrorResponseErrorTests.java deleted file mode 100644 index de7c60517d5c5..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultErrorResponseErrorTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseError; - -public final class DefaultErrorResponseErrorTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DefaultErrorResponseError model = - BinaryData.fromString("{\"innererror\":\"lokeyy\"}").toObject(DefaultErrorResponseError.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultErrorResponseError model = new DefaultErrorResponseError(); - model = BinaryData.fromObject(model).toObject(DefaultErrorResponseError.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.java deleted file mode 100644 index f4da5fb60726d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticDataProviderMetadataPropertyBagItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticDataProviderMetadataPropertyBagItem model = - BinaryData - .fromString("{\"name\":\"r\",\"value\":\"lmywwtkgkxnyed\"}") - .toObject(DiagnosticDataProviderMetadataPropertyBagItem.class); - Assertions.assertEquals("r", model.name()); - Assertions.assertEquals("lmywwtkgkxnyed", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataProviderMetadataPropertyBagItem model = - new DiagnosticDataProviderMetadataPropertyBagItem().withName("r").withValue("lmywwtkgkxnyed"); - model = BinaryData.fromObject(model).toObject(DiagnosticDataProviderMetadataPropertyBagItem.class); - Assertions.assertEquals("r", model.name()); - Assertions.assertEquals("lmywwtkgkxnyed", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataTests.java deleted file mode 100644 index 2cbf11413ca00..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticDataProviderMetadataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticDataProviderMetadata model = - BinaryData - .fromString( - "{\"providerName\":\"vazivjlfr\",\"propertyBag\":[{\"name\":\"ajlkatnw\",\"value\":\"iopid\"},{\"name\":\"qfkuvscxkdmli\",\"value\":\"vibrxkpmloazuruo\"},{\"name\":\"goorbteo\",\"value\":\"fhjxakvvjgs\"}]}") - .toObject(DiagnosticDataProviderMetadata.class); - Assertions.assertEquals("vazivjlfr", model.providerName()); - Assertions.assertEquals("ajlkatnw", model.propertyBag().get(0).name()); - Assertions.assertEquals("iopid", model.propertyBag().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataProviderMetadata model = - new DiagnosticDataProviderMetadata() - .withProviderName("vazivjlfr") - .withPropertyBag( - Arrays - .asList( - new DiagnosticDataProviderMetadataPropertyBagItem().withName("ajlkatnw").withValue("iopid"), - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("qfkuvscxkdmli") - .withValue("vibrxkpmloazuruo"), - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("goorbteo") - .withValue("fhjxakvvjgs"))); - model = BinaryData.fromObject(model).toObject(DiagnosticDataProviderMetadata.class); - Assertions.assertEquals("vazivjlfr", model.providerName()); - Assertions.assertEquals("ajlkatnw", model.propertyBag().get(0).name()); - Assertions.assertEquals("iopid", model.propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseColumnTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseColumnTests.java deleted file mode 100644 index 30ee263cca401..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseColumnTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticDataTableResponseColumnTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticDataTableResponseColumn model = - BinaryData - .fromString("{\"columnName\":\"ubdyhgk\",\"dataType\":\"in\",\"columnType\":\"owzfttsttkt\"}") - .toObject(DiagnosticDataTableResponseColumn.class); - Assertions.assertEquals("ubdyhgk", model.columnName()); - Assertions.assertEquals("in", model.dataType()); - Assertions.assertEquals("owzfttsttkt", model.columnType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataTableResponseColumn model = - new DiagnosticDataTableResponseColumn() - .withColumnName("ubdyhgk") - .withDataType("in") - .withColumnType("owzfttsttkt"); - model = BinaryData.fromObject(model).toObject(DiagnosticDataTableResponseColumn.class); - Assertions.assertEquals("ubdyhgk", model.columnName()); - Assertions.assertEquals("in", model.dataType()); - Assertions.assertEquals("owzfttsttkt", model.columnType()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseObjectTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseObjectTests.java deleted file mode 100644 index cd4989b292ae6..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseObjectTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticDataTableResponseObjectTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticDataTableResponseObject model = - BinaryData - .fromString( - "{\"tableName\":\"gdufiqnd\",\"columns\":[{\"columnName\":\"ao\",\"dataType\":\"chvcyyysfgdo\",\"columnType\":\"ubiipuipwoqonma\"},{\"columnName\":\"ekni\",\"dataType\":\"hqvcimpevfgmblr\",\"columnType\":\"lbywdxsm\"},{\"columnName\":\"cwrwfs\",\"dataType\":\"fnynszqujizdvoqy\",\"columnType\":\"byowbblgyavutp\"},{\"columnName\":\"joxoism\",\"dataType\":\"sbpimlq\",\"columnType\":\"jxkcgxxlxsff\"}],\"rows\":[\"dataizqzdwlvwlyou\",\"datafgfb\"]}") - .toObject(DiagnosticDataTableResponseObject.class); - Assertions.assertEquals("gdufiqnd", model.tableName()); - Assertions.assertEquals("ao", model.columns().get(0).columnName()); - Assertions.assertEquals("chvcyyysfgdo", model.columns().get(0).dataType()); - Assertions.assertEquals("ubiipuipwoqonma", model.columns().get(0).columnType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataTableResponseObject model = - new DiagnosticDataTableResponseObject() - .withTableName("gdufiqnd") - .withColumns( - Arrays - .asList( - new DiagnosticDataTableResponseColumn() - .withColumnName("ao") - .withDataType("chvcyyysfgdo") - .withColumnType("ubiipuipwoqonma"), - new DiagnosticDataTableResponseColumn() - .withColumnName("ekni") - .withDataType("hqvcimpevfgmblr") - .withColumnType("lbywdxsm"), - new DiagnosticDataTableResponseColumn() - .withColumnName("cwrwfs") - .withDataType("fnynszqujizdvoqy") - .withColumnType("byowbblgyavutp"), - new DiagnosticDataTableResponseColumn() - .withColumnName("joxoism") - .withDataType("sbpimlq") - .withColumnType("jxkcgxxlxsff"))) - .withRows(Arrays.asList("dataizqzdwlvwlyou", "datafgfb")); - model = BinaryData.fromObject(model).toObject(DiagnosticDataTableResponseObject.class); - Assertions.assertEquals("gdufiqnd", model.tableName()); - Assertions.assertEquals("ao", model.columns().get(0).columnName()); - Assertions.assertEquals("chvcyyysfgdo", model.columns().get(0).dataType()); - Assertions.assertEquals("ubiipuipwoqonma", model.columns().get(0).columnType()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticRenderingTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticRenderingTests.java deleted file mode 100644 index e4a2e054676ef..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticRenderingTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticRenderingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticRendering model = - BinaryData - .fromString( - "{\"type\":631157488,\"title\":\"qactxtgzukxitmmq\",\"description\":\"qqqxhrnxrx\",\"isVisible\":true}") - .toObject(DiagnosticRendering.class); - Assertions.assertEquals(631157488, model.type()); - Assertions.assertEquals("qactxtgzukxitmmq", model.title()); - Assertions.assertEquals("qqqxhrnxrx", model.description()); - Assertions.assertEquals(true, model.isVisible()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticRendering model = - new DiagnosticRendering() - .withType(631157488) - .withTitle("qactxtgzukxitmmq") - .withDescription("qqqxhrnxrx") - .withIsVisible(true); - model = BinaryData.fromObject(model).toObject(DiagnosticRendering.class); - Assertions.assertEquals(631157488, model.type()); - Assertions.assertEquals("qactxtgzukxitmmq", model.title()); - Assertions.assertEquals("qqqxhrnxrx", model.description()); - Assertions.assertEquals(true, model.isVisible()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java deleted file mode 100644 index 54b164330df7b..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; - -public final class DiagnosticSupportTopicTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticSupportTopic model = - BinaryData - .fromString("{\"id\":\"bkwdlenrds\",\"pesId\":\"ujbazpjuohminyfl\"}") - .toObject(DiagnosticSupportTopic.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticSupportTopic model = new DiagnosticSupportTopic(); - model = BinaryData.fromObject(model).toObject(DiagnosticSupportTopic.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.java deleted file mode 100644 index 4c91459bd2412..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"metadata\":{\"id\":\"bqaays\",\"name\":\"ixqtn\",\"description\":\"tezlwff\",\"author\":\"akpjpqqmtedlt\",\"category\":\"jihy\",\"supportTopicList\":[{}],\"analysisTypes\":[\"vwau\",\"qncygupkvi\",\"mdscwxqupev\"],\"type\":\"f\",\"score\":56.80255},\"dataset\":[{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}}],\"status\":{\"message\":\"ypelmcu\",\"statusId\":1157427195},\"dataProviderMetadata\":{\"providerName\":\"jxyfwnylrcoolstt\",\"propertyBag\":[{},{}]}},\"id\":\"w\",\"name\":\"kbnujr\",\"type\":\"wvtylbfpncurdo\"},{\"properties\":{\"metadata\":{\"id\":\"thtywub\",\"name\":\"bihwqknfdnt\",\"description\":\"chrdgoihxumwcto\",\"author\":\"zj\",\"category\":\"udfdlwgg\",\"supportTopicList\":[{}],\"analysisTypes\":[\"tov\",\"tgseinqfiufxqkn\",\"irgne\"],\"type\":\"twqmsniffcdmqnr\",\"score\":65.80664},\"dataset\":[{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}}],\"status\":{\"message\":\"dhcrati\",\"statusId\":142407954},\"dataProviderMetadata\":{\"providerName\":\"asxifto\",\"propertyBag\":[{},{},{},{}]}},\"id\":\"zh\",\"name\":\"tw\",\"type\":\"sgogczhonnxk\"}],\"nextLink\":\"gnyhmossxkkg\"}") - .toObject(DiagnosticsCollectionInner.class); - Assertions.assertEquals("vwau", model.value().get(0).properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("ypelmcu", model.value().get(0).properties().status().message()); - Assertions.assertEquals(1157427195, model.value().get(0).properties().status().statusId()); - Assertions - .assertEquals("jxyfwnylrcoolstt", model.value().get(0).properties().dataProviderMetadata().providerName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsCollectionInner model = - new DiagnosticsCollectionInner() - .withValue( - Arrays - .asList( - new DiagnosticsInner() - .withProperties( - new DiagnosticsProperties() - .withMetadata( - new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("vwau", "qncygupkvi", "mdscwxqupev"))) - .withDataset( - Arrays - .asList( - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()))) - .withStatus( - new DiagnosticsStatus().withMessage("ypelmcu").withStatusId(1157427195)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata() - .withProviderName("jxyfwnylrcoolstt") - .withPropertyBag( - Arrays - .asList( - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem())))), - new DiagnosticsInner() - .withProperties( - new DiagnosticsProperties() - .withMetadata( - new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("tov", "tgseinqfiufxqkn", "irgne"))) - .withDataset( - Arrays - .asList( - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()))) - .withStatus( - new DiagnosticsStatus().withMessage("dhcrati").withStatusId(142407954)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata() - .withProviderName("asxifto") - .withPropertyBag( - Arrays - .asList( - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem())))))); - model = BinaryData.fromObject(model).toObject(DiagnosticsCollectionInner.class); - Assertions.assertEquals("vwau", model.value().get(0).properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("ypelmcu", model.value().get(0).properties().status().message()); - Assertions.assertEquals(1157427195, model.value().get(0).properties().status().statusId()); - Assertions - .assertEquals("jxyfwnylrcoolstt", model.value().get(0).properties().dataProviderMetadata().providerName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java deleted file mode 100644 index 76de19a59494a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsDataApiResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsDataApiResponse model = - BinaryData - .fromString( - "{\"table\":{\"tableName\":\"wmd\",\"columns\":[{\"columnName\":\"klvxwmyg\",\"dataType\":\"pgpqchiszepnnb\",\"columnType\":\"rxgibbd\"},{\"columnName\":\"confozauors\",\"dataType\":\"okwbqplh\",\"columnType\":\"nuuepzlrp\"}],\"rows\":[\"datasoldweyuqdunv\",\"datannrwrbiork\"]},\"renderingProperties\":{\"type\":476504183,\"title\":\"jhhgdnhxmsi\",\"description\":\"omi\",\"isVisible\":false}}") - .toObject(DiagnosticsDataApiResponse.class); - Assertions.assertEquals("wmd", model.table().tableName()); - Assertions.assertEquals("klvxwmyg", model.table().columns().get(0).columnName()); - Assertions.assertEquals("pgpqchiszepnnb", model.table().columns().get(0).dataType()); - Assertions.assertEquals("rxgibbd", model.table().columns().get(0).columnType()); - Assertions.assertEquals(476504183, model.renderingProperties().type()); - Assertions.assertEquals("jhhgdnhxmsi", model.renderingProperties().title()); - Assertions.assertEquals("omi", model.renderingProperties().description()); - Assertions.assertEquals(false, model.renderingProperties().isVisible()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsDataApiResponse model = - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("wmd") - .withColumns( - Arrays - .asList( - new DiagnosticDataTableResponseColumn() - .withColumnName("klvxwmyg") - .withDataType("pgpqchiszepnnb") - .withColumnType("rxgibbd"), - new DiagnosticDataTableResponseColumn() - .withColumnName("confozauors") - .withDataType("okwbqplh") - .withColumnType("nuuepzlrp"))) - .withRows(Arrays.asList("datasoldweyuqdunv", "datannrwrbiork"))) - .withRenderingProperties( - new DiagnosticRendering() - .withType(476504183) - .withTitle("jhhgdnhxmsi") - .withDescription("omi") - .withIsVisible(false)); - model = BinaryData.fromObject(model).toObject(DiagnosticsDataApiResponse.class); - Assertions.assertEquals("wmd", model.table().tableName()); - Assertions.assertEquals("klvxwmyg", model.table().columns().get(0).columnName()); - Assertions.assertEquals("pgpqchiszepnnb", model.table().columns().get(0).dataType()); - Assertions.assertEquals("rxgibbd", model.table().columns().get(0).columnType()); - Assertions.assertEquals(476504183, model.renderingProperties().type()); - Assertions.assertEquals("jhhgdnhxmsi", model.renderingProperties().title()); - Assertions.assertEquals("omi", model.renderingProperties().description()); - Assertions.assertEquals(false, model.renderingProperties().isVisible()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java deleted file mode 100644 index 3fc7910422a19..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsDefinition model = - BinaryData - .fromString( - "{\"id\":\"yjkqabqgzslesjcb\",\"name\":\"rnntiewdjcv\",\"description\":\"uwrbehwagoh\",\"author\":\"f\",\"category\":\"mrqemvvhmx\",\"supportTopicList\":[{\"id\":\"futacoebjvewzc\",\"pesId\":\"nmwcpmgu\"},{\"id\":\"draufactkah\",\"pesId\":\"v\"}],\"analysisTypes\":[\"ziuxxpshnee\"],\"type\":\"lfg\",\"score\":26.94627}") - .toObject(DiagnosticsDefinition.class); - Assertions.assertEquals("ziuxxpshnee", model.analysisTypes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsDefinition model = - new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("ziuxxpshnee")); - model = BinaryData.fromObject(model).toObject(DiagnosticsDefinition.class); - Assertions.assertEquals("ziuxxpshnee", model.analysisTypes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsInnerTests.java deleted file mode 100644 index ab8eed7c778f8..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsInnerTests.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsInner model = - BinaryData - .fromString( - "{\"properties\":{\"metadata\":{\"id\":\"gh\",\"name\":\"bdhqxvcxgf\",\"description\":\"dsofbshrns\",\"author\":\"uswdv\",\"category\":\"ybycnunvj\",\"supportTopicList\":[{\"id\":\"f\",\"pesId\":\"nopqgikyzirtx\"}],\"analysisTypes\":[\"x\",\"ejnt\",\"sewgioilqukr\"],\"type\":\"xtqmieoxor\",\"score\":64.62172},\"dataset\":[{\"table\":{\"tableName\":\"omtbghhavgrvkff\",\"columns\":[{},{},{},{}],\"rows\":[\"datapjbi\",\"datagjmfxumvfcl\"]},\"renderingProperties\":{\"type\":2107633088,\"title\":\"xnbkfezzxscyhwzd\",\"description\":\"rujbzbomvzzbtdc\",\"isVisible\":true}},{\"table\":{\"tableName\":\"yujviylwdshfssn\",\"columns\":[{}],\"rows\":[\"datafrymsgaojfmwnc\"]},\"renderingProperties\":{\"type\":700953056,\"title\":\"hirctymoxoftpipi\",\"description\":\"czuhxacpqjlihh\",\"isVisible\":true}},{\"table\":{\"tableName\":\"kasdvlm\",\"columns\":[{},{},{},{}],\"rows\":[\"datax\",\"datalucvpam\",\"datasreuzvxurisjnh\",\"dataytxifqjzgxmrh\"]},\"renderingProperties\":{\"type\":403382899,\"title\":\"cesutrgjupauut\",\"description\":\"oqh\",\"isVisible\":false}},{\"table\":{\"tableName\":\"g\",\"columns\":[{},{},{}],\"rows\":[\"dataqntcypsxjvfoimwk\",\"datalirc\"]},\"renderingProperties\":{\"type\":1956254866,\"title\":\"ydfce\",\"description\":\"vlhv\",\"isVisible\":true}}],\"status\":{\"message\":\"t\",\"statusId\":642737212},\"dataProviderMetadata\":{\"providerName\":\"nawjslbiwkojgcy\",\"propertyBag\":[{\"name\":\"mznbaeqphch\",\"value\":\"rn\"},{\"name\":\"x\",\"value\":\"uwrykqgaifmvikl\"},{\"name\":\"dvk\",\"value\":\"ejd\"}]}},\"id\":\"nxcvds\",\"name\":\"hnjivo\",\"type\":\"v\"}") - .toObject(DiagnosticsInner.class); - Assertions.assertEquals("x", model.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("omtbghhavgrvkff", model.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(2107633088, model.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("xnbkfezzxscyhwzd", model.properties().dataset().get(0).renderingProperties().title()); - Assertions - .assertEquals("rujbzbomvzzbtdc", model.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, model.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("t", model.properties().status().message()); - Assertions.assertEquals(642737212, model.properties().status().statusId()); - Assertions.assertEquals("nawjslbiwkojgcy", model.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("mznbaeqphch", model.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("rn", model.properties().dataProviderMetadata().propertyBag().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsInner model = - new DiagnosticsInner() - .withProperties( - new DiagnosticsProperties() - .withMetadata( - new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("x", "ejnt", "sewgioilqukr"))) - .withDataset( - Arrays - .asList( - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("omtbghhavgrvkff") - .withColumns( - Arrays - .asList( - new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn())) - .withRows(Arrays.asList("datapjbi", "datagjmfxumvfcl"))) - .withRenderingProperties( - new DiagnosticRendering() - .withType(2107633088) - .withTitle("xnbkfezzxscyhwzd") - .withDescription("rujbzbomvzzbtdc") - .withIsVisible(true)), - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("yujviylwdshfssn") - .withColumns(Arrays.asList(new DiagnosticDataTableResponseColumn())) - .withRows(Arrays.asList("datafrymsgaojfmwnc"))) - .withRenderingProperties( - new DiagnosticRendering() - .withType(700953056) - .withTitle("hirctymoxoftpipi") - .withDescription("czuhxacpqjlihh") - .withIsVisible(true)), - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("kasdvlm") - .withColumns( - Arrays - .asList( - new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn())) - .withRows( - Arrays - .asList( - "datax", - "datalucvpam", - "datasreuzvxurisjnh", - "dataytxifqjzgxmrh"))) - .withRenderingProperties( - new DiagnosticRendering() - .withType(403382899) - .withTitle("cesutrgjupauut") - .withDescription("oqh") - .withIsVisible(false)), - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("g") - .withColumns( - Arrays - .asList( - new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn())) - .withRows(Arrays.asList("dataqntcypsxjvfoimwk", "datalirc"))) - .withRenderingProperties( - new DiagnosticRendering() - .withType(1956254866) - .withTitle("ydfce") - .withDescription("vlhv") - .withIsVisible(true)))) - .withStatus(new DiagnosticsStatus().withMessage("t").withStatusId(642737212)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata() - .withProviderName("nawjslbiwkojgcy") - .withPropertyBag( - Arrays - .asList( - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("mznbaeqphch") - .withValue("rn"), - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("x") - .withValue("uwrykqgaifmvikl"), - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("dvk") - .withValue("ejd"))))); - model = BinaryData.fromObject(model).toObject(DiagnosticsInner.class); - Assertions.assertEquals("x", model.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("omtbghhavgrvkff", model.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(2107633088, model.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("xnbkfezzxscyhwzd", model.properties().dataset().get(0).renderingProperties().title()); - Assertions - .assertEquals("rujbzbomvzzbtdc", model.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, model.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("t", model.properties().status().message()); - Assertions.assertEquals(642737212, model.properties().status().statusId()); - Assertions.assertEquals("nawjslbiwkojgcy", model.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("mznbaeqphch", model.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("rn", model.properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java deleted file mode 100644 index 61ca916d10c3c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsProperties model = - BinaryData - .fromString( - "{\"metadata\":{\"id\":\"v\",\"name\":\"zgemjdftuljlt\",\"description\":\"ceamtm\",\"author\":\"u\",\"category\":\"ejwcwwqiok\",\"supportTopicList\":[{\"id\":\"mojmsvpkjprvkw\",\"pesId\":\"zqljyxgtczh\"}],\"analysisTypes\":[\"bsdshmkxmaehvbbx\",\"ripltf\"],\"type\":\"tbaxk\",\"score\":35.67025},\"dataset\":[{\"table\":{\"tableName\":\"pyklyhpluodpvru\",\"columns\":[{\"columnName\":\"zibt\",\"dataType\":\"stgktst\",\"columnType\":\"xeclzedqbcvhzlhp\"}],\"rows\":[\"dataqkdlw\",\"dataqfbumlkxtrqjf\",\"datamlmbtxhwgfwsrta\"]},\"renderingProperties\":{\"type\":337783528,\"title\":\"brhu\",\"description\":\"kh\",\"isVisible\":false}}],\"status\":{\"message\":\"ookk\",\"statusId\":870237510},\"dataProviderMetadata\":{\"providerName\":\"vleo\",\"propertyBag\":[{\"name\":\"uiqtqzfavy\",\"value\":\"qqybarye\"}]}}") - .toObject(DiagnosticsProperties.class); - Assertions.assertEquals("bsdshmkxmaehvbbx", model.metadata().analysisTypes().get(0)); - Assertions.assertEquals("pyklyhpluodpvru", model.dataset().get(0).table().tableName()); - Assertions.assertEquals("zibt", model.dataset().get(0).table().columns().get(0).columnName()); - Assertions.assertEquals("stgktst", model.dataset().get(0).table().columns().get(0).dataType()); - Assertions.assertEquals("xeclzedqbcvhzlhp", model.dataset().get(0).table().columns().get(0).columnType()); - Assertions.assertEquals(337783528, model.dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("brhu", model.dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("kh", model.dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(false, model.dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("ookk", model.status().message()); - Assertions.assertEquals(870237510, model.status().statusId()); - Assertions.assertEquals("vleo", model.dataProviderMetadata().providerName()); - Assertions.assertEquals("uiqtqzfavy", model.dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("qqybarye", model.dataProviderMetadata().propertyBag().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsProperties model = - new DiagnosticsProperties() - .withMetadata( - new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("bsdshmkxmaehvbbx", "ripltf"))) - .withDataset( - Arrays - .asList( - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("pyklyhpluodpvru") - .withColumns( - Arrays - .asList( - new DiagnosticDataTableResponseColumn() - .withColumnName("zibt") - .withDataType("stgktst") - .withColumnType("xeclzedqbcvhzlhp"))) - .withRows( - Arrays.asList("dataqkdlw", "dataqfbumlkxtrqjf", "datamlmbtxhwgfwsrta"))) - .withRenderingProperties( - new DiagnosticRendering() - .withType(337783528) - .withTitle("brhu") - .withDescription("kh") - .withIsVisible(false)))) - .withStatus(new DiagnosticsStatus().withMessage("ookk").withStatusId(870237510)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata() - .withProviderName("vleo") - .withPropertyBag( - Arrays - .asList( - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("uiqtqzfavy") - .withValue("qqybarye")))); - model = BinaryData.fromObject(model).toObject(DiagnosticsProperties.class); - Assertions.assertEquals("bsdshmkxmaehvbbx", model.metadata().analysisTypes().get(0)); - Assertions.assertEquals("pyklyhpluodpvru", model.dataset().get(0).table().tableName()); - Assertions.assertEquals("zibt", model.dataset().get(0).table().columns().get(0).columnName()); - Assertions.assertEquals("stgktst", model.dataset().get(0).table().columns().get(0).dataType()); - Assertions.assertEquals("xeclzedqbcvhzlhp", model.dataset().get(0).table().columns().get(0).columnType()); - Assertions.assertEquals(337783528, model.dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("brhu", model.dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("kh", model.dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(false, model.dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("ookk", model.status().message()); - Assertions.assertEquals(870237510, model.status().statusId()); - Assertions.assertEquals("vleo", model.dataProviderMetadata().providerName()); - Assertions.assertEquals("uiqtqzfavy", model.dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("qqybarye", model.dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsStatusTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsStatusTests.java deleted file mode 100644 index a7b7b21c68dc5..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsStatusTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsStatus model = - BinaryData.fromString("{\"message\":\"isavok\",\"statusId\":1487761087}").toObject(DiagnosticsStatus.class); - Assertions.assertEquals("isavok", model.message()); - Assertions.assertEquals(1487761087, model.statusId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsStatus model = new DiagnosticsStatus().withMessage("isavok").withStatusId(1487761087); - model = BinaryData.fromObject(model).toObject(DiagnosticsStatus.class); - Assertions.assertEquals("isavok", model.message()); - Assertions.assertEquals(1487761087, model.statusId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java deleted file mode 100644 index af1e855911c3c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import org.junit.jupiter.api.Assertions; - -public final class ExtendedLocationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtendedLocation model = - BinaryData.fromString("{\"name\":\"zf\",\"type\":\"CustomLocation\"}").toObject(ExtendedLocation.class); - Assertions.assertEquals("zf", model.name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtendedLocation model = new ExtendedLocation().withName("zf").withType(ExtendedLocationTypes.CUSTOM_LOCATION); - model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); - Assertions.assertEquals("zf", model.name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.java deleted file mode 100644 index 0574ddd04012a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ForwardProxy; -import com.azure.resourcemanager.appcontainers.models.ForwardProxyConvention; -import org.junit.jupiter.api.Assertions; - -public final class ForwardProxyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ForwardProxy model = - BinaryData - .fromString( - "{\"convention\":\"NoProxy\",\"customHostHeaderName\":\"chcbonqvpkvlrxnj\",\"customProtoHeaderName\":\"seiphe\"}") - .toObject(ForwardProxy.class); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.convention()); - Assertions.assertEquals("chcbonqvpkvlrxnj", model.customHostHeaderName()); - Assertions.assertEquals("seiphe", model.customProtoHeaderName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ForwardProxy model = - new ForwardProxy() - .withConvention(ForwardProxyConvention.NO_PROXY) - .withCustomHostHeaderName("chcbonqvpkvlrxnj") - .withCustomProtoHeaderName("seiphe"); - model = BinaryData.fromObject(model).toObject(ForwardProxy.class); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.convention()); - Assertions.assertEquals("chcbonqvpkvlrxnj", model.customHostHeaderName()); - Assertions.assertEquals("seiphe", model.customProtoHeaderName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.java deleted file mode 100644 index 691e954f7a667..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class GlobalValidationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GlobalValidation model = - BinaryData - .fromString( - "{\"unauthenticatedClientAction\":\"Return401\",\"redirectToProvider\":\"yhxhu\",\"excludedPaths\":[\"ftyxolniw\"]}") - .toObject(GlobalValidation.class); - Assertions.assertEquals(UnauthenticatedClientActionV2.RETURN401, model.unauthenticatedClientAction()); - Assertions.assertEquals("yhxhu", model.redirectToProvider()); - Assertions.assertEquals("ftyxolniw", model.excludedPaths().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GlobalValidation model = - new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.RETURN401) - .withRedirectToProvider("yhxhu") - .withExcludedPaths(Arrays.asList("ftyxolniw")); - model = BinaryData.fromObject(model).toObject(GlobalValidation.class); - Assertions.assertEquals(UnauthenticatedClientActionV2.RETURN401, model.unauthenticatedClientAction()); - Assertions.assertEquals("yhxhu", model.redirectToProvider()); - Assertions.assertEquals("ftyxolniw", model.excludedPaths().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java deleted file mode 100644 index 2760f3932dc15..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.HttpSettingsRoutes; -import org.junit.jupiter.api.Assertions; - -public final class HttpSettingsRoutesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpSettingsRoutes model = - BinaryData.fromString("{\"apiPrefix\":\"nzscxa\"}").toObject(HttpSettingsRoutes.class); - Assertions.assertEquals("nzscxa", model.apiPrefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpSettingsRoutes model = new HttpSettingsRoutes().withApiPrefix("nzscxa"); - model = BinaryData.fromObject(model).toObject(HttpSettingsRoutes.class); - Assertions.assertEquals("nzscxa", model.apiPrefix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsTests.java deleted file mode 100644 index 57936f392b446..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ForwardProxy; -import com.azure.resourcemanager.appcontainers.models.ForwardProxyConvention; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.HttpSettingsRoutes; -import org.junit.jupiter.api.Assertions; - -public final class HttpSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpSettings model = - BinaryData - .fromString( - "{\"requireHttps\":false,\"routes\":{\"apiPrefix\":\"onlebxetqgtzxdpn\"},\"forwardProxy\":{\"convention\":\"NoProxy\",\"customHostHeaderName\":\"xrjfeallnwsub\",\"customProtoHeaderName\":\"njampm\"}}") - .toObject(HttpSettings.class); - Assertions.assertEquals(false, model.requireHttps()); - Assertions.assertEquals("onlebxetqgtzxdpn", model.routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.forwardProxy().convention()); - Assertions.assertEquals("xrjfeallnwsub", model.forwardProxy().customHostHeaderName()); - Assertions.assertEquals("njampm", model.forwardProxy().customProtoHeaderName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpSettings model = - new HttpSettings() - .withRequireHttps(false) - .withRoutes(new HttpSettingsRoutes().withApiPrefix("onlebxetqgtzxdpn")) - .withForwardProxy( - new ForwardProxy() - .withConvention(ForwardProxyConvention.NO_PROXY) - .withCustomHostHeaderName("xrjfeallnwsub") - .withCustomProtoHeaderName("njampm")); - model = BinaryData.fromObject(model).toObject(HttpSettings.class); - Assertions.assertEquals(false, model.requireHttps()); - Assertions.assertEquals("onlebxetqgtzxdpn", model.routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.forwardProxy().convention()); - Assertions.assertEquals("xrjfeallnwsub", model.forwardProxy().customHostHeaderName()); - Assertions.assertEquals("njampm", model.forwardProxy().customProtoHeaderName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressStickySessionsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressStickySessionsTests.java deleted file mode 100644 index 7bd342097aa1a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressStickySessionsTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Affinity; -import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; -import org.junit.jupiter.api.Assertions; - -public final class IngressStickySessionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IngressStickySessions model = - BinaryData.fromString("{\"affinity\":\"sticky\"}").toObject(IngressStickySessions.class); - Assertions.assertEquals(Affinity.STICKY, model.affinity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IngressStickySessions model = new IngressStickySessions().withAffinity(Affinity.STICKY); - model = BinaryData.fromObject(model).toObject(IngressStickySessions.class); - Assertions.assertEquals(Affinity.STICKY, model.affinity()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java deleted file mode 100644 index 0763fa532f194..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Action; -import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; -import org.junit.jupiter.api.Assertions; - -public final class IpSecurityRestrictionRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpSecurityRestrictionRule model = - BinaryData - .fromString( - "{\"name\":\"eqx\",\"description\":\"z\",\"ipAddressRange\":\"ahzxctobgbk\",\"action\":\"Allow\"}") - .toObject(IpSecurityRestrictionRule.class); - Assertions.assertEquals("eqx", model.name()); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals("ahzxctobgbk", model.ipAddressRange()); - Assertions.assertEquals(Action.ALLOW, model.action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpSecurityRestrictionRule model = - new IpSecurityRestrictionRule() - .withName("eqx") - .withDescription("z") - .withIpAddressRange("ahzxctobgbk") - .withAction(Action.ALLOW); - model = BinaryData.fromObject(model).toObject(IpSecurityRestrictionRule.class); - Assertions.assertEquals("eqx", model.name()); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals("ahzxctobgbk", model.ipAddressRange()); - Assertions.assertEquals(Action.ALLOW, model.action()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationManualTriggerConfigTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationManualTriggerConfigTests.java deleted file mode 100644 index b01beabffa0f5..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationManualTriggerConfigTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JobConfigurationManualTriggerConfig; -import org.junit.jupiter.api.Assertions; - -public final class JobConfigurationManualTriggerConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobConfigurationManualTriggerConfig model = - BinaryData - .fromString("{\"replicaCompletionCount\":598099932,\"parallelism\":1189347509}") - .toObject(JobConfigurationManualTriggerConfig.class); - Assertions.assertEquals(598099932, model.replicaCompletionCount()); - Assertions.assertEquals(1189347509, model.parallelism()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobConfigurationManualTriggerConfig model = - new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(598099932).withParallelism(1189347509); - model = BinaryData.fromObject(model).toObject(JobConfigurationManualTriggerConfig.class); - Assertions.assertEquals(598099932, model.replicaCompletionCount()); - Assertions.assertEquals(1189347509, model.parallelism()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationScheduleTriggerConfigTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationScheduleTriggerConfigTests.java deleted file mode 100644 index 2f72bfaaa101e..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationScheduleTriggerConfigTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JobConfigurationScheduleTriggerConfig; -import org.junit.jupiter.api.Assertions; - -public final class JobConfigurationScheduleTriggerConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobConfigurationScheduleTriggerConfig model = - BinaryData - .fromString( - "{\"replicaCompletionCount\":540645493,\"cronExpression\":\"liqhzvhx\",\"parallelism\":1549555977}") - .toObject(JobConfigurationScheduleTriggerConfig.class); - Assertions.assertEquals(540645493, model.replicaCompletionCount()); - Assertions.assertEquals("liqhzvhx", model.cronExpression()); - Assertions.assertEquals(1549555977, model.parallelism()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobConfigurationScheduleTriggerConfig model = - new JobConfigurationScheduleTriggerConfig() - .withReplicaCompletionCount(540645493) - .withCronExpression("liqhzvhx") - .withParallelism(1549555977); - model = BinaryData.fromObject(model).toObject(JobConfigurationScheduleTriggerConfig.class); - Assertions.assertEquals(540645493, model.replicaCompletionCount()); - Assertions.assertEquals("liqhzvhx", model.cronExpression()); - Assertions.assertEquals(1549555977, model.parallelism()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionBaseInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionBaseInnerTests.java deleted file mode 100644 index 1d1d65256ecc5..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionBaseInnerTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner; -import org.junit.jupiter.api.Assertions; - -public final class JobExecutionBaseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobExecutionBaseInner model = - BinaryData.fromString("{\"name\":\"pgfewetwlyx\",\"id\":\"cxy\"}").toObject(JobExecutionBaseInner.class); - Assertions.assertEquals("pgfewetwlyx", model.name()); - Assertions.assertEquals("cxy", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobExecutionBaseInner model = new JobExecutionBaseInner().withName("pgfewetwlyx").withId("cxy"); - model = BinaryData.fromObject(model).toObject(JobExecutionBaseInner.class); - Assertions.assertEquals("pgfewetwlyx", model.name()); - Assertions.assertEquals("cxy", model.id()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteMockTests.java deleted file mode 100644 index 59c80438c7ad0..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.jobs().delete("alwcjgckbb", "ccgzpraoxnyu", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListMockTests.java deleted file mode 100644 index 21c67aab759a2..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListMockTests.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.JobExecution; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsExecutionsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"lfg\",\"id\":\"nnnoytz\",\"type\":\"sewxigpxvkqm\",\"status\":\"Running\",\"startTime\":\"2021-07-26T17:50:31Z\",\"endTime\":\"2021-01-19T22:27:27Z\",\"template\":{\"containers\":[{\"image\":\"ify\",\"name\":\"zeyuubeidszl\",\"command\":[\"oithg\"],\"args\":[\"fltgvdiho\",\"nkrxwetwkdrcy\"],\"env\":[{},{},{}],\"resources\":{\"cpu\":90.34799204771788,\"memory\":\"uzdqumoenod\",\"ephemeralStorage\":\"ienhqhskndnelq\"}}],\"initContainers\":[{\"image\":\"lknwfoanniyop\",\"name\":\"xivcnrlyxnu\",\"command\":[\"p\",\"blkwqpatvbqs\",\"tcjb\",\"tvivuzqym\"],\"args\":[\"wogtgitsq\"],\"env\":[{},{}],\"resources\":{\"cpu\":25.130681898907213,\"memory\":\"banf\",\"ephemeralStorage\":\"ds\"}},{\"image\":\"mxeatkdbmwnrdjy\",\"name\":\"q\",\"command\":[\"omhjrmkuhm\",\"xljalfihc\",\"mobcan\",\"de\"],\"args\":[\"cwg\",\"xf\",\"vaknokzwjj\",\"r\"],\"env\":[{},{},{}],\"resources\":{\"cpu\":55.14214526010209,\"memory\":\"yfytpq\",\"ephemeralStorage\":\"x\"}},{\"image\":\"m\",\"name\":\"jivyqlkjuv\",\"command\":[\"msl\",\"oyovwz\",\"bpqvybefg\"],\"args\":[\"nokcv\"],\"env\":[{},{},{},{}],\"resources\":{\"cpu\":75.35469796285636,\"memory\":\"vcuartrhun\",\"ephemeralStorage\":\"iryky\"}}]}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.jobsExecutions().list("sykvwjtqpke", "myltj", "rspxklur", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("lfg", response.iterator().next().name()); - Assertions.assertEquals("nnnoytz", response.iterator().next().id()); - Assertions.assertEquals("sewxigpxvkqm", response.iterator().next().type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T17:50:31Z"), response.iterator().next().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-19T22:27:27Z"), response.iterator().next().endTime()); - Assertions.assertEquals("ify", response.iterator().next().template().containers().get(0).image()); - Assertions.assertEquals("zeyuubeidszl", response.iterator().next().template().containers().get(0).name()); - Assertions.assertEquals("oithg", response.iterator().next().template().containers().get(0).command().get(0)); - Assertions.assertEquals("fltgvdiho", response.iterator().next().template().containers().get(0).args().get(0)); - Assertions - .assertEquals( - 90.34799204771788D, response.iterator().next().template().containers().get(0).resources().cpu()); - Assertions - .assertEquals( - "uzdqumoenod", response.iterator().next().template().containers().get(0).resources().memory()); - Assertions.assertEquals("lknwfoanniyop", response.iterator().next().template().initContainers().get(0).image()); - Assertions.assertEquals("xivcnrlyxnu", response.iterator().next().template().initContainers().get(0).name()); - Assertions.assertEquals("p", response.iterator().next().template().initContainers().get(0).command().get(0)); - Assertions - .assertEquals("wogtgitsq", response.iterator().next().template().initContainers().get(0).args().get(0)); - Assertions - .assertEquals( - 25.130681898907213D, response.iterator().next().template().initContainers().get(0).resources().cpu()); - Assertions - .assertEquals("banf", response.iterator().next().template().initContainers().get(0).resources().memory()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionMockTests.java deleted file mode 100644 index f0a5d576c078d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsStopExecutionMockTests { - @Test - public void testStopExecution() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.jobs().stopExecution("aqylkjztji", "azjcgmxitpfin", "cpdltkrlg", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsMockTests.java deleted file mode 100644 index 6370a6fe15519..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ContainerAppJobExecutions; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsStopMultipleExecutionsMockTests { - @Test - public void testStopMultipleExecutions() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"elyuj\",\"id\":\"youmpc\",\"type\":\"eclcdigptajbrzm\",\"status\":\"Processing\",\"startTime\":\"2021-01-20T00:05:16Z\",\"endTime\":\"2021-10-11T16:23:08Z\",\"template\":{\"containers\":[{},{}],\"initContainers\":[{},{},{}]}},{\"name\":\"utgjcyz\",\"id\":\"jdnrqjbt\",\"type\":\"eaoqaqbzgyhf\",\"status\":\"Failed\",\"startTime\":\"2021-09-21T19:14:48Z\",\"endTime\":\"2021-03-20T20:58:19Z\",\"template\":{\"containers\":[{},{},{}],\"initContainers\":[{},{},{}]}},{\"name\":\"e\",\"id\":\"iyslpkcvmwfaux\",\"type\":\"pmywbormcq\",\"status\":\"Succeeded\",\"startTime\":\"2021-02-28T18:13:56Z\",\"endTime\":\"2021-09-01T08:07:43Z\",\"template\":{\"containers\":[{},{}],\"initContainers\":[{},{},{}]}},{\"name\":\"jxjmcsmyqw\",\"id\":\"vcpwnkwy\",\"type\":\"wofali\",\"status\":\"Failed\",\"startTime\":\"2021-10-16T22:49:42Z\",\"endTime\":\"2021-04-13T10:57:52Z\",\"template\":{\"containers\":[{}],\"initContainers\":[{}]}}],\"nextLink\":\"sknxrwzawnvsbcf\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ContainerAppJobExecutions response = - manager.jobs().stopMultipleExecutions("mtbdrvcqgu", "fzhompheq", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("elyuj", response.value().get(0).name()); - Assertions.assertEquals("youmpc", response.value().get(0).id()); - Assertions.assertEquals("eclcdigptajbrzm", response.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T00:05:16Z"), response.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-11T16:23:08Z"), response.value().get(0).endTime()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java deleted file mode 100644 index 38ac66bf51f7d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JwtClaimChecks; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JwtClaimChecksTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JwtClaimChecks model = - BinaryData - .fromString( - "{\"allowedGroups\":[\"htymw\"],\"allowedClientApplications\":[\"kfthwxmntei\",\"aop\",\"km\"]}") - .toObject(JwtClaimChecks.class); - Assertions.assertEquals("htymw", model.allowedGroups().get(0)); - Assertions.assertEquals("kfthwxmntei", model.allowedClientApplications().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JwtClaimChecks model = - new JwtClaimChecks() - .withAllowedGroups(Arrays.asList("htymw")) - .withAllowedClientApplications(Arrays.asList("kfthwxmntei", "aop", "km")); - model = BinaryData.fromObject(model).toObject(JwtClaimChecks.class); - Assertions.assertEquals("htymw", model.allowedGroups().get(0)); - Assertions.assertEquals("kfthwxmntei", model.allowedClientApplications().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/KedaConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/KedaConfigurationTests.java deleted file mode 100644 index 08831dd55f681..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/KedaConfigurationTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.KedaConfiguration; - -public final class KedaConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KedaConfiguration model = - BinaryData.fromString("{\"version\":\"chpqbmfpjba\"}").toObject(KedaConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KedaConfiguration model = new KedaConfiguration(); - model = BinaryData.fromObject(model).toObject(KedaConfiguration.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.java deleted file mode 100644 index 218ab502f5476..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.LoginRoutes; -import org.junit.jupiter.api.Assertions; - -public final class LoginRoutesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LoginRoutes model = BinaryData.fromString("{\"logoutEndpoint\":\"sxlzevgbmqj\"}").toObject(LoginRoutes.class); - Assertions.assertEquals("sxlzevgbmqj", model.logoutEndpoint()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoginRoutes model = new LoginRoutes().withLogoutEndpoint("sxlzevgbmqj"); - model = BinaryData.fromObject(model).toObject(LoginRoutes.class); - Assertions.assertEquals("sxlzevgbmqj", model.logoutEndpoint()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginScopesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginScopesTests.java deleted file mode 100644 index ec4e43ea7c7a1..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginScopesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.LoginScopes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LoginScopesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LoginScopes model = - BinaryData.fromString("{\"scopes\":[\"bqidtqaj\",\"yulpkudjkr\"]}").toObject(LoginScopes.class); - Assertions.assertEquals("bqidtqaj", model.scopes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoginScopes model = new LoginScopes().withScopes(Arrays.asList("bqidtqaj", "yulpkudjkr")); - model = BinaryData.fromObject(model).toObject(LoginScopes.class); - Assertions.assertEquals("bqidtqaj", model.scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginTests.java deleted file mode 100644 index b7c04a276f9d0..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CookieExpiration; -import com.azure.resourcemanager.appcontainers.models.CookieExpirationConvention; -import com.azure.resourcemanager.appcontainers.models.Login; -import com.azure.resourcemanager.appcontainers.models.LoginRoutes; -import com.azure.resourcemanager.appcontainers.models.Nonce; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LoginTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Login model = - BinaryData - .fromString( - "{\"routes\":{\"logoutEndpoint\":\"oqfbowskanyk\"},\"preserveUrlFragmentsForLogins\":true,\"allowedExternalRedirectUrls\":[\"iywgqywgndrvynh\"],\"cookieExpiration\":{\"convention\":\"IdentityProviderDerived\",\"timeToExpiration\":\"rcgyn\"},\"nonce\":{\"validateNonce\":false,\"nonceExpirationInterval\":\"cfvmmco\"}}") - .toObject(Login.class); - Assertions.assertEquals("oqfbowskanyk", model.routes().logoutEndpoint()); - Assertions.assertEquals(true, model.preserveUrlFragmentsForLogins()); - Assertions.assertEquals("iywgqywgndrvynh", model.allowedExternalRedirectUrls().get(0)); - Assertions - .assertEquals(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, model.cookieExpiration().convention()); - Assertions.assertEquals("rcgyn", model.cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.nonce().validateNonce()); - Assertions.assertEquals("cfvmmco", model.nonce().nonceExpirationInterval()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Login model = - new Login() - .withRoutes(new LoginRoutes().withLogoutEndpoint("oqfbowskanyk")) - .withPreserveUrlFragmentsForLogins(true) - .withAllowedExternalRedirectUrls(Arrays.asList("iywgqywgndrvynh")) - .withCookieExpiration( - new CookieExpiration() - .withConvention(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED) - .withTimeToExpiration("rcgyn")) - .withNonce(new Nonce().withValidateNonce(false).withNonceExpirationInterval("cfvmmco")); - model = BinaryData.fromObject(model).toObject(Login.class); - Assertions.assertEquals("oqfbowskanyk", model.routes().logoutEndpoint()); - Assertions.assertEquals(true, model.preserveUrlFragmentsForLogins()); - Assertions.assertEquals("iywgqywgndrvynh", model.allowedExternalRedirectUrls().get(0)); - Assertions - .assertEquals(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, model.cookieExpiration().convention()); - Assertions.assertEquals("rcgyn", model.cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.nonce().validateNonce()); - Assertions.assertEquals("cfvmmco", model.nonce().nonceExpirationInterval()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatePatchTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatePatchTests.java deleted file mode 100644 index 00a143b450727..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatePatchTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ManagedCertificatePatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedCertificatePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedCertificatePatch model = - BinaryData.fromString("{\"tags\":{\"wegprh\":\"kssjhoiftxfk\"}}").toObject(ManagedCertificatePatch.class); - Assertions.assertEquals("kssjhoiftxfk", model.tags().get("wegprh")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedCertificatePatch model = new ManagedCertificatePatch().withTags(mapOf("wegprh", "kssjhoiftxfk")); - model = BinaryData.fromObject(model).toObject(ManagedCertificatePatch.class); - Assertions.assertEquals("kssjhoiftxfk", model.tags().get("wegprh")); - } - - // 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/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteWithResponseMockTests.java deleted file mode 100644 index 3d049202a7744..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedCertificatesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .managedCertificates() - .deleteWithResponse("gno", "ikkgqo", "jwpindedvabbxbh", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests.java deleted file mode 100644 index 134f43887399d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests { - @Test - public void testGetDetectorWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"metadata\":{\"id\":\"hzzysevusxiv\",\"name\":\"rryveimipskdy\",\"description\":\"tv\",\"author\":\"zkaftjvvrux\",\"category\":\"gsyeipqdsmjtg\",\"supportTopicList\":[{\"id\":\"gkkileplkcsmkn\",\"pesId\":\"tbbaedorvvmqf\"},{\"id\":\"ygbdgwumgxdgdhpa\",\"pesId\":\"dexjddvjs\"}],\"analysisTypes\":[\"otmmw\",\"lcol\",\"rsxaptefh\",\"xcgjokjljnhvlq\"],\"type\":\"ek\",\"score\":83.19882},\"dataset\":[{\"table\":{\"tableName\":\"ksdqhjvy\",\"columns\":[{},{},{},{}],\"rows\":[\"datalkhhu\"]},\"renderingProperties\":{\"type\":550059489,\"title\":\"qmavnw\",\"description\":\"wgoknlejjjkx\",\"isVisible\":false}},{\"table\":{\"tableName\":\"bkjbz\",\"columns\":[{}],\"rows\":[\"datakzykjtjk\",\"datasxfwushcdp\",\"dataupnqrmgjfb\",\"datakuwxeoiojfizfavk\"]},\"renderingProperties\":{\"type\":143517524,\"title\":\"cyayk\",\"description\":\"fz\",\"isVisible\":true}},{\"table\":{\"tableName\":\"rzx\",\"columns\":[{},{},{},{}],\"rows\":[\"datarsxkr\"]},\"renderingProperties\":{\"type\":1331396954,\"title\":\"zej\",\"description\":\"viyoypsuhbrnnhjx\",\"isVisible\":false}}],\"status\":{\"message\":\"qkbiwet\",\"statusId\":321648657},\"dataProviderMetadata\":{\"providerName\":\"yqiq\",\"propertyBag\":[{\"name\":\"se\",\"value\":\"lexbsf\"},{\"name\":\"dynojpziuwfb\",\"value\":\"kdtnhqsyclj\"},{\"name\":\"lpkpbafvafhl\",\"value\":\"lc\"},{\"name\":\"evxrhyz\",\"value\":\"wrso\"}]}},\"id\":\"pl\",\"name\":\"dbmairrhvhfnr\",\"type\":\"cwnpqigtuujwouhd\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Diagnostics response = - manager - .managedEnvironmentDiagnostics() - .getDetectorWithResponse("ctekval", "l", "tjqvqyvweht", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("otmmw", response.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("ksdqhjvy", response.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(550059489, response.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("qmavnw", response.properties().dataset().get(0).renderingProperties().title()); - Assertions - .assertEquals("wgoknlejjjkx", response.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(false, response.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("qkbiwet", response.properties().status().message()); - Assertions.assertEquals(321648657, response.properties().status().statusId()); - Assertions.assertEquals("yqiq", response.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("se", response.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("lexbsf", response.properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests.java deleted file mode 100644 index 1616e0fc5eed9..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsCollection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests { - @Test - public void testListDetectorsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"metadata\":{\"id\":\"zusjsz\",\"name\":\"scmnlziji\",\"description\":\"ehgmvflnwyv\",\"author\":\"xrerlniylylyf\",\"category\":\"zutgqztwhghmupg\",\"supportTopicList\":[{},{},{},{}],\"analysisTypes\":[\"dxabbujfta\"],\"type\":\"nbbklqpxzucafed\",\"score\":51.97972},\"dataset\":[{},{}],\"status\":{\"message\":\"fwxudgnhg\",\"statusId\":1717815556},\"dataProviderMetadata\":{\"providerName\":\"alvnbwgpb\",\"propertyBag\":[{},{},{}]}},\"id\":\"luclvdjjuk\",\"name\":\"rdnqodxahhxhqf\",\"type\":\"qnvzoqgyipemch\"},{\"properties\":{\"metadata\":{\"id\":\"czuejdtxptl\",\"name\":\"wzhomewjjstl\",\"description\":\"hqawmo\",\"author\":\"ancz\",\"category\":\"odrrslblxyd\",\"supportTopicList\":[{},{}],\"analysisTypes\":[\"vbxiwkgfbqlj\",\"qkhychocok\",\"lehu\",\"qlrqffaweyurk\"],\"type\":\"y\",\"score\":15.436524},\"dataset\":[{}],\"status\":{\"message\":\"uqd\",\"statusId\":1079970798},\"dataProviderMetadata\":{\"providerName\":\"gchbapxkiy\",\"propertyBag\":[{}]}},\"id\":\"kbajbu\",\"name\":\"cgduusio\",\"type\":\"cblevpmc\"},{\"properties\":{\"metadata\":{\"id\":\"xkyxlzgs\",\"name\":\"kzzltafhbzf\",\"description\":\"vwmbjlzqsczpg\",\"author\":\"wnapfdq\",\"category\":\"wf\",\"supportTopicList\":[{},{},{}],\"analysisTypes\":[\"wjtkschgcgqyhl\",\"seyqrhvyeldotjv\"],\"type\":\"wiswskukjtasbvw\",\"score\":54.18455},\"dataset\":[{},{},{},{}],\"status\":{\"message\":\"txfkndlqvt\",\"statusId\":926574477},\"dataProviderMetadata\":{\"providerName\":\"mmbugtywatmqaq\",\"propertyBag\":[{},{},{}]}},\"id\":\"atgr\",\"name\":\"eshoygzcb\",\"type\":\"fqxkfaoyteh\"},{\"properties\":{\"metadata\":{\"id\":\"jmvqmtd\",\"name\":\"kygroejnndljdj\",\"description\":\"kb\",\"author\":\"eqy\",\"category\":\"ceysfaqeg\",\"supportTopicList\":[{},{}],\"analysisTypes\":[\"shwddkvbxgk\"],\"type\":\"sybwptdaca\",\"score\":12.566},\"dataset\":[{}],\"status\":{\"message\":\"ymtpo\",\"statusId\":1736120485},\"dataProviderMetadata\":{\"providerName\":\"zerohzrsqalsxk\",\"propertyBag\":[{},{},{}]}},\"id\":\"qapfgsdpc\",\"name\":\"essmzhhku\",\"type\":\"ip\"}],\"nextLink\":\"q\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DiagnosticsCollection response = - manager - .managedEnvironmentDiagnostics() - .listDetectorsWithResponse("w", "vcacoyv", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("dxabbujfta", response.value().get(0).properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("fwxudgnhg", response.value().get(0).properties().status().message()); - Assertions.assertEquals(1717815556, response.value().get(0).properties().status().statusId()); - Assertions - .assertEquals("alvnbwgpb", response.value().get(0).properties().dataProviderMetadata().providerName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerAuthenticationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerAuthenticationTests.java deleted file mode 100644 index 78bbd4d0b2955..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerAuthenticationTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; -import com.azure.resourcemanager.appcontainers.models.Mtls; -import org.junit.jupiter.api.Assertions; - -public final class ManagedEnvironmentPropertiesPeerAuthenticationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedEnvironmentPropertiesPeerAuthentication model = - BinaryData - .fromString("{\"mtls\":{\"enabled\":true}}") - .toObject(ManagedEnvironmentPropertiesPeerAuthentication.class); - Assertions.assertEquals(true, model.mtls().enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedEnvironmentPropertiesPeerAuthentication model = - new ManagedEnvironmentPropertiesPeerAuthentication().withMtls(new Mtls().withEnabled(true)); - model = BinaryData.fromObject(model).toObject(ManagedEnvironmentPropertiesPeerAuthentication.class); - Assertions.assertEquals(true, model.mtls().enabled()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java deleted file mode 100644 index 66b60c1ee3a64..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.managedEnvironments().delete("bhtmeplvuk", "obrl", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java deleted file mode 100644 index 102f93f99355f..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStates; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentsListWorkloadProfileStatesMockTests { - @Test - public void testListWorkloadProfileStates() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"minimumCount\":1521065056,\"maximumCount\":1869442572,\"currentCount\":1373287799},\"id\":\"ycnlbvgjcodk\",\"name\":\"gjiiytssiki\",\"type\":\"bcufqbvntn\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .managedEnvironments() - .listWorkloadProfileStates("cgqtag", "rclsso", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(1521065056, response.iterator().next().properties().minimumCount()); - Assertions.assertEquals(1869442572, response.iterator().next().properties().maximumCount()); - Assertions.assertEquals(1373287799, response.iterator().next().properties().currentCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteWithResponseMockTests.java deleted file mode 100644 index ee1f14bc21c8a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentsStoragesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .managedEnvironmentsStorages() - .deleteWithResponse("ykcrraue", "kcsueho", "ddacbcbgydlqidy", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java deleted file mode 100644 index 404c2c533ee79..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedServiceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedServiceIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"d073bf54-c2cd-4b62-9f3b-090a75b5196b\",\"tenantId\":\"635985ec-52b2-47ea-99d6-f20863ffe688\",\"type\":\"None\",\"userAssignedIdentities\":{\"meue\":{\"principalId\":\"4f4bbb93-ec01-481a-aec4-7b4a443e6ae6\",\"clientId\":\"d092a881-698b-4ef0-9294-c894ef9f35bf\"},\"yhz\":{\"principalId\":\"5657ddc3-3e07-41e8-aaab-9381cc5eced8\",\"clientId\":\"a7b371f6-e488-41c8-848c-3924ddba6d58\"}}}") - .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedServiceIdentity model = - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf("meue", new UserAssignedIdentity(), "yhz", new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MtlsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MtlsTests.java deleted file mode 100644 index f78edccfaf21d..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MtlsTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Mtls; -import org.junit.jupiter.api.Assertions; - -public final class MtlsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Mtls model = BinaryData.fromString("{\"enabled\":true}").toObject(Mtls.class); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Mtls model = new Mtls().withEnabled(true); - model = BinaryData.fromObject(model).toObject(Mtls.class); - Assertions.assertEquals(true, model.enabled()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilityWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index b0eb6026c75ce..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NamespacesCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"nameAvailable\":false,\"reason\":\"Invalid\",\"message\":\"avn\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameAvailabilityResponse response = - manager - .namespaces() - .checkNameAvailabilityWithResponse( - "ashxgonoyjfqi", - "ubyzn", - new CheckNameAvailabilityRequest().withName("k").withType("eebgvopemtuoqu"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, response.reason()); - Assertions.assertEquals("avn", response.message()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java deleted file mode 100644 index e3aed94e1a5b7..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Nonce; -import org.junit.jupiter.api.Assertions; - -public final class NonceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Nonce model = - BinaryData - .fromString("{\"validateNonce\":true,\"nonceExpirationInterval\":\"kwlzuvccfwnfn\"}") - .toObject(Nonce.class); - Assertions.assertEquals(true, model.validateNonce()); - Assertions.assertEquals("kwlzuvccfwnfn", model.nonceExpirationInterval()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Nonce model = new Nonce().withValidateNonce(true).withNonceExpirationInterval("kwlzuvccfwnfn"); - model = BinaryData.fromObject(model).toObject(Nonce.class); - Assertions.assertEquals(true, model.validateNonce()); - Assertions.assertEquals("kwlzuvccfwnfn", model.nonceExpirationInterval()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.java deleted file mode 100644 index 8f4dce32f8565..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.OpenIdConnectLogin; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OpenIdConnectLoginTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OpenIdConnectLogin model = - BinaryData - .fromString( - "{\"nameClaimType\":\"otkftutqxlngx\",\"scopes\":[\"gug\",\"xkrxdqmi\",\"tthzrvqd\",\"abhjybi\"]}") - .toObject(OpenIdConnectLogin.class); - Assertions.assertEquals("otkftutqxlngx", model.nameClaimType()); - Assertions.assertEquals("gug", model.scopes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OpenIdConnectLogin model = - new OpenIdConnectLogin() - .withNameClaimType("otkftutqxlngx") - .withScopes(Arrays.asList("gug", "xkrxdqmi", "tthzrvqd", "abhjybi")); - model = BinaryData.fromObject(model).toObject(OpenIdConnectLogin.class); - Assertions.assertEquals("otkftutqxlngx", model.nameClaimType()); - Assertions.assertEquals("gug", model.scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDetailInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDetailInnerTests.java deleted file mode 100644 index b64c3024cb9c0..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDetailInnerTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDetailInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDetailInner model = - BinaryData - .fromString( - "{\"name\":\"vfcibyfmowux\",\"isDataAction\":false,\"display\":{\"provider\":\"dwxf\",\"resource\":\"iivwzjbhyzsxjrka\",\"operation\":\"trnegvmnvuqeqvld\",\"description\":\"astjbkkdmflvestm\"},\"origin\":\"xrrilozapee\"}") - .toObject(OperationDetailInner.class); - Assertions.assertEquals("vfcibyfmowux", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("dwxf", model.display().provider()); - Assertions.assertEquals("iivwzjbhyzsxjrka", model.display().resource()); - Assertions.assertEquals("trnegvmnvuqeqvld", model.display().operation()); - Assertions.assertEquals("astjbkkdmflvestm", model.display().description()); - Assertions.assertEquals("xrrilozapee", model.origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDetailInner model = - new OperationDetailInner() - .withName("vfcibyfmowux") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("dwxf") - .withResource("iivwzjbhyzsxjrka") - .withOperation("trnegvmnvuqeqvld") - .withDescription("astjbkkdmflvestm")) - .withOrigin("xrrilozapee"); - model = BinaryData.fromObject(model).toObject(OperationDetailInner.class); - Assertions.assertEquals("vfcibyfmowux", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("dwxf", model.display().provider()); - Assertions.assertEquals("iivwzjbhyzsxjrka", model.display().resource()); - Assertions.assertEquals("trnegvmnvuqeqvld", model.display().operation()); - Assertions.assertEquals("astjbkkdmflvestm", model.display().description()); - Assertions.assertEquals("xrrilozapee", model.origin()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDisplayTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDisplayTests.java deleted file mode 100644 index 8668298979b36..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDisplayTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"hpxlktwkuziycs\",\"resource\":\"vu\",\"operation\":\"ztcktyh\",\"description\":\"qedcgzulwm\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("hpxlktwkuziycs", model.provider()); - Assertions.assertEquals("vu", model.resource()); - Assertions.assertEquals("ztcktyh", model.operation()); - Assertions.assertEquals("qedcgzulwm", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = - new OperationDisplay() - .withProvider("hpxlktwkuziycs") - .withResource("vu") - .withOperation("ztcktyh") - .withDescription("qedcgzulwm"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("hpxlktwkuziycs", model.provider()); - Assertions.assertEquals("vu", model.resource()); - Assertions.assertEquals("ztcktyh", model.operation()); - Assertions.assertEquals("qedcgzulwm", model.description()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationsListMockTests.java deleted file mode 100644 index f8e0b6e17f7b6..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationsListMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.OperationDetail; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"oakizvoai\",\"isDataAction\":false,\"display\":{\"provider\":\"nuwiguyxlykwph\",\"resource\":\"zc\",\"operation\":\"hmpejtlkexaonw\",\"description\":\"kcq\"},\"origin\":\"xhxknlc\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("oakizvoai", response.iterator().next().name()); - Assertions.assertEquals(false, response.iterator().next().isDataAction()); - Assertions.assertEquals("nuwiguyxlykwph", response.iterator().next().display().provider()); - Assertions.assertEquals("zc", response.iterator().next().display().resource()); - Assertions.assertEquals("hmpejtlkexaonw", response.iterator().next().display().operation()); - Assertions.assertEquals("kcq", response.iterator().next().display().description()); - Assertions.assertEquals("xhxknlc", response.iterator().next().origin()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.java deleted file mode 100644 index b0a1b8b5d9c86..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-07-29T01:36:25Z\",\"runningState\":\"Unknown\",\"runningStateDetails\":\"indfpwpjyl\",\"containers\":[{\"name\":\"h\",\"containerId\":\"sj\",\"ready\":false,\"started\":true,\"restartCount\":554003670,\"runningState\":\"Waiting\",\"runningStateDetails\":\"gofel\",\"logStreamEndpoint\":\"grqmqhldvrii\",\"execEndpoint\":\"jnalghf\"},{\"name\":\"tvsexsowuel\",\"containerId\":\"hhahhxvrhmzkwpjg\",\"ready\":true,\"started\":false,\"restartCount\":1806327837,\"runningState\":\"Running\",\"runningStateDetails\":\"sxhqxujx\",\"logStreamEndpoint\":\"ndxdigrjguufzdm\",\"execEndpoint\":\"qtfihwhbotzinga\"},{\"name\":\"pph\",\"containerId\":\"zqzudph\",\"ready\":false,\"started\":false,\"restartCount\":1182689505,\"runningState\":\"Running\",\"runningStateDetails\":\"wcvtbvkayhmtnvyq\",\"logStreamEndpoint\":\"tkzwpcnpwzc\",\"execEndpoint\":\"esgvvsccyaj\"},{\"name\":\"qfhwyg\",\"containerId\":\"vdnkfxusem\",\"ready\":true,\"started\":true,\"restartCount\":704204401,\"runningState\":\"Running\",\"runningStateDetails\":\"cqdpsqxqvpsvuoym\",\"logStreamEndpoint\":\"celve\",\"execEndpoint\":\"ypql\"}],\"initContainers\":[{\"name\":\"kerqwkyh\",\"containerId\":\"bopgxedkowepbqp\",\"ready\":false,\"started\":true,\"restartCount\":1217910065,\"runningState\":\"Waiting\",\"runningStateDetails\":\"jvcdwxlpqekf\",\"logStreamEndpoint\":\"khtj\",\"execEndpoint\":\"i\"},{\"name\":\"wfqatmtd\",\"containerId\":\"mdvy\",\"ready\":true,\"started\":true,\"restartCount\":624157964,\"runningState\":\"Running\",\"runningStateDetails\":\"kbir\",\"logStreamEndpoint\":\"uzhlhkjoqrv\",\"execEndpoint\":\"aatjinrvgoupmfi\"},{\"name\":\"fggjioolvr\",\"containerId\":\"kvtkkg\",\"ready\":false,\"started\":true,\"restartCount\":423959041,\"runningState\":\"Waiting\",\"runningStateDetails\":\"yvblmhvkzu\",\"logStreamEndpoint\":\"xvvy\",\"execEndpoint\":\"s\"},{\"name\":\"byrqufeg\",\"containerId\":\"vwz\",\"ready\":true,\"started\":false,\"restartCount\":882366629,\"runningState\":\"Running\",\"runningStateDetails\":\"dn\",\"logStreamEndpoint\":\"tvgbmhrixkwmy\",\"execEndpoint\":\"ejvegrhbpnaixex\"}]},\"id\":\"cbdreaxhcexd\",\"name\":\"rvqahqkghtpwi\",\"type\":\"nhyjsv\"},{\"properties\":{\"createdTime\":\"2021-01-05T11:11:10Z\",\"runningState\":\"NotRunning\",\"runningStateDetails\":\"voowvr\",\"containers\":[{\"name\":\"jqppyostronzmy\",\"containerId\":\"fipns\",\"ready\":true,\"started\":true,\"restartCount\":1488259864,\"runningState\":\"Waiting\",\"runningStateDetails\":\"jreafxtsgum\",\"logStreamEndpoint\":\"glikkxwslolb\",\"execEndpoint\":\"vuzlm\"}],\"initContainers\":[{\"name\":\"fktgplc\",\"containerId\":\"wjxeznoigbr\",\"ready\":false,\"started\":false,\"restartCount\":490713776,\"runningState\":\"Running\",\"runningStateDetails\":\"azej\",\"logStreamEndpoint\":\"qkagfhsxt\",\"execEndpoint\":\"ugzxnf\"}]},\"id\":\"azpxdtnkdmkqjjl\",\"name\":\"uenvrkp\",\"type\":\"ou\"}]}") - .toObject(ReplicaCollectionInner.class); - Assertions.assertEquals("h", model.value().get(0).containers().get(0).name()); - Assertions.assertEquals("sj", model.value().get(0).containers().get(0).containerId()); - Assertions.assertEquals(false, model.value().get(0).containers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).containers().get(0).started()); - Assertions.assertEquals(554003670, model.value().get(0).containers().get(0).restartCount()); - Assertions.assertEquals("kerqwkyh", model.value().get(0).initContainers().get(0).name()); - Assertions.assertEquals("bopgxedkowepbqp", model.value().get(0).initContainers().get(0).containerId()); - Assertions.assertEquals(false, model.value().get(0).initContainers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).initContainers().get(0).started()); - Assertions.assertEquals(1217910065, model.value().get(0).initContainers().get(0).restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaCollectionInner model = - new ReplicaCollectionInner() - .withValue( - Arrays - .asList( - new ReplicaInner() - .withContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("h") - .withContainerId("sj") - .withReady(false) - .withStarted(true) - .withRestartCount(554003670), - new ReplicaContainer() - .withName("tvsexsowuel") - .withContainerId("hhahhxvrhmzkwpjg") - .withReady(true) - .withStarted(false) - .withRestartCount(1806327837), - new ReplicaContainer() - .withName("pph") - .withContainerId("zqzudph") - .withReady(false) - .withStarted(false) - .withRestartCount(1182689505), - new ReplicaContainer() - .withName("qfhwyg") - .withContainerId("vdnkfxusem") - .withReady(true) - .withStarted(true) - .withRestartCount(704204401))) - .withInitContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("kerqwkyh") - .withContainerId("bopgxedkowepbqp") - .withReady(false) - .withStarted(true) - .withRestartCount(1217910065), - new ReplicaContainer() - .withName("wfqatmtd") - .withContainerId("mdvy") - .withReady(true) - .withStarted(true) - .withRestartCount(624157964), - new ReplicaContainer() - .withName("fggjioolvr") - .withContainerId("kvtkkg") - .withReady(false) - .withStarted(true) - .withRestartCount(423959041), - new ReplicaContainer() - .withName("byrqufeg") - .withContainerId("vwz") - .withReady(true) - .withStarted(false) - .withRestartCount(882366629))), - new ReplicaInner() - .withContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("jqppyostronzmy") - .withContainerId("fipns") - .withReady(true) - .withStarted(true) - .withRestartCount(1488259864))) - .withInitContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("fktgplc") - .withContainerId("wjxeznoigbr") - .withReady(false) - .withStarted(false) - .withRestartCount(490713776))))); - model = BinaryData.fromObject(model).toObject(ReplicaCollectionInner.class); - Assertions.assertEquals("h", model.value().get(0).containers().get(0).name()); - Assertions.assertEquals("sj", model.value().get(0).containers().get(0).containerId()); - Assertions.assertEquals(false, model.value().get(0).containers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).containers().get(0).started()); - Assertions.assertEquals(554003670, model.value().get(0).containers().get(0).restartCount()); - Assertions.assertEquals("kerqwkyh", model.value().get(0).initContainers().get(0).name()); - Assertions.assertEquals("bopgxedkowepbqp", model.value().get(0).initContainers().get(0).containerId()); - Assertions.assertEquals(false, model.value().get(0).initContainers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).initContainers().get(0).started()); - Assertions.assertEquals(1217910065, model.value().get(0).initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java deleted file mode 100644 index ac54ebd0cd276..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaContainerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaContainer model = - BinaryData - .fromString( - "{\"name\":\"cgpik\",\"containerId\":\"imejzanl\",\"ready\":false,\"started\":false,\"restartCount\":1297052787,\"runningState\":\"Terminated\",\"runningStateDetails\":\"onok\",\"logStreamEndpoint\":\"rjqc\",\"execEndpoint\":\"gzpfrla\"}") - .toObject(ReplicaContainer.class); - Assertions.assertEquals("cgpik", model.name()); - Assertions.assertEquals("imejzanl", model.containerId()); - Assertions.assertEquals(false, model.ready()); - Assertions.assertEquals(false, model.started()); - Assertions.assertEquals(1297052787, model.restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaContainer model = - new ReplicaContainer() - .withName("cgpik") - .withContainerId("imejzanl") - .withReady(false) - .withStarted(false) - .withRestartCount(1297052787); - model = BinaryData.fromObject(model).toObject(ReplicaContainer.class); - Assertions.assertEquals("cgpik", model.name()); - Assertions.assertEquals("imejzanl", model.containerId()); - Assertions.assertEquals(false, model.ready()); - Assertions.assertEquals(false, model.started()); - Assertions.assertEquals(1297052787, model.restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaInnerTests.java deleted file mode 100644 index eec5323681c29..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaInnerTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaInner model = - BinaryData - .fromString( - "{\"properties\":{\"createdTime\":\"2021-07-06T19:00:01Z\",\"runningState\":\"Running\",\"runningStateDetails\":\"ux\",\"containers\":[{\"name\":\"ldsyuuximerqfob\",\"containerId\":\"znkbykutwpfhpagm\",\"ready\":true,\"started\":true,\"restartCount\":803916344,\"runningState\":\"Running\",\"runningStateDetails\":\"doakgtdlmkkzevdl\",\"logStreamEndpoint\":\"wpusdsttwvogv\",\"execEndpoint\":\"ejdcngqqmoakuf\"}],\"initContainers\":[{\"name\":\"rwr\",\"containerId\":\"rtwaenuuzko\",\"ready\":false,\"started\":false,\"restartCount\":2010767026,\"runningState\":\"Waiting\",\"runningStateDetails\":\"yuhhziu\",\"logStreamEndpoint\":\"fozbhdmsmlmzqhof\",\"execEndpoint\":\"maequiahxicslfa\"},{\"name\":\"z\",\"containerId\":\"yylhalnswhccsp\",\"ready\":true,\"started\":true,\"restartCount\":2011273129,\"runningState\":\"Terminated\",\"runningStateDetails\":\"cywuggwol\",\"logStreamEndpoint\":\"czbwemhairsbr\",\"execEndpoint\":\"dwmsweypqwd\"},{\"name\":\"gicccnxqhuex\",\"containerId\":\"ttlstvlzywemhz\",\"ready\":true,\"started\":true,\"restartCount\":1411475506,\"runningState\":\"Terminated\",\"runningStateDetails\":\"iypbsfgytgusl\",\"logStreamEndpoint\":\"adcy\",\"execEndpoint\":\"ukyhejhzis\"}]},\"id\":\"gfpelolppvksrpqv\",\"name\":\"jzraehtwdwrf\",\"type\":\"swibyr\"}") - .toObject(ReplicaInner.class); - Assertions.assertEquals("ldsyuuximerqfob", model.containers().get(0).name()); - Assertions.assertEquals("znkbykutwpfhpagm", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(803916344, model.containers().get(0).restartCount()); - Assertions.assertEquals("rwr", model.initContainers().get(0).name()); - Assertions.assertEquals("rtwaenuuzko", model.initContainers().get(0).containerId()); - Assertions.assertEquals(false, model.initContainers().get(0).ready()); - Assertions.assertEquals(false, model.initContainers().get(0).started()); - Assertions.assertEquals(2010767026, model.initContainers().get(0).restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaInner model = - new ReplicaInner() - .withContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("ldsyuuximerqfob") - .withContainerId("znkbykutwpfhpagm") - .withReady(true) - .withStarted(true) - .withRestartCount(803916344))) - .withInitContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("rwr") - .withContainerId("rtwaenuuzko") - .withReady(false) - .withStarted(false) - .withRestartCount(2010767026), - new ReplicaContainer() - .withName("z") - .withContainerId("yylhalnswhccsp") - .withReady(true) - .withStarted(true) - .withRestartCount(2011273129), - new ReplicaContainer() - .withName("gicccnxqhuex") - .withContainerId("ttlstvlzywemhz") - .withReady(true) - .withStarted(true) - .withRestartCount(1411475506))); - model = BinaryData.fromObject(model).toObject(ReplicaInner.class); - Assertions.assertEquals("ldsyuuximerqfob", model.containers().get(0).name()); - Assertions.assertEquals("znkbykutwpfhpagm", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(803916344, model.containers().get(0).restartCount()); - Assertions.assertEquals("rwr", model.initContainers().get(0).name()); - Assertions.assertEquals("rtwaenuuzko", model.initContainers().get(0).containerId()); - Assertions.assertEquals(false, model.initContainers().get(0).ready()); - Assertions.assertEquals(false, model.initContainers().get(0).started()); - Assertions.assertEquals(2010767026, model.initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java deleted file mode 100644 index a6fd7ba8b76f7..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaProperties; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaProperties model = - BinaryData - .fromString( - "{\"createdTime\":\"2021-01-18T20:33:29Z\",\"runningState\":\"NotRunning\",\"runningStateDetails\":\"hfwpracstwit\",\"containers\":[{\"name\":\"vxccedcp\",\"containerId\":\"dyodnwzxltj\",\"ready\":true,\"started\":true,\"restartCount\":823307226,\"runningState\":\"Waiting\",\"runningStateDetails\":\"xnavvwxq\",\"logStreamEndpoint\":\"y\",\"execEndpoint\":\"nyowxwlmdjrkvfg\"},{\"name\":\"fvpdbo\",\"containerId\":\"cizsjqlhkrribdei\",\"ready\":true,\"started\":false,\"restartCount\":1566726508,\"runningState\":\"Terminated\",\"runningStateDetails\":\"ndzwmkrefa\",\"logStreamEndpoint\":\"jorwkqnyhgbij\",\"execEndpoint\":\"ivfxzsjabibsyst\"}],\"initContainers\":[{\"name\":\"djpvkvpbjxbkz\",\"containerId\":\"kd\",\"ready\":true,\"started\":false,\"restartCount\":1067469550,\"runningState\":\"Running\",\"runningStateDetails\":\"gkakmokzhjjklff\",\"logStreamEndpoint\":\"ouw\",\"execEndpoint\":\"gzrf\"},{\"name\":\"eyebizikayuhql\",\"containerId\":\"bs\",\"ready\":true,\"started\":false,\"restartCount\":1463319790,\"runningState\":\"Waiting\",\"runningStateDetails\":\"gmfpgvmp\",\"logStreamEndpoint\":\"as\",\"execEndpoint\":\"haq\"},{\"name\":\"ss\",\"containerId\":\"u\",\"ready\":false,\"started\":false,\"restartCount\":213351747,\"runningState\":\"Terminated\",\"runningStateDetails\":\"rhneuyowq\",\"logStreamEndpoint\":\"wyt\",\"execEndpoint\":\"ib\"}]}") - .toObject(ReplicaProperties.class); - Assertions.assertEquals("vxccedcp", model.containers().get(0).name()); - Assertions.assertEquals("dyodnwzxltj", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(823307226, model.containers().get(0).restartCount()); - Assertions.assertEquals("djpvkvpbjxbkz", model.initContainers().get(0).name()); - Assertions.assertEquals("kd", model.initContainers().get(0).containerId()); - Assertions.assertEquals(true, model.initContainers().get(0).ready()); - Assertions.assertEquals(false, model.initContainers().get(0).started()); - Assertions.assertEquals(1067469550, model.initContainers().get(0).restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaProperties model = - new ReplicaProperties() - .withContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("vxccedcp") - .withContainerId("dyodnwzxltj") - .withReady(true) - .withStarted(true) - .withRestartCount(823307226), - new ReplicaContainer() - .withName("fvpdbo") - .withContainerId("cizsjqlhkrribdei") - .withReady(true) - .withStarted(false) - .withRestartCount(1566726508))) - .withInitContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("djpvkvpbjxbkz") - .withContainerId("kd") - .withReady(true) - .withStarted(false) - .withRestartCount(1067469550), - new ReplicaContainer() - .withName("eyebizikayuhql") - .withContainerId("bs") - .withReady(true) - .withStarted(false) - .withRestartCount(1463319790), - new ReplicaContainer() - .withName("ss") - .withContainerId("u") - .withReady(false) - .withStarted(false) - .withRestartCount(213351747))); - model = BinaryData.fromObject(model).toObject(ReplicaProperties.class); - Assertions.assertEquals("vxccedcp", model.containers().get(0).name()); - Assertions.assertEquals("dyodnwzxltj", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(823307226, model.containers().get(0).restartCount()); - Assertions.assertEquals("djpvkvpbjxbkz", model.initContainers().get(0).name()); - Assertions.assertEquals("kd", model.initContainers().get(0).containerId()); - Assertions.assertEquals(true, model.initContainers().get(0).ready()); - Assertions.assertEquals(false, model.initContainers().get(0).started()); - Assertions.assertEquals(1067469550, model.initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersJobExecutionWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersJobExecutionWithResponseMockTests.java deleted file mode 100644 index 8d4df9e9d1eab..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersJobExecutionWithResponseMockTests.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.JobExecution; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceProvidersJobExecutionWithResponseMockTests { - @Test - public void testJobExecutionWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"name\":\"ymvqdbpbhfckdvez\",\"id\":\"cssbzhddu\",\"type\":\"nqfblhkalehpava\",\"status\":\"Running\",\"startTime\":\"2021-07-31T19:35:54Z\",\"endTime\":\"2021-02-25T01:40:45Z\",\"template\":{\"containers\":[{\"image\":\"gdmin\",\"name\":\"tteajohiygs\",\"command\":[\"onhpcz\",\"kmktpvwxqcseh\",\"hkhufm\",\"qumq\"],\"args\":[\"ydzulodsaeuzan\"],\"env\":[{},{},{}],\"resources\":{\"cpu\":51.25538357259788,\"memory\":\"wphpzfngqj\",\"ephemeralStorage\":\"idftujwjjufwbe\"}},{\"image\":\"k\",\"name\":\"rhtssr\",\"command\":[\"mdvhazcvjy\",\"iqswbqer\"],\"args\":[\"iytxt\",\"gukvlbpkt\",\"dstyouam\"],\"env\":[{},{},{}],\"resources\":{\"cpu\":89.09465324456659,\"memory\":\"owegmmutey\",\"ephemeralStorage\":\"yguqigijiitns\"}},{\"image\":\"lz\",\"name\":\"sygrijwa\",\"command\":[\"anra\",\"bfu\",\"qfrojsydgrhyd\"],\"args\":[\"ywezskiecafyg\",\"m\",\"ieqvds\"],\"env\":[{},{},{},{}],\"resources\":{\"cpu\":9.705369980968115,\"memory\":\"ah\",\"ephemeralStorage\":\"xalybxawoijpo\"}},{\"image\":\"blxpkkwjdjodq\",\"name\":\"kincnremeh\",\"command\":[\"zhceumoqodk\",\"dppyibngqlady\",\"rxwhydtlu\",\"vadswzs\"],\"args\":[\"emlowuowhl\",\"lnwy\",\"mouvbl\",\"mo\"],\"env\":[{},{}],\"resources\":{\"cpu\":85.24180497890332,\"memory\":\"wtdvrfmvli\",\"ephemeralStorage\":\"vjdrqcrjidhftuk\"}}],\"initContainers\":[{\"image\":\"lwyojbfqzdkfnj\",\"name\":\"xhafratqx\",\"command\":[\"roumzznva\",\"qjrhuzgfxonj\"],\"args\":[\"sllywpvtio\",\"zbpdbo\",\"lgry\",\"qiuasigrows\"],\"env\":[{},{}],\"resources\":{\"cpu\":56.766450145521155,\"memory\":\"djboqgrmtq\",\"ephemeralStorage\":\"qevadrmmw\"}},{\"image\":\"awvcmjzkxiid\",\"name\":\"czskoswoqiqazu\",\"command\":[\"xzkrrcoi\",\"sbamnppcc\"],\"args\":[\"ztdsbeza\"],\"env\":[{}],\"resources\":{\"cpu\":87.2973677793008,\"memory\":\"izhyhnep\",\"ephemeralStorage\":\"etiarxqiubxdukec\"}},{\"image\":\"dazvdhctm\",\"name\":\"os\",\"command\":[\"blnsntrpcaqk\",\"ofkbtf\",\"hklbnldpvcbh\"],\"args\":[\"yq\"],\"env\":[{},{},{}],\"resources\":{\"cpu\":15.430525461055334,\"memory\":\"rp\",\"ephemeralStorage\":\"r\"}}]}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - JobExecution response = - manager - .resourceProviders() - .jobExecutionWithResponse("ndzfqivjreuyk", "bmnwa", "ltbxoeeonqlnfw", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ymvqdbpbhfckdvez", response.name()); - Assertions.assertEquals("cssbzhddu", response.id()); - Assertions.assertEquals("nqfblhkalehpava", response.type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-31T19:35:54Z"), response.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-25T01:40:45Z"), response.endTime()); - Assertions.assertEquals("gdmin", response.template().containers().get(0).image()); - Assertions.assertEquals("tteajohiygs", response.template().containers().get(0).name()); - Assertions.assertEquals("onhpcz", response.template().containers().get(0).command().get(0)); - Assertions.assertEquals("ydzulodsaeuzan", response.template().containers().get(0).args().get(0)); - Assertions.assertEquals(51.25538357259788D, response.template().containers().get(0).resources().cpu()); - Assertions.assertEquals("wphpzfngqj", response.template().containers().get(0).resources().memory()); - Assertions.assertEquals("lwyojbfqzdkfnj", response.template().initContainers().get(0).image()); - Assertions.assertEquals("xhafratqx", response.template().initContainers().get(0).name()); - Assertions.assertEquals("roumzznva", response.template().initContainers().get(0).command().get(0)); - Assertions.assertEquals("sllywpvtio", response.template().initContainers().get(0).args().get(0)); - Assertions.assertEquals(56.766450145521155D, response.template().initContainers().get(0).resources().cpu()); - Assertions.assertEquals("djboqgrmtq", response.template().initContainers().get(0).resources().memory()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.java deleted file mode 100644 index bb4e8bc6c920c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import com.azure.resourcemanager.appcontainers.models.RevisionCollection; -import java.util.Arrays; - -public final class RevisionCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RevisionCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-02-22T10:12:12Z\",\"lastActiveTime\":\"2021-10-17T14:02:40Z\",\"fqdn\":\"vxwc\",\"template\":{\"revisionSuffix\":\"pcirelsfeaen\",\"terminationGracePeriodSeconds\":6089881890484118319,\"initContainers\":[{}],\"containers\":[{},{},{}],\"scale\":{\"minReplicas\":1993086714,\"maxReplicas\":863801878,\"rules\":[{},{}]},\"volumes\":[{},{},{},{}],\"serviceBinds\":[{}]},\"active\":false,\"replicas\":2046993019,\"trafficWeight\":443965325,\"provisioningError\":\"youlp\",\"healthState\":\"None\",\"provisioningState\":\"Deprovisioning\",\"runningState\":\"Stopped\"},\"id\":\"rvimjwosytxitcsk\",\"name\":\"cktqumiekkezzi\",\"type\":\"hlyfjhdgqgg\"},{\"properties\":{\"createdTime\":\"2021-11-21T10:43:47Z\",\"lastActiveTime\":\"2021-04-09T06:20:49Z\",\"fqdn\":\"aeqidbqfatpxll\",\"template\":{\"revisionSuffix\":\"yjmoadsu\",\"terminationGracePeriodSeconds\":1027634010219173638,\"initContainers\":[{},{},{},{}],\"containers\":[{},{}],\"scale\":{\"minReplicas\":1651100345,\"maxReplicas\":1483853053,\"rules\":[{},{}]},\"volumes\":[{},{},{}],\"serviceBinds\":[{},{}]},\"active\":true,\"replicas\":288329779,\"trafficWeight\":1115314881,\"provisioningError\":\"uhpkxkgymar\",\"healthState\":\"Unhealthy\",\"provisioningState\":\"Deprovisioning\",\"runningState\":\"Processing\"},\"id\":\"ugjhky\",\"name\":\"ubeddg\",\"type\":\"sofwqmzqalkrmnji\"}],\"nextLink\":\"xacqqudfnbyx\"}") - .toObject(RevisionCollection.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RevisionCollection model = - new RevisionCollection().withValue(Arrays.asList(new RevisionInner(), new RevisionInner())); - model = BinaryData.fromObject(model).toObject(RevisionCollection.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceBindTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceBindTests.java deleted file mode 100644 index e1b616b9d96c2..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceBindTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ServiceBind; -import org.junit.jupiter.api.Assertions; - -public final class ServiceBindTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceBind model = - BinaryData.fromString("{\"serviceId\":\"mqg\",\"name\":\"queziky\"}").toObject(ServiceBind.class); - Assertions.assertEquals("mqg", model.serviceId()); - Assertions.assertEquals("queziky", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceBind model = new ServiceBind().withServiceId("mqg").withName("queziky"); - model = BinaryData.fromObject(model).toObject(ServiceBind.class); - Assertions.assertEquals("mqg", model.serviceId()); - Assertions.assertEquals("queziky", model.name()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceTests.java deleted file mode 100644 index 8bafb8e5381bb..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Service; -import org.junit.jupiter.api.Assertions; - -public final class ServiceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Service model = BinaryData.fromString("{\"type\":\"bexilzznfqqnv\"}").toObject(Service.class); - Assertions.assertEquals("bexilzznfqqnv", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Service model = new Service().withType("bexilzznfqqnv"); - model = BinaryData.fromObject(model).toObject(Service.class); - Assertions.assertEquals("bexilzznfqqnv", model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.java deleted file mode 100644 index 6fb2e500cde44..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.TrafficWeight; -import org.junit.jupiter.api.Assertions; - -public final class TrafficWeightTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrafficWeight model = - BinaryData - .fromString( - "{\"revisionName\":\"trmgucnapkte\",\"weight\":1950925712,\"latestRevision\":false,\"label\":\"tfdygpfqb\"}") - .toObject(TrafficWeight.class); - Assertions.assertEquals("trmgucnapkte", model.revisionName()); - Assertions.assertEquals(1950925712, model.weight()); - Assertions.assertEquals(false, model.latestRevision()); - Assertions.assertEquals("tfdygpfqb", model.label()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrafficWeight model = - new TrafficWeight() - .withRevisionName("trmgucnapkte") - .withWeight(1950925712) - .withLatestRevision(false) - .withLabel("tfdygpfqb"); - model = BinaryData.fromObject(model).toObject(TrafficWeight.class); - Assertions.assertEquals("trmgucnapkte", model.revisionName()); - Assertions.assertEquals(1950925712, model.weight()); - Assertions.assertEquals(false, model.latestRevision()); - Assertions.assertEquals("tfdygpfqb", model.label()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java deleted file mode 100644 index fae761209d08c..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; - -public final class UserAssignedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"d7bc9138-ce8b-4d64-b68f-6892f3278db3\",\"clientId\":\"8b444edc-73a4-4717-972d-bc7f7edae1b7\"}") - .toObject(UserAssignedIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedIdentity model = new UserAssignedIdentity(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.java deleted file mode 100644 index 4f1c3fb06af6a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class VnetConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VnetConfiguration model = - BinaryData - .fromString( - "{\"internal\":true,\"infrastructureSubnetId\":\"lma\",\"dockerBridgeCidr\":\"tcyohpfkyrk\",\"platformReservedCidr\":\"dg\",\"platformReservedDnsIP\":\"gsj\"}") - .toObject(VnetConfiguration.class); - Assertions.assertEquals(true, model.internal()); - Assertions.assertEquals("lma", model.infrastructureSubnetId()); - Assertions.assertEquals("tcyohpfkyrk", model.dockerBridgeCidr()); - Assertions.assertEquals("dg", model.platformReservedCidr()); - Assertions.assertEquals("gsj", model.platformReservedDnsIp()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VnetConfiguration model = - new VnetConfiguration() - .withInternal(true) - .withInfrastructureSubnetId("lma") - .withDockerBridgeCidr("tcyohpfkyrk") - .withPlatformReservedCidr("dg") - .withPlatformReservedDnsIp("gsj"); - model = BinaryData.fromObject(model).toObject(VnetConfiguration.class); - Assertions.assertEquals(true, model.internal()); - Assertions.assertEquals("lma", model.infrastructureSubnetId()); - Assertions.assertEquals("tcyohpfkyrk", model.dockerBridgeCidr()); - Assertions.assertEquals("dg", model.platformReservedCidr()); - Assertions.assertEquals("gsj", model.platformReservedDnsIp()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.java deleted file mode 100644 index 7406025c692c2..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.VolumeMount; -import org.junit.jupiter.api.Assertions; - -public final class VolumeMountTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeMount model = - BinaryData - .fromString("{\"volumeName\":\"bttdumorppxe\",\"mountPath\":\"nzbtbhj\",\"subPath\":\"lkfg\"}") - .toObject(VolumeMount.class); - Assertions.assertEquals("bttdumorppxe", model.volumeName()); - Assertions.assertEquals("nzbtbhj", model.mountPath()); - Assertions.assertEquals("lkfg", model.subPath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeMount model = - new VolumeMount().withVolumeName("bttdumorppxe").withMountPath("nzbtbhj").withSubPath("lkfg"); - model = BinaryData.fromObject(model).toObject(VolumeMount.class); - Assertions.assertEquals("bttdumorppxe", model.volumeName()); - Assertions.assertEquals("nzbtbhj", model.mountPath()); - Assertions.assertEquals("lkfg", model.subPath()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.java deleted file mode 100644 index fa8900b458c86..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesCollection; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadProfileStatesCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadProfileStatesCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"minimumCount\":1486999564,\"maximumCount\":2052287318,\"currentCount\":426763582},\"id\":\"uo\",\"name\":\"xprimrsop\",\"type\":\"eecjmeis\"},{\"properties\":{\"minimumCount\":749085962,\"maximumCount\":1672946681,\"currentCount\":2018313749},\"id\":\"wxdzaumweoohgu\",\"name\":\"fuzboyjathwtzolb\",\"type\":\"emwmdxmebwjs\"}],\"nextLink\":\"p\"}") - .toObject(WorkloadProfileStatesCollection.class); - Assertions.assertEquals(1486999564, model.value().get(0).properties().minimumCount()); - Assertions.assertEquals(2052287318, model.value().get(0).properties().maximumCount()); - Assertions.assertEquals(426763582, model.value().get(0).properties().currentCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfileStatesCollection model = - new WorkloadProfileStatesCollection() - .withValue( - Arrays - .asList( - new WorkloadProfileStatesInner() - .withProperties( - new WorkloadProfileStatesProperties() - .withMinimumCount(1486999564) - .withMaximumCount(2052287318) - .withCurrentCount(426763582)), - new WorkloadProfileStatesInner() - .withProperties( - new WorkloadProfileStatesProperties() - .withMinimumCount(749085962) - .withMaximumCount(1672946681) - .withCurrentCount(2018313749)))); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesCollection.class); - Assertions.assertEquals(1486999564, model.value().get(0).properties().minimumCount()); - Assertions.assertEquals(2052287318, model.value().get(0).properties().maximumCount()); - Assertions.assertEquals(426763582, model.value().get(0).properties().currentCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesInnerTests.java deleted file mode 100644 index 11c3cb2319eca..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesInnerTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadProfileStatesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadProfileStatesInner model = - BinaryData - .fromString( - "{\"properties\":{\"minimumCount\":1591085258,\"maximumCount\":2130021286,\"currentCount\":1715283989},\"id\":\"f\",\"name\":\"xnmwmqtibxyijddt\",\"type\":\"qcttadijaeukmrsi\"}") - .toObject(WorkloadProfileStatesInner.class); - Assertions.assertEquals(1591085258, model.properties().minimumCount()); - Assertions.assertEquals(2130021286, model.properties().maximumCount()); - Assertions.assertEquals(1715283989, model.properties().currentCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfileStatesInner model = - new WorkloadProfileStatesInner() - .withProperties( - new WorkloadProfileStatesProperties() - .withMinimumCount(1591085258) - .withMaximumCount(2130021286) - .withCurrentCount(1715283989)); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesInner.class); - Assertions.assertEquals(1591085258, model.properties().minimumCount()); - Assertions.assertEquals(2130021286, model.properties().maximumCount()); - Assertions.assertEquals(1715283989, model.properties().currentCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesPropertiesTests.java deleted file mode 100644 index 1630f9f1def3a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesPropertiesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadProfileStatesPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadProfileStatesProperties model = - BinaryData - .fromString("{\"minimumCount\":647971020,\"maximumCount\":513622258,\"currentCount\":1321937950}") - .toObject(WorkloadProfileStatesProperties.class); - Assertions.assertEquals(647971020, model.minimumCount()); - Assertions.assertEquals(513622258, model.maximumCount()); - Assertions.assertEquals(1321937950, model.currentCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfileStatesProperties model = - new WorkloadProfileStatesProperties() - .withMinimumCount(647971020) - .withMaximumCount(513622258) - .withCurrentCount(1321937950); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesProperties.class); - Assertions.assertEquals(647971020, model.minimumCount()); - Assertions.assertEquals(513622258, model.maximumCount()); - Assertions.assertEquals(1321937950, model.currentCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileTests.java deleted file mode 100644 index e93e8f410ca6a..0000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadProfile model = - BinaryData - .fromString( - "{\"name\":\"rdnhfuku\",\"workloadProfileType\":\"sjcswsmystuluqyp\",\"minimumCount\":1783589840,\"maximumCount\":291266426}") - .toObject(WorkloadProfile.class); - Assertions.assertEquals("rdnhfuku", model.name()); - Assertions.assertEquals("sjcswsmystuluqyp", model.workloadProfileType()); - Assertions.assertEquals(1783589840, model.minimumCount()); - Assertions.assertEquals(291266426, model.maximumCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfile model = - new WorkloadProfile() - .withName("rdnhfuku") - .withWorkloadProfileType("sjcswsmystuluqyp") - .withMinimumCount(1783589840) - .withMaximumCount(291266426); - model = BinaryData.fromObject(model).toObject(WorkloadProfile.class); - Assertions.assertEquals("rdnhfuku", model.name()); - Assertions.assertEquals("sjcswsmystuluqyp", model.workloadProfileType()); - Assertions.assertEquals(1783589840, model.minimumCount()); - Assertions.assertEquals(291266426, model.maximumCount()); - } -}