From c9c624a85b397a0c35881240bac12907e09a2461 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 23 May 2024 12:50:03 +0000 Subject: [PATCH] CodeGen from PR 28996 in Azure/azure-rest-api-specs Merge 106f00a8e261dbaebb4e0e5a35c5d0c7f6a5bfa6 into 9d051b483d82a484960cfbdec2d11d93922a5bd8 --- .../CHANGELOG.md | 4 +- .../README.md | 4 +- .../SAMPLE.md | 2798 +++++++++++------ .../pom.xml | 4 +- .../ContainerAppsApiManager.java | 186 +- ...ectedEnvironmentsDaprComponentsClient.java | 3 +- .../fluent/ContainerAppsApiClient.java | 61 +- ...tainerAppsBuildsByContainerAppsClient.java | 46 + .../fluent/ContainerAppsBuildsClient.java | 105 + .../fluent/ContainerAppsPatchesClient.java | 263 ++ .../ContainerAppsSessionPoolsClient.java | 315 ++ .../fluent/FunctionsExtensionsClient.java | 50 + ...nmentPrivateEndpointConnectionsClient.java | 219 ++ ...EnvironmentPrivateLinkResourcesClient.java | 44 + .../fluent/models/AuthConfigProperties.java | 12 +- .../models/BillingMeterCollectionInner.java | 5 +- .../fluent/models/BuilderProperties.java | 5 +- .../models/ConnectedEnvironmentInner.java | 8 +- .../ConnectedEnvironmentProperties.java | 8 +- ...tedEnvironmentStoragesCollectionInner.java | 5 +- .../fluent/models/ContainerAppInner.java | 83 +- .../ContainerAppJobExecutionsInner.java | 5 +- .../fluent/models/ContainerAppProperties.java | 31 + .../models/ContainerAppsBuildProperties.java | 113 + .../ContainerAppsBuildResourceInner.java | 112 + .../ContainerAppsPatchResourceInner.java | 64 + .../CustomHostnameAnalysisResultInner.java | 10 +- .../models/DaprSecretsCollectionInner.java | 5 +- .../models/DiagnosticsCollectionInner.java | 5 +- .../fluent/models/JavaComponentInner.java | 103 +- .../fluent/models/JobExecutionInner.java | 24 + .../fluent/models/JobExecutionProperties.java | 30 + .../appcontainers/fluent/models/JobInner.java | 11 +- .../models/JobSecretsCollectionInner.java | 5 +- .../models/ManagedEnvironmentInner.java | 57 +- .../models/ManagedEnvironmentProperties.java | 73 +- ...gedEnvironmentStoragesCollectionInner.java | 5 +- .../PrivateEndpointConnectionInner.java | 134 + .../PrivateEndpointConnectionProperties.java | 130 + .../models/PrivateLinkResourceInner.java | 105 + .../models/PrivateLinkResourceProperties.java | 85 + .../fluent/models/ReplicaCollectionInner.java | 4 +- .../fluent/models/SecretsCollectionInner.java | 4 +- .../fluent/models/SessionPoolInner.java | 304 ++ .../fluent/models/SessionPoolProperties.java | 308 ++ ...sionPoolUpdatablePropertiesProperties.java | 184 ++ .../fluent/models/UsageInner.java | 4 +- .../fluent/models/package-info.java | 4 +- .../appcontainers/fluent/package-info.java | 4 +- .../AppResilienciesClientImpl.java | 4 +- .../implementation/AppResiliencyImpl.java | 36 +- .../implementation/AuthConfigImpl.java | 34 +- .../BuildAuthTokensClientImpl.java | 4 +- .../implementation/BuildResourceImpl.java | 32 +- .../implementation/BuilderResourceImpl.java | 32 +- .../implementation/CertificateImpl.java | 29 +- .../CertificatesClientImpl.java | 4 +- .../implementation/CertificatesImpl.java | 9 +- .../ConnectedEnvironmentImpl.java | 41 +- .../ConnectedEnvironmentStorageImpl.java | 40 +- ...ctedEnvironmentStoragesCollectionImpl.java | 6 +- ...tedEnvironmentsCertificatesClientImpl.java | 4 +- ...ConnectedEnvironmentsCertificatesImpl.java | 8 +- .../ConnectedEnvironmentsClientImpl.java | 3 +- ...dEnvironmentsDaprComponentsClientImpl.java | 3 +- ...nnectedEnvironmentsDaprComponentsImpl.java | 8 +- .../ConnectedEnvironmentsImpl.java | 9 +- ...nnectedEnvironmentsStoragesClientImpl.java | 4 +- .../ConnectedEnvironmentsStoragesImpl.java | 6 +- .../implementation/ContainerAppImpl.java | 57 +- .../ContainerAppJobExecutionsImpl.java | 3 +- .../ContainerAppsApiClientBuilder.java | 6 +- .../ContainerAppsApiClientImpl.java | 154 +- .../ContainerAppsBuildResourceImpl.java | 69 + ...erAppsBuildsByContainerAppsClientImpl.java | 290 ++ ...ontainerAppsBuildsByContainerAppsImpl.java | 50 + .../ContainerAppsBuildsClientImpl.java | 441 +++ .../ContainerAppsBuildsImpl.java | 66 + .../ContainerAppsPatchResourceImpl.java | 50 + .../ContainerAppsPatchesClientImpl.java | 1206 +++++++ .../ContainerAppsPatchesImpl.java | 115 + ...ntainerAppsRevisionReplicasClientImpl.java | 4 +- .../ContainerAppsRevisionReplicasImpl.java | 4 +- .../ContainerAppsRevisionsImpl.java | 12 +- .../ContainerAppsSessionPoolsClientImpl.java | 1366 ++++++++ .../ContainerAppsSessionPoolsImpl.java | 146 + ...ContainerAppsSourceControlsClientImpl.java | 9 +- .../implementation/DaprComponentImpl.java | 52 +- .../DaprComponentResiliencyPoliciesImpl.java | 4 +- .../DaprComponentResiliencyPolicyImpl.java | 44 +- .../implementation/DaprComponentsImpl.java | 9 +- .../implementation/DaprSubscriptionImpl.java | 24 +- .../implementation/DotNetComponentImpl.java | 32 +- .../DotNetComponentsClientImpl.java | 3 +- .../FunctionsExtensionsClientImpl.java | 220 ++ .../FunctionsExtensionsImpl.java | 46 + .../implementation/JavaComponentImpl.java | 83 +- .../implementation/JobExecutionImpl.java | 5 + .../appcontainers/implementation/JobImpl.java | 27 +- .../implementation/JobsClientImpl.java | 4 +- .../implementation/JobsImpl.java | 2 +- .../ManagedCertificateImpl.java | 37 +- .../ManagedCertificatesClientImpl.java | 12 +- .../ManagedCertificatesImpl.java | 4 +- ...nagedEnvironmentDiagnosticsClientImpl.java | 4 +- .../ManagedEnvironmentImpl.java | 61 +- ...tPrivateEndpointConnectionsClientImpl.java | 1004 ++++++ ...ronmentPrivateEndpointConnectionsImpl.java | 169 + ...ronmentPrivateLinkResourcesClientImpl.java | 287 ++ ...edEnvironmentPrivateLinkResourcesImpl.java | 46 + .../ManagedEnvironmentStorageImpl.java | 32 +- ...agedEnvironmentStoragesCollectionImpl.java | 3 +- .../ManagedEnvironmentsStoragesImpl.java | 2 +- .../implementation/NamespacesImpl.java | 9 +- .../PrivateEndpointConnectionImpl.java | 164 + .../PrivateLinkResourceImpl.java | 69 + .../implementation/ResourceManagerUtils.java | 2 - .../implementation/SessionPoolImpl.java | 285 ++ .../implementation/SourceControlImpl.java | 24 +- .../implementation/package-info.java | 4 +- .../models/AppResiliencyCollection.java | 4 +- .../appcontainers/models/Apple.java | 3 +- .../models/AuthConfigCollection.java | 4 +- .../appcontainers/models/AuthPlatform.java | 6 +- .../AvailableWorkloadProfilesCollection.java | 5 +- .../models/AzureActiveDirectory.java | 3 +- .../models/AzureActiveDirectoryLogin.java | 11 +- .../AzureActiveDirectoryRegistration.java | 14 +- .../models/AzureStaticWebApps.java | 3 +- .../appcontainers/models/BaseContainer.java | 28 + .../models/BlobStorageTokenStore.java | 5 +- .../appcontainers/models/BuildCollection.java | 4 +- .../models/BuilderCollection.java | 4 +- .../models/CertificateCollection.java | 4 +- .../models/CertificateKeyVaultProperties.java | 3 +- .../models/CircuitBreakerPolicy.java | 11 +- .../appcontainers/models/Configuration.java | 71 +- .../appcontainers/models/Container.java | 9 + .../appcontainers/models/ContainerApp.java | 68 +- .../models/ContainerAppCollection.java | 4 +- .../models/ContainerAppProbe.java | 60 +- .../models/ContainerAppProbeHttpGet.java | 3 +- ...ntainerAppProbeHttpGetHttpHeadersItem.java | 10 +- .../models/ContainerAppProbeTcpSocket.java | 3 +- ...nerAppPropertiesPatchingConfiguration.java | 58 + .../models/ContainerAppSecret.java | 3 +- .../models/ContainerAppsBuildCollection.java | 92 + .../ContainerAppsBuildConfiguration.java | 111 + .../models/ContainerAppsBuildResource.java | 83 + .../models/ContainerAppsBuilds.java | 66 + .../ContainerAppsBuildsByContainerApps.java | 40 + .../models/ContainerAppsPatchResource.java | 55 + .../models/ContainerAppsPatches.java | 152 + .../models/ContainerAppsSessionPools.java | 180 ++ .../models/ContainerExecutionStatus.java | 132 + .../models/ContainerRegistry.java | 10 +- .../ContainerRegistryWithCustomImage.java | 8 +- .../appcontainers/models/ContainerType.java | 53 + .../appcontainers/models/CorsPolicy.java | 6 +- .../models/CustomContainerTemplate.java | 118 + .../appcontainers/models/CustomDomain.java | 4 +- .../appcontainers/models/CustomScaleRule.java | 28 + .../appcontainers/models/Dapr.java | 11 +- ...ComponentResiliencyPoliciesCollection.java | 5 +- ...licyCircuitBreakerPolicyConfiguration.java | 3 +- .../models/DaprComponentsCollection.java | 4 +- .../models/DaprSubscriptionRouteRule.java | 4 +- .../models/DaprSubscriptionsCollection.java | 5 +- .../appcontainers/models/DetectionStatus.java | 58 + .../models/DotNetComponentType.java | 5 - .../models/DotNetComponentsCollection.java | 5 +- .../models/DynamicPoolConfiguration.java | 80 + .../models/EnvironmentVariable.java | 8 +- .../appcontainers/models/ExecutionStatus.java | 58 + .../appcontainers/models/ExecutionType.java | 48 + .../appcontainers/models/Facebook.java | 3 +- .../models/FunctionsExtensions.java | 46 + .../appcontainers/models/GitHub.java | 11 +- .../appcontainers/models/Google.java | 11 +- .../appcontainers/models/HttpGet.java | 3 +- .../appcontainers/models/HttpScaleRule.java | 28 + .../appcontainers/models/HttpSettings.java | 3 +- .../models/IdentitySettings.java | 91 + .../models/IdentitySettingsLifeCycle.java | 63 + .../appcontainers/models/ImageType.java | 54 + .../appcontainers/models/Ingress.java | 7 +- .../appcontainers/models/InitContainer.java | 9 + .../models/IpSecurityRestrictionRule.java | 14 +- .../appcontainers/models/JavaComponent.java | 112 +- .../models/JavaComponentIngress.java | 43 + .../models/JavaComponentProperties.java | 40 +- .../models/JavaComponentType.java | 5 + .../models/JavaComponentsCollection.java | 4 +- .../models/JobConfiguration.java | 41 +- ...JobConfigurationScheduleTriggerConfig.java | 9 +- .../appcontainers/models/JobExecution.java | 7 + .../models/JobPatchProperties.java | 11 +- .../appcontainers/models/JobScaleRule.java | 28 + .../appcontainers/models/JobsCollection.java | 4 +- .../appcontainers/models/Kind.java | 49 + .../appcontainers/models/Level.java | 73 + .../models/ListUsagesResult.java | 3 +- .../appcontainers/models/LoggerSetting.java | 91 + .../appcontainers/models/Login.java | 6 +- .../models/ManagedCertificateCollection.java | 5 +- .../models/ManagedEnvironment.java | 62 +- ...EnvironmentPrivateEndpointConnections.java | 152 + ...anagedEnvironmentPrivateLinkResources.java | 38 + ...entPropertiesPeerTrafficConfiguration.java | 58 + ...iesPeerTrafficConfigurationEncryption.java | 54 + .../models/ManagedEnvironmentsCollection.java | 5 +- .../models/ManagedServiceIdentity.java | 20 +- .../appcontainers/models/NacosComponent.java | 104 + .../appcontainers/models/Nonce.java | 3 +- .../models/OpenIdConnectConfig.java | 8 +- .../models/OpenIdConnectRegistration.java | 8 +- .../models/PatchApplyStatus.java | 88 + .../appcontainers/models/PatchCollection.java | 91 + .../appcontainers/models/PatchDetails.java | 155 + .../models/PatchDetailsNewLayer.java | 106 + .../models/PatchDetailsOldLayer.java | 106 + .../appcontainers/models/PatchProperties.java | 171 + .../appcontainers/models/PatchSkipConfig.java | 54 + .../appcontainers/models/PatchType.java | 63 + .../appcontainers/models/PatchingMode.java | 60 + .../models/PoolManagementType.java | 53 + .../appcontainers/models/PrivateEndpoint.java | 43 + .../models/PrivateEndpointConnection.java | 245 ++ .../PrivateEndpointConnectionListResult.java | 74 + ...teEndpointConnectionProvisioningState.java | 79 + ...rivateEndpointServiceConnectionStatus.java | 64 + .../models/PrivateLinkResource.java | 70 + .../models/PrivateLinkResourceListResult.java | 74 + .../PrivateLinkServiceConnectionState.java | 110 + .../appcontainers/models/QueueScaleRule.java | 54 + .../models/RegistryCredentials.java | 3 +- .../models/ReplicaExecutionStatus.java | 84 + .../models/RevisionCollection.java | 4 +- .../appcontainers/models/Runtime.java | 86 + .../appcontainers/models/RuntimeDotnet.java | 54 + .../appcontainers/models/RuntimeJava.java | 83 + .../models/RuntimeJavaAgent.java | 83 + .../models/RuntimeJavaAgentLogging.java | 58 + .../models/ScaleConfiguration.java | 80 + .../appcontainers/models/Secret.java | 3 +- .../models/SecretAutoGenerated.java | 80 + .../appcontainers/models/Service.java | 3 +- .../models/SessionContainer.java | 191 ++ .../models/SessionContainerResources.java | 80 + .../appcontainers/models/SessionIngress.java | 54 + .../models/SessionNetworkConfiguration.java | 54 + .../models/SessionNetworkStatus.java | 53 + .../appcontainers/models/SessionPool.java | 481 +++ .../models/SessionPoolCollection.java | 80 + .../models/SessionPoolProvisioningState.java | 68 + .../SessionPoolUpdatableProperties.java | 167 + .../models/SessionRegistryCredentials.java | 106 + .../models/SourceControlCollection.java | 4 +- .../models/SpringBootAdminComponent.java | 104 + .../models/SpringCloudConfigComponent.java | 75 + .../models/SpringCloudEurekaComponent.java | 104 + .../appcontainers/models/TcpScaleRule.java | 28 + .../appcontainers/models/Template.java | 5 +- .../appcontainers/models/TokenStore.java | 5 +- .../appcontainers/models/Twitter.java | 3 +- .../models/VnetConfiguration.java | 20 +- .../appcontainers/models/Volume.java | 6 +- .../appcontainers/models/VolumeMount.java | 14 +- .../appcontainers/models/WorkloadProfile.java | 9 +- .../WorkloadProfileStatesCollection.java | 5 +- .../appcontainers/models/package-info.java | 4 +- .../appcontainers/package-info.java | 4 +- .../src/main/java/module-info.java | 2 +- .../proxy-config.json | 2 +- .../reflect-config.json | 358 ++- .../AppResiliencyCreateOrUpdateSamples.java | 29 +- .../generated/AppResiliencyDeleteSamples.java | 7 +- .../generated/AppResiliencyGetSamples.java | 7 +- .../generated/AppResiliencyListSamples.java | 3 +- .../generated/AppResiliencyUpdateSamples.java | 3 +- .../AvailableWorkloadProfilesGetSamples.java | 3 +- .../generated/BillingMetersGetSamples.java | 3 +- .../generated/BuildAuthTokenListSamples.java | 3 +- .../BuildersCreateOrUpdateSamples.java | 18 +- .../generated/BuildersDeleteSamples.java | 3 +- .../BuildersGetByResourceGroupSamples.java | 3 +- .../BuildersListByResourceGroupSamples.java | 4 +- .../generated/BuildersListSamples.java | 4 +- .../generated/BuildersUpdateSamples.java | 6 +- .../BuildsByBuilderResourceListSamples.java | 4 +- .../BuildsCreateOrUpdateSamples.java | 41 +- .../generated/BuildsDeleteSamples.java | 3 +- .../generated/BuildsGetSamples.java | 3 +- .../CertificatesCreateOrUpdateSamples.java | 35 +- .../generated/CertificatesDeleteSamples.java | 8 +- .../generated/CertificatesGetSamples.java | 8 +- .../generated/CertificatesListSamples.java | 3 +- .../generated/CertificatesUpdateSamples.java | 10 +- ...entsCertificatesCreateOrUpdateSamples.java | 7 +- ...EnvironmentsCertificatesDeleteSamples.java | 8 +- ...tedEnvironmentsCertificatesGetSamples.java | 8 +- ...edEnvironmentsCertificatesListSamples.java | 7 +- ...EnvironmentsCertificatesUpdateSamples.java | 9 +- ...ironmentsCheckNameAvailabilitySamples.java | 8 +- ...ctedEnvironmentsCreateOrUpdateSamples.java | 11 +- ...tsDaprComponentsCreateOrUpdateSamples.java | 13 +- ...vironmentsDaprComponentsDeleteSamples.java | 7 +- ...dEnvironmentsDaprComponentsGetSamples.java | 7 +- ...EnvironmentsDaprComponentsListSamples.java | 7 +- ...mentsDaprComponentsListSecretsSamples.java | 7 +- .../ConnectedEnvironmentsDeleteSamples.java | 4 +- ...EnvironmentsGetByResourceGroupSamples.java | 8 +- ...nvironmentsListByResourceGroupSamples.java | 3 +- .../ConnectedEnvironmentsListSamples.java | 3 +- ...ronmentsStoragesCreateOrUpdateSamples.java | 14 +- ...ctedEnvironmentsStoragesDeleteSamples.java | 7 +- ...nnectedEnvironmentsStoragesGetSamples.java | 7 +- ...nectedEnvironmentsStoragesListSamples.java | 7 +- .../ConnectedEnvironmentsUpdateSamples.java | 4 +- ...rAppsAuthConfigsCreateOrUpdateSamples.java | 7 +- ...ContainerAppsAuthConfigsDeleteSamples.java | 7 +- .../ContainerAppsAuthConfigsGetSamples.java | 7 +- ...sAuthConfigsListByContainerAppSamples.java | 8 +- ...erAppsBuildsByContainerAppListSamples.java | 23 + .../ContainerAppsBuildsDeleteSamples.java | 23 + .../ContainerAppsBuildsGetSamples.java | 23 + .../ContainerAppsCreateOrUpdateSamples.java | 534 +++- .../generated/ContainerAppsDeleteSamples.java | 3 +- ...inerAppsDiagnosticsGetDetectorSamples.java | 9 +- ...inerAppsDiagnosticsGetRevisionSamples.java | 8 +- ...ontainerAppsDiagnosticsGetRootSamples.java | 7 +- ...erAppsDiagnosticsListDetectorsSamples.java | 7 +- ...erAppsDiagnosticsListRevisionsSamples.java | 7 +- .../ContainerAppsGetAuthTokenSamples.java | 4 +- ...ontainerAppsGetByResourceGroupSamples.java | 7 +- ...ntainerAppsListByResourceGroupSamples.java | 3 +- ...AppsListCustomHostnameAnalysisSamples.java | 8 +- .../generated/ContainerAppsListSamples.java | 3 +- .../ContainerAppsListSecretsSamples.java | 4 +- .../ContainerAppsPatchesApplySamples.java | 23 + .../ContainerAppsPatchesDeleteSamples.java | 23 + .../ContainerAppsPatchesGetSamples.java | 24 + ...rAppsPatchesListByContainerAppSamples.java | 23 + ...tainerAppsPatchesSkipConfigureSamples.java | 27 + ...AppsRevisionReplicasGetReplicaSamples.java | 8 +- ...psRevisionReplicasListReplicasSamples.java | 7 +- ...rAppsRevisionsActivateRevisionSamples.java | 8 +- ...ppsRevisionsDeactivateRevisionSamples.java | 8 +- ...tainerAppsRevisionsGetRevisionSamples.java | 8 +- ...inerAppsRevisionsListRevisionsSamples.java | 7 +- ...erAppsRevisionsRestartRevisionSamples.java | 8 +- ...AppsSessionPoolsCreateOrUpdateSamples.java | 57 + ...ontainerAppsSessionPoolsDeleteSamples.java | 22 + ...SessionPoolsGetByResourceGroupSamples.java | 23 + ...essionPoolsListByResourceGroupSamples.java | 23 + .../ContainerAppsSessionPoolsListSamples.java | 23 + ...ontainerAppsSessionPoolsUpdateSamples.java | 51 + ...psSourceControlsCreateOrUpdateSamples.java | 20 +- ...tainerAppsSourceControlsDeleteSamples.java | 7 +- ...ContainerAppsSourceControlsGetSamples.java | 7 +- ...urceControlsListByContainerAppSamples.java | 7 +- .../generated/ContainerAppsStartSamples.java | 3 +- .../generated/ContainerAppsStopSamples.java | 3 +- .../generated/ContainerAppsUpdateSamples.java | 130 +- ...siliencyPoliciesCreateOrUpdateSamples.java | 53 +- ...ponentResiliencyPoliciesDeleteSamples.java | 8 +- ...ComponentResiliencyPoliciesGetSamples.java | 8 +- ...omponentResiliencyPoliciesListSamples.java | 7 +- .../DaprComponentsCreateOrUpdateSamples.java | 71 +- .../DaprComponentsDeleteSamples.java | 7 +- .../generated/DaprComponentsGetSamples.java | 15 +- .../generated/DaprComponentsListSamples.java | 3 +- .../DaprComponentsListSecretsSamples.java | 8 +- ...aprSubscriptionsCreateOrUpdateSamples.java | 40 +- .../DaprSubscriptionsDeleteSamples.java | 8 +- .../DaprSubscriptionsGetSamples.java | 21 +- .../DaprSubscriptionsListSamples.java | 3 +- ...DotNetComponentsCreateOrUpdateSamples.java | 17 +- .../DotNetComponentsDeleteSamples.java | 7 +- .../generated/DotNetComponentsGetSamples.java | 14 +- .../DotNetComponentsListSamples.java | 6 +- .../DotNetComponentsUpdateSamples.java | 17 +- ...nsExtensionInvokeFunctionsHostSamples.java | 25 + .../JavaComponentsCreateOrUpdateSamples.java | 29 +- .../JavaComponentsDeleteSamples.java | 7 +- .../generated/JavaComponentsGetSamples.java | 14 +- .../generated/JavaComponentsListSamples.java | 6 +- .../JavaComponentsUpdateSamples.java | 23 +- .../generated/JobsCreateOrUpdateSamples.java | 162 +- .../generated/JobsDeleteSamples.java | 3 +- .../generated/JobsExecutionsListSamples.java | 3 +- .../JobsGetByResourceGroupSamples.java | 3 +- .../generated/JobsGetDetectorSamples.java | 8 +- .../JobsListByResourceGroupSamples.java | 4 +- .../generated/JobsListDetectorsSamples.java | 7 +- .../generated/JobsListSamples.java | 3 +- .../generated/JobsListSecretsSamples.java | 3 +- .../generated/JobsProxyGetSamples.java | 3 +- .../generated/JobsStartSamples.java | 12 +- .../generated/JobsStopExecutionSamples.java | 3 +- .../JobsStopMultipleExecutionsSamples.java | 3 +- .../generated/JobsUpdateSamples.java | 50 +- ...agedCertificatesCreateOrUpdateSamples.java | 7 +- .../ManagedCertificatesDeleteSamples.java | 9 +- .../ManagedCertificatesGetSamples.java | 8 +- .../ManagedCertificatesListSamples.java | 3 +- .../ManagedCertificatesUpdateSamples.java | 10 +- ...ironmentDiagnosticsGetDetectorSamples.java | 8 +- ...onmentDiagnosticsListDetectorsSamples.java | 7 +- ...pointConnectionsCreateOrUpdateSamples.java | 34 + ...ivateEndpointConnectionsDeleteSamples.java | 24 + ...tPrivateEndpointConnectionsGetSamples.java | 24 + ...PrivateEndpointConnectionsListSamples.java | 24 + ...onmentPrivateLinkResourcesListSamples.java | 24 + .../ManagedEnvironmentUsagesListSamples.java | 3 +- ...agedEnvironmentsCreateOrUpdateSamples.java | 69 +- .../ManagedEnvironmentsDeleteSamples.java | 4 +- ...EnvironmentsDiagnosticsGetRootSamples.java | 7 +- ...anagedEnvironmentsGetAuthTokenSamples.java | 3 +- ...EnvironmentsGetByResourceGroupSamples.java | 7 +- ...nvironmentsListByResourceGroupSamples.java | 3 +- .../ManagedEnvironmentsListSamples.java | 3 +- ...mentsListWorkloadProfileStatesSamples.java | 7 +- ...ronmentsStoragesCreateOrUpdateSamples.java | 26 +- ...agedEnvironmentsStoragesDeleteSamples.java | 7 +- ...ManagedEnvironmentsStoragesGetSamples.java | 14 +- ...anagedEnvironmentsStoragesListSamples.java | 7 +- .../ManagedEnvironmentsUpdateSamples.java | 4 +- ...amespacesCheckNameAvailabilitySamples.java | 18 +- .../generated/OperationsListSamples.java | 3 +- ...rGetCustomDomainVerificationIdSamples.java | 3 +- .../ResourceProviderJobExecutionSamples.java | 7 +- .../generated/UsagesListSamples.java | 3 +- .../AllowedAudiencesValidationTests.java | 28 - .../generated/AllowedPrincipalsTests.java | 30 - .../AppInsightsConfigurationTests.java | 25 - ...silienciesDeleteWithResponseMockTests.java | 52 - .../generated/AuthPlatformTests.java | 27 - .../generated/AvailableOperationsTests.java | 57 - .../AvailableWorkloadProfileInnerTests.java | 42 - ...ailableWorkloadProfilePropertiesTests.java | 39 - ...ilableWorkloadProfilesCollectionTests.java | 54 - ...AvailableWorkloadProfilesGetMockTests.java | 64 - .../AzureActiveDirectoryLoginTests.java | 30 - .../AzureStaticWebAppsRegistrationTests.java | 25 - .../generated/AzureStaticWebAppsTests.java | 30 - .../BillingMeterCollectionInnerTests.java | 46 - .../BillingMeterPropertiesTests.java | 31 - .../generated/BillingMeterTests.java | 35 - ...BillingMetersGetWithResponseMockTests.java | 59 - .../generated/BlobStorageTokenStoreTests.java | 25 - .../generated/BuildConfigurationTests.java | 67 - .../generated/BuilderCollectionTests.java | 108 - .../generated/BuilderPropertiesTests.java | 37 - .../generated/BuilderResourceInnerTests.java | 67 - .../BuilderResourceUpdatePropertiesTests.java | 25 - .../generated/BuilderResourceUpdateTests.java | 52 - .../BuildersCreateOrUpdateMockTests.java | 88 - ...tByResourceGroupWithResponseMockTests.java | 62 - .../BuildersListByResourceGroupMockTests.java | 65 - .../generated/BuildersListMockTests.java | 64 - .../generated/CertificatePatchTests.java | 39 - ...rtificatesDeleteWithResponseMockTests.java | 52 - .../CheckNameAvailabilityRequestTests.java | 27 - ...eckNameAvailabilityResponseInnerTests.java | 32 - .../generated/CircuitBreakerPolicyTests.java | 32 - ...rtificatesDeleteWithResponseMockTests.java | 52 - ...NameAvailabilityWithResponseMockTests.java | 61 - ...ComponentsDeleteWithResponseMockTests.java | 52 - ...nentsListSecretsWithResponseMockTests.java | 54 - .../ConnectedEnvironmentsDeleteMockTests.java | 51 - ...tsStoragesDeleteWithResponseMockTests.java | 52 - .../ContainerAppJobExecutionsInnerTests.java | 51 - ...erAppProbeHttpGetHttpHeadersItemTests.java | 29 - .../ContainerAppProbeHttpGetTests.java | 44 - .../ContainerAppProbeTcpSocketTests.java | 28 - .../generated/ContainerAppProbeTests.java | 71 - ...uthConfigsDeleteWithResponseMockTests.java | 51 - .../ContainerAppsDeleteMockTests.java | 51 - ...sticsGetDetectorWithResponseMockTests.java | 69 - ...AppsDiagnosticsListDetectorsMockTests.java | 74 - ...plicasGetReplicaWithResponseMockTests.java | 65 - ...icasListReplicasWithResponseMockTests.java | 55 - ...ActivateRevisionWithResponseMockTests.java | 52 - ...activateRevisionWithResponseMockTests.java | 52 - ...sRestartRevisionWithResponseMockTests.java | 52 - ...inerAppsSourceControlsDeleteMockTests.java | 52 - .../generated/ContainerRegistryTests.java | 28 - ...ContainerRegistryWithCustomImageTests.java | 29 - .../generated/ContainerResourcesTests.java | 28 - .../generated/CookieExpirationTests.java | 30 - .../generated/CustomDomainTests.java | 32 - ...nentResiliencyPoliciesCollectionTests.java | 144 - ...esCreateOrUpdateWithResponseMockTests.java | 97 - ...cyPoliciesDeleteWithResponseMockTests.java | 52 - ...iencyPoliciesGetWithResponseMockTests.java | 74 - ...ponentResiliencyPoliciesListMockTests.java | 82 - ...ircuitBreakerPolicyConfigurationTests.java | 34 - ...entResiliencyPolicyConfigurationTests.java | 50 - ...icyHttpRetryBackOffConfigurationTests.java | 30 - ...licyHttpRetryPolicyConfigurationTests.java | 34 - ...prComponentResiliencyPolicyInnerTests.java | 85 - ...ponentResiliencyPolicyPropertiesTests.java | 85 - ...PolicyTimeoutPolicyConfigurationTests.java | 27 - .../DaprComponentServiceBindingTests.java | 35 - ...ComponentsDeleteWithResponseMockTests.java | 52 - ...nentsListSecretsWithResponseMockTests.java | 53 - .../generated/DaprConfigurationTests.java | 21 - .../generated/DaprSecretTests.java | 22 - .../DaprSecretsCollectionInnerTests.java | 26 - .../DaprServiceBindMetadataTests.java | 28 - ...SubscriptionBulkSubscribeOptionsTests.java | 31 - .../generated/DaprSubscriptionInnerTests.java | 72 - .../DaprSubscriptionPropertiesTests.java | 75 - .../DaprSubscriptionRouteRuleTests.java | 27 - .../DaprSubscriptionRoutesTests.java | 35 - .../DaprSubscriptionsCollectionTests.java | 107 - ...nsCreateOrUpdateWithResponseMockTests.java | 94 - ...scriptionsDeleteWithResponseMockTests.java | 52 - ...SubscriptionsGetWithResponseMockTests.java | 66 - .../DaprSubscriptionsListMockTests.java | 67 - .../appcontainers/generated/DaprTests.java | 44 - .../DefaultAuthorizationPolicyTests.java | 37 - .../DefaultErrorResponseErrorTests.java | 22 - ...aProviderMetadataPropertyBagItemTests.java | 29 - .../DiagnosticDataProviderMetadataTests.java | 35 - ...iagnosticDataTableResponseColumnTests.java | 31 - ...iagnosticDataTableResponseObjectTests.java | 44 - .../generated/DiagnosticRenderingTests.java | 33 - .../DiagnosticSupportTopicTests.java | 22 - .../DiagnosticsCollectionInnerTests.java | 119 - .../DiagnosticsDataApiResponseTests.java | 57 - .../generated/DiagnosticsDefinitionTests.java | 30 - .../generated/DiagnosticsInnerTests.java | 94 - .../generated/DiagnosticsPropertiesTests.java | 107 - .../generated/DiagnosticsStatusTests.java | 27 - ...etComponentConfigurationPropertyTests.java | 29 - .../generated/DotNetComponentInnerTests.java | 45 - .../DotNetComponentPropertiesTests.java | 46 - .../DotNetComponentServiceBindTests.java | 27 - .../DotNetComponentsCollectionTests.java | 45 - ...tNetComponentsCreateOrUpdateMockTests.java | 75 - ...NetComponentsGetWithResponseMockTests.java | 61 - .../DotNetComponentsListMockTests.java | 62 - .../generated/EnvironmentVariableTests.java | 27 - .../generated/ExtendedLocationTests.java | 29 - .../generated/ForwardProxyTests.java | 32 - .../generated/GlobalValidationTests.java | 36 - .../generated/HeaderMatchMatchTests.java | 33 - .../generated/HeaderMatchTests.java | 35 - .../generated/HttpConnectionPoolTests.java | 29 - .../appcontainers/generated/HttpGetTests.java | 33 - .../HttpRetryPolicyRetryBackOffTests.java | 29 - .../generated/HttpSettingsRoutesTests.java | 25 - .../generated/HttpSettingsTests.java | 40 - .../generated/IngressPortMappingTests.java | 31 - .../generated/IngressStickySessionsTests.java | 26 - .../IpSecurityRestrictionRuleTests.java | 34 - ...vaComponentConfigurationPropertyTests.java | 29 - .../generated/JavaComponentInnerTests.java | 44 - .../JavaComponentPropertiesTests.java | 42 - .../JavaComponentServiceBindTests.java | 28 - .../JavaComponentsCollectionTests.java | 53 - ...JavaComponentsCreateOrUpdateMockTests.java | 74 - ...avaComponentsGetWithResponseMockTests.java | 62 - .../JavaComponentsListMockTests.java | 62 - ...ConfigurationManualTriggerConfigTests.java | 29 - ...nfigurationScheduleTriggerConfigTests.java | 31 - .../generated/JobExecutionBaseInnerTests.java | 27 - .../generated/JobExecutionInnerTests.java | 92 - .../generated/JobsDeleteMockTests.java | 51 - .../JobsExecutionsListMockTests.java | 72 - .../JobsGetDetectorWithResponseMockTests.java | 66 - ...obsListDetectorsWithResponseMockTests.java | 59 - .../generated/JobsStopExecutionMockTests.java | 51 - .../JobsStopMultipleExecutionsMockTests.java | 60 - .../generated/JwtClaimChecksTests.java | 30 - .../generated/KedaConfigurationTests.java | 22 - .../generated/ListUsagesResultTests.java | 40 - .../generated/LoginRoutesTests.java | 25 - .../generated/LoginScopesTests.java | 25 - .../generated/LogsConfigurationTests.java | 26 - .../ManagedCertificatePatchTests.java | 39 - ...rtificatesDeleteWithResponseMockTests.java | 52 - ...sticsGetDetectorWithResponseMockTests.java | 68 - ...icsListDetectorsWithResponseMockTests.java | 59 - ...mentPropertiesPeerAuthenticationTests.java | 27 - ...ManagedEnvironmentUsagesListMockTests.java | 60 - .../ManagedEnvironmentsDeleteMockTests.java | 51 - ...ntsListWorkloadProfileStatesMockTests.java | 59 - ...tsStoragesDeleteWithResponseMockTests.java | 52 - .../ManagedServiceIdentityTests.java | 43 - .../generated/MetricsConfigurationTests.java | 28 - .../appcontainers/generated/MtlsTests.java | 24 - ...NameAvailabilityWithResponseMockTests.java | 62 - .../NfsAzureFilePropertiesTests.java | 32 - .../appcontainers/generated/NonceTests.java | 27 - .../generated/OpenIdConnectLoginTests.java | 30 - .../generated/OperationDetailInnerTests.java | 42 - .../generated/OperationDisplayTests.java | 33 - .../generated/OperationsListMockTests.java | 62 - .../generated/PreBuildStepTests.java | 38 - .../ReplicaCollectionInnerTests.java | 61 - .../generated/ReplicaContainerTests.java | 35 - .../generated/ReplicaInnerTests.java | 50 - .../generated/ReplicaPropertiesTests.java | 60 - ...inVerificationIdWithResponseMockTests.java | 54 - ...dersJobExecutionWithResponseMockTests.java | 69 - .../generated/RevisionCollectionTests.java | 26 - .../appcontainers/generated/ServiceTests.java | 24 - .../generated/TcpConnectionPoolTests.java | 25 - .../generated/TcpRetryPolicyTests.java | 25 - .../generated/TimeoutPolicyTests.java | 29 - .../generated/TracesConfigurationTests.java | 26 - .../generated/TrafficWeightTests.java | 33 - .../generated/UsageInnerTests.java | 34 - .../generated/UsageNameTests.java | 27 - .../generated/UsagesListMockTests.java | 59 - .../generated/UserAssignedIdentityTests.java | 23 - .../generated/VnetConfigurationTests.java | 35 - .../generated/VolumeMountTests.java | 31 - .../WorkloadProfileStatesCollectionTests.java | 35 - .../WorkloadProfileStatesInnerTests.java | 33 - .../WorkloadProfileStatesPropertiesTests.java | 31 - .../generated/WorkloadProfileTests.java | 33 - 625 files changed, 20795 insertions(+), 11706 deletions(-) create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsByContainerAppsClient.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsClient.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsPatchesClient.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSessionPoolsClient.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/FunctionsExtensionsClient.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentPrivateEndpointConnectionsClient.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentPrivateLinkResourcesClient.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsBuildProperties.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsBuildResourceInner.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsPatchResourceInner.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateEndpointConnectionInner.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateEndpointConnectionProperties.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateLinkResourceInner.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateLinkResourceProperties.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolInner.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolProperties.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolUpdatablePropertiesProperties.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildResourceImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsClientImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsClientImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchResourceImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesClientImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSessionPoolsClientImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSessionPoolsImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsClientImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateEndpointConnectionsClientImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateEndpointConnectionsImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateLinkResourcesClientImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateLinkResourcesImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PrivateEndpointConnectionImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PrivateLinkResourceImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SessionPoolImpl.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppPropertiesPatchingConfiguration.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildCollection.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildConfiguration.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildResource.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuilds.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildsByContainerApps.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatchResource.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatches.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSessionPools.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerExecutionStatus.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerType.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomContainerTemplate.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/DynamicPoolConfiguration.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExecutionStatus.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExecutionType.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/FunctionsExtensions.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentitySettings.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentitySettingsLifeCycle.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ImageType.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentIngress.java rename sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/{fluent => }/models/JavaComponentProperties.java (75%) create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Kind.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Level.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoggerSetting.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPrivateEndpointConnections.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPrivateLinkResources.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerTrafficConfiguration.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NacosComponent.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/PatchSkipConfig.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/PatchingMode.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PoolManagementType.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpoint.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnection.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnectionListResult.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnectionProvisioningState.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointServiceConnectionStatus.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkResource.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkResourceListResult.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkServiceConnectionState.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaExecutionStatus.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Runtime.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeDotnet.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJava.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgent.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgentLogging.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleConfiguration.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretAutoGenerated.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionContainer.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionContainerResources.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionIngress.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionNetworkConfiguration.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionNetworkStatus.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPool.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolCollection.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolProvisioningState.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolUpdatableProperties.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionRegistryCredentials.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringBootAdminComponent.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudConfigComponent.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudEurekaComponent.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppListSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsDeleteSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplySamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesDeleteSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesSkipConfigureSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsCreateOrUpdateSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsDeleteSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsGetByResourceGroupSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListByResourceGroupSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsUpdateSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionInvokeFunctionsHostSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsDeleteSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsGetSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsListSamples.java create mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateLinkResourcesListSamples.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/AppInsightsConfigurationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppResilienciesDeleteWithResponseMockTests.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/BlobStorageTokenStoreTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildConfigurationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderCollectionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdatePropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdateTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListMockTests.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/CircuitBreakerPolicyTests.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/ContainerRegistryTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryWithCustomImageTests.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/DaprComponentResiliencyPoliciesCollectionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfigurationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyConfigurationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryBackOffConfigurationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryPolicyConfigurationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyTimeoutPolicyConfigurationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentServiceBindingTests.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/DaprServiceBindMetadataTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionBulkSubscribeOptionsTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRouteRuleTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRoutesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCollectionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListMockTests.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/DotNetComponentConfigurationPropertyTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentServiceBindTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCollectionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVariableTests.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/HeaderMatchMatchTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpConnectionPoolTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpGetTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpRetryPolicyRetryBackOffTests.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/IngressPortMappingTests.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/JavaComponentConfigurationPropertyTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentServiceBindTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCollectionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListMockTests.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/JobExecutionInnerTests.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/JobsGetDetectorWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsWithResponseMockTests.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/ListUsagesResultTests.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/LogsConfigurationTests.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/ManagedEnvironmentUsagesListMockTests.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/MetricsConfigurationTests.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/NfsAzureFilePropertiesTests.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/PreBuildStepTests.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/ResourceProvidersGetCustomDomainVerificationIdWithResponseMockTests.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/ServiceTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpConnectionPoolTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpRetryPolicyTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TimeoutPolicyTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TracesConfigurationTests.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/UsageInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageNameTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsagesListMockTests.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 2d8837938fff..a8fe772df229 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.8 (Unreleased) +## 1.0.0-beta.1 (2024-05-23) + +- Azure Resource Manager ContainerAppsApi client library for Java. This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource. Package tag package-preview-2024-02. 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 59a801fc4d04..7867a4afb7f2 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-preview-2023-11. 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. Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource. Package tag package-preview-2024-02. 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.7 + 1.0.0-beta.8 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md index bb9e2e0bf3b2..9d55f7bc0e37 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md @@ -102,6 +102,15 @@ - [Get](#containerappsauthconfigs_get) - [ListByContainerApp](#containerappsauthconfigs_listbycontainerapp) +## ContainerAppsBuilds + +- [Delete](#containerappsbuilds_delete) +- [Get](#containerappsbuilds_get) + +## ContainerAppsBuildsByContainerApp + +- [List](#containerappsbuildsbycontainerapp_list) + ## ContainerAppsDiagnostics - [GetDetector](#containerappsdiagnostics_getdetector) @@ -110,6 +119,14 @@ - [ListDetectors](#containerappsdiagnostics_listdetectors) - [ListRevisions](#containerappsdiagnostics_listrevisions) +## ContainerAppsPatches + +- [Apply](#containerappspatches_apply) +- [Delete](#containerappspatches_delete) +- [Get](#containerappspatches_get) +- [ListByContainerApp](#containerappspatches_listbycontainerapp) +- [SkipConfigure](#containerappspatches_skipconfigure) + ## ContainerAppsRevisionReplicas - [GetReplica](#containerappsrevisionreplicas_getreplica) @@ -123,6 +140,15 @@ - [ListRevisions](#containerappsrevisions_listrevisions) - [RestartRevision](#containerappsrevisions_restartrevision) +## ContainerAppsSessionPools + +- [CreateOrUpdate](#containerappssessionpools_createorupdate) +- [Delete](#containerappssessionpools_delete) +- [GetByResourceGroup](#containerappssessionpools_getbyresourcegroup) +- [List](#containerappssessionpools_list) +- [ListByResourceGroup](#containerappssessionpools_listbyresourcegroup) +- [Update](#containerappssessionpools_update) + ## ContainerAppsSourceControls - [CreateOrUpdate](#containerappssourcecontrols_createorupdate) @@ -160,6 +186,10 @@ - [List](#dotnetcomponents_list) - [Update](#dotnetcomponents_update) +## FunctionsExtension + +- [InvokeFunctionsHost](#functionsextension_invokefunctionshost) + ## JavaComponents - [CreateOrUpdate](#javacomponents_createorupdate) @@ -201,6 +231,17 @@ - [GetDetector](#managedenvironmentdiagnostics_getdetector) - [ListDetectors](#managedenvironmentdiagnostics_listdetectors) +## ManagedEnvironmentPrivateEndpointConnections + +- [CreateOrUpdate](#managedenvironmentprivateendpointconnections_createorupdate) +- [Delete](#managedenvironmentprivateendpointconnections_delete) +- [Get](#managedenvironmentprivateendpointconnections_get) +- [List](#managedenvironmentprivateendpointconnections_list) + +## ManagedEnvironmentPrivateLinkResources + +- [List](#managedenvironmentprivatelinkresources_list) + ## ManagedEnvironmentUsages - [List](#managedenvironmentusages_list) @@ -260,9 +301,7 @@ import java.util.Arrays; */ public final class AppResiliencyCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_CreateOrUpdate - * .json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_CreateOrUpdate.json */ /** * Sample code: Create or Update App Resiliency. @@ -271,20 +310,27 @@ public final class AppResiliencyCreateOrUpdateSamples { */ public static void createOrUpdateAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.appResiliencies().define("resiliency-policy-1").withExistingContainerApp("rg", "testcontainerApp0") + manager.appResiliencies() + .define("resiliency-policy-1") + .withExistingContainerApp("rg", "testcontainerApp0") .withTimeoutPolicy(new TimeoutPolicy().withResponseTimeoutInSeconds(15).withConnectionTimeoutInSeconds(5)) - .withHttpRetryPolicy(new HttpRetryPolicy().withMaxRetries(5).withInitialDelayInMilliseconds(1000L) - .withMaxIntervalInMilliseconds(10000L) - .withHeaders( - Arrays.asList(new HeaderMatch().withHeaderProperty("X-Content-Type").withPrefixMatch("GOATS"))) - .withHttpStatusCodes(Arrays.asList(502, 503)).withErrors( - Arrays.asList("5xx", "connect-failure", "reset", "retriable-headers", "retriable-status-codes"))) + .withHttpRetryPolicy( + new HttpRetryPolicy().withMaxRetries(5) + .withInitialDelayInMilliseconds(1000L) + .withMaxIntervalInMilliseconds(10000L) + .withHeaders( + Arrays.asList(new HeaderMatch().withHeaderProperty("X-Content-Type").withPrefixMatch("GOATS"))) + .withHttpStatusCodes(Arrays.asList(502, 503)) + .withErrors(Arrays.asList("5xx", "connect-failure", "reset", "retriable-headers", + "retriable-status-codes"))) .withTcpRetryPolicy(new TcpRetryPolicy().withMaxConnectAttempts(3)) - .withCircuitBreakerPolicy(new CircuitBreakerPolicy().withConsecutiveErrors(5).withIntervalInSeconds(10) + .withCircuitBreakerPolicy(new CircuitBreakerPolicy().withConsecutiveErrors(5) + .withIntervalInSeconds(10) .withMaxEjectionPercent(50)) .withHttpConnectionPool( new HttpConnectionPool().withHttp1MaxPendingRequests(1024).withHttp2MaxRequests(1024)) - .withTcpConnectionPool(new TcpConnectionPool().withMaxConnections(100)).create(); + .withTcpConnectionPool(new TcpConnectionPool().withMaxConnections(100)) + .create(); } } ``` @@ -297,8 +343,7 @@ public final class AppResiliencyCreateOrUpdateSamples { */ public final class AppResiliencyDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Delete.json */ /** * Sample code: Delete App Resiliency. @@ -306,8 +351,8 @@ public final class AppResiliencyDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.appResiliencies().deleteWithResponse("rg", "testcontainerApp0", "resiliency-policy-1", - com.azure.core.util.Context.NONE); + manager.appResiliencies() + .deleteWithResponse("rg", "testcontainerApp0", "resiliency-policy-1", com.azure.core.util.Context.NONE); } } ``` @@ -320,8 +365,7 @@ public final class AppResiliencyDeleteSamples { */ public final class AppResiliencyGetSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Get.json */ /** * Sample code: Get App Resiliency. @@ -329,8 +373,8 @@ public final class AppResiliencyGetSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.appResiliencies().getWithResponse("rg", "testcontainerApp0", "resiliency-policy-1", - com.azure.core.util.Context.NONE); + manager.appResiliencies() + .getWithResponse("rg", "testcontainerApp0", "resiliency-policy-1", com.azure.core.util.Context.NONE); } } ``` @@ -343,8 +387,7 @@ public final class AppResiliencyGetSamples { */ public final class AppResiliencyListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_List.json */ /** * Sample code: List App Resiliency. @@ -368,8 +411,7 @@ import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; */ public final class AppResiliencyUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Patch.json */ /** * Sample code: Update App Resiliency. @@ -395,8 +437,7 @@ public final class AppResiliencyUpdateSamples { */ public final class AvailableWorkloadProfilesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * AvailableWorkloadProfiles_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AvailableWorkloadProfiles_Get.json */ /** * Sample code: BillingMeters_Get. @@ -417,8 +458,7 @@ public final class AvailableWorkloadProfilesGetSamples { */ public final class BillingMetersGetSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/BillingMeters_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/BillingMeters_Get.json */ /** * Sample code: BillingMeters_Get. @@ -439,8 +479,7 @@ public final class BillingMetersGetSamples { */ public final class BuildAuthTokenListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_ListAuthToken.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_ListAuthToken.json */ /** * Sample code: Get Build Auth Token. @@ -469,8 +508,7 @@ import java.util.Map; */ public final class BuildersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_CreateOrUpdate.json */ /** * Sample code: Builders_CreateOrUpdate_0. @@ -479,7 +517,10 @@ public final class BuildersCreateOrUpdateSamples { */ public static void buildersCreateOrUpdate0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builders().define("testBuilder").withRegion("eastus").withExistingResourceGroup("rg") + manager.builders() + .define("testBuilder") + .withRegion("eastus") + .withExistingResourceGroup("rg") .withTags(mapOf("company", "Microsoft")) .withIdentity(new ManagedServiceIdentity() .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) @@ -488,11 +529,13 @@ public final class BuildersCreateOrUpdateSamples { 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( + .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"))) + new ContainerRegistry().withContainerRegistryServer("test2.azurecr.io") + .withIdentityResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"))) .create(); } @@ -518,8 +561,7 @@ public final class BuildersCreateOrUpdateSamples { */ public final class BuildersDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_Delete.json */ /** * Sample code: Builders_Delete_0. @@ -540,8 +582,7 @@ public final class BuildersDeleteSamples { */ public final class BuildersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_Get.json */ /** * Sample code: Builders_Get_0. @@ -562,9 +603,7 @@ public final class BuildersGetByResourceGroupSamples { */ public final class BuildersListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_ListBySubscription. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_ListBySubscription.json */ /** * Sample code: Builders_ListBySubscription_0. @@ -586,9 +625,7 @@ public final class BuildersListSamples { */ public final class BuildersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_ListByResourceGroup - * .json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_ListByResourceGroup.json */ /** * Sample code: Builders_ListByResourceGroup_0. @@ -614,8 +651,7 @@ import java.util.Map; */ public final class BuildersUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_Update.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_Update.json */ /** * Sample code: Builders_Update_0. @@ -624,7 +660,8 @@ public final class BuildersUpdateSamples { */ public static void buildersUpdate0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { BuilderResource resource = manager.builders() - .getByResourceGroupWithResponse("rg", "testBuilder", com.azure.core.util.Context.NONE).getValue(); + .getByResourceGroupWithResponse("rg", "testBuilder", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("mytag1", "myvalue1")).apply(); } @@ -657,8 +694,7 @@ import java.util.Arrays; */ public final class BuildsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_CreateOrUpdate.json */ /** * Sample code: Builds_CreateOrUpdate_WithConfig. @@ -667,30 +703,32 @@ public final class BuildsCreateOrUpdateSamples { */ public static void buildsCreateOrUpdateWithConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builds().define("testBuild-123456789az").withExistingBuilder("rg", "testBuilder") + 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")))))) + .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-11-02-preview/examples/ - * Builds_CreateOrUpdate_NoConfig.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_CreateOrUpdate_NoConfig.json */ /** * Sample code: Builds_CreateOrUpdate_NoConfig. @@ -712,8 +750,7 @@ public final class BuildsCreateOrUpdateSamples { */ public final class BuildsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_Delete.json */ /** * Sample code: Builds_Delete_0. @@ -734,8 +771,7 @@ public final class BuildsDeleteSamples { */ public final class BuildsGetSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_Get.json */ /** * Sample code: Builds_Get_0. @@ -756,9 +792,7 @@ public final class BuildsGetSamples { */ public final class BuildsByBuilderResourceListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_ListByBuilderResource - * .json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_ListByBuilderResource.json */ /** * Sample code: Builds_ListByBuilderResource_0. @@ -785,8 +819,7 @@ import com.azure.resourcemanager.appcontainers.models.CertificateType; */ public final class CertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * Certificate_CreateOrUpdate_FromKeyVault.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificate_CreateOrUpdate_FromKeyVault.json */ /** * Sample code: Create or Update Certificate using Managed Identity. @@ -795,19 +828,19 @@ public final class CertificatesCreateOrUpdateSamples { */ public static void createOrUpdateCertificateUsingManagedIdentity( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates().createOrUpdateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - new CertificateInner().withLocation("East US").withProperties(new CertificateProperties() - .withCertificateKeyVaultProperties(new CertificateKeyVaultProperties().withIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/microsoft.managedidentity/userassignedidentities/test-user-mi") - .withKeyVaultUrl("fakeTokenPlaceholder")) - .withCertificateType(CertificateType.SERVER_SSLCERTIFICATE)), - com.azure.core.util.Context.NONE); + manager.certificates() + .createOrUpdateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + new CertificateInner().withLocation("East US") + .withProperties(new CertificateProperties() + .withCertificateKeyVaultProperties(new CertificateKeyVaultProperties().withIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/microsoft.managedidentity/userassignedidentities/test-user-mi") + .withKeyVaultUrl("fakeTokenPlaceholder")) + .withCertificateType(CertificateType.SERVER_SSLCERTIFICATE)), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificate_CreateOrUpdate. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -816,11 +849,13 @@ public final class CertificatesCreateOrUpdateSamples { */ public static void createOrUpdateCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates().createOrUpdateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - new CertificateInner().withLocation("East US") - .withProperties(new CertificateProperties().withPassword("fakeTokenPlaceholder") - .withValue("Y2VydA==".getBytes()).withCertificateType(CertificateType.IMAGE_PULL_TRUSTED_CA)), - com.azure.core.util.Context.NONE); + manager.certificates() + .createOrUpdateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + new CertificateInner().withLocation("East US") + .withProperties(new CertificateProperties().withPassword("fakeTokenPlaceholder") + .withValue("Y2VydA==".getBytes()) + .withCertificateType(CertificateType.IMAGE_PULL_TRUSTED_CA)), + com.azure.core.util.Context.NONE); } } ``` @@ -833,8 +868,7 @@ public final class CertificatesCreateOrUpdateSamples { */ public final class CertificatesDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -842,8 +876,9 @@ public final class CertificatesDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates().deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - com.azure.core.util.Context.NONE); + manager.certificates() + .deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } ``` @@ -856,8 +891,7 @@ public final class CertificatesDeleteSamples { */ public final class CertificatesGetSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificate_Get.json */ /** * Sample code: Get Certificate. @@ -865,8 +899,9 @@ public final class CertificatesGetSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates().getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - com.azure.core.util.Context.NONE); + manager.certificates() + .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } ``` @@ -879,8 +914,7 @@ public final class CertificatesGetSamples { */ public final class CertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * Certificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificates_ListByManagedEnvironment.json */ /** * Sample code: List Certificates by Managed Environment. @@ -906,8 +940,7 @@ import java.util.Map; */ public final class CertificatesUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificates_Patch.json */ /** * Sample code: Patch Certificate. @@ -915,9 +948,10 @@ public final class CertificatesUpdateSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates().updateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), - com.azure.core.util.Context.NONE); + manager.certificates() + .updateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available @@ -944,8 +978,7 @@ import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReque */ public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsCertificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -955,8 +988,9 @@ public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { public static void certificatesCheckNameAvailability(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.connectedEnvironments() - .checkNameAvailabilityWithResponse("examplerg", "testcontainerenv", new CheckNameAvailabilityRequest() - .withName("testcertificatename").withType("Microsoft.App/connectedEnvironments/certificates"), + .checkNameAvailabilityWithResponse("examplerg", "testcontainerenv", + new CheckNameAvailabilityRequest().withName("testcertificatename") + .withType("Microsoft.App/connectedEnvironments/certificates"), com.azure.core.util.Context.NONE); } } @@ -972,8 +1006,7 @@ import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; */ public final class ConnectedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create kube environments. @@ -981,12 +1014,16 @@ public final class ConnectedEnvironmentsCreateOrUpdateSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void createKubeEnvironments(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().define("testenv").withRegion("East US").withExistingResourceGroup("examplerg") + manager.connectedEnvironments() + .define("testenv") + .withRegion("East US") + .withExistingResourceGroup("examplerg") .withStaticIp("1.2.3.4") .withDaprAIConnectionString( "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("www.my-name.com") - .withCertificateValue("Y2VydA==".getBytes()).withCertificatePassword("fakeTokenPlaceholder")) + .withCertificateValue("Y2VydA==".getBytes()) + .withCertificatePassword("fakeTokenPlaceholder")) .create(); } } @@ -1000,9 +1037,7 @@ public final class ConnectedEnvironmentsCreateOrUpdateSamples { */ public final class ConnectedEnvironmentsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironments_Delete - * .json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironments_Delete.json */ /** * Sample code: Delete connected environment by connectedEnvironmentName. @@ -1024,9 +1059,7 @@ public final class ConnectedEnvironmentsDeleteSamples { */ public final class ConnectedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironments_Get. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironments_Get.json */ /** * Sample code: Get connected environment by connectedEnvironmentName. @@ -1035,8 +1068,8 @@ public final class ConnectedEnvironmentsGetByResourceGroupSamples { */ public static void getConnectedEnvironmentByConnectedEnvironmentName( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().getByResourceGroupWithResponse("examplerg", "examplekenv", - com.azure.core.util.Context.NONE); + manager.connectedEnvironments() + .getByResourceGroupWithResponse("examplerg", "examplekenv", com.azure.core.util.Context.NONE); } } ``` @@ -1049,8 +1082,7 @@ public final class ConnectedEnvironmentsGetByResourceGroupSamples { */ public final class ConnectedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironments_ListBySubscription.json */ /** * Sample code: List connected environments by subscription. @@ -1072,8 +1104,7 @@ public final class ConnectedEnvironmentsListSamples { */ public final class ConnectedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. @@ -1095,9 +1126,7 @@ public final class ConnectedEnvironmentsListByResourceGroupSamples { */ public final class ConnectedEnvironmentsUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironments_Patch. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. @@ -1121,8 +1150,7 @@ import com.azure.resourcemanager.appcontainers.models.CertificateProperties; */ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsCertificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -1131,7 +1159,9 @@ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { */ public static void createOrUpdateCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsCertificates().define("certificate-firendly-name").withRegion("East US") + manager.connectedEnvironmentsCertificates() + .define("certificate-firendly-name") + .withRegion("East US") .withExistingConnectedEnvironment("examplerg", "testcontainerenv") .withProperties( new CertificateProperties().withPassword("fakeTokenPlaceholder").withValue("Y2VydA==".getBytes())) @@ -1148,8 +1178,7 @@ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { */ public final class ConnectedEnvironmentsCertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsCertificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsCertificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -1157,8 +1186,9 @@ public final class ConnectedEnvironmentsCertificatesDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsCertificates().deleteWithResponse("examplerg", "testcontainerenv", - "certificate-firendly-name", com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsCertificates() + .deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } ``` @@ -1171,8 +1201,7 @@ public final class ConnectedEnvironmentsCertificatesDeleteSamples { */ public final class ConnectedEnvironmentsCertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsCertificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsCertificate_Get.json */ /** * Sample code: Get Certificate. @@ -1180,8 +1209,9 @@ public final class ConnectedEnvironmentsCertificatesGetSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsCertificates().getWithResponse("examplerg", "testcontainerenv", - "certificate-firendly-name", com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsCertificates() + .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } ``` @@ -1194,8 +1224,7 @@ public final class ConnectedEnvironmentsCertificatesGetSamples { */ public final class ConnectedEnvironmentsCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json */ /** * Sample code: List Certificates by Connected Environment. @@ -1204,8 +1233,8 @@ public final class ConnectedEnvironmentsCertificatesListSamples { */ public static void listCertificatesByConnectedEnvironment( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsCertificates().list("examplerg", "testcontainerenv", - com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsCertificates() + .list("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE); } } ``` @@ -1222,8 +1251,7 @@ import java.util.Map; */ public final class ConnectedEnvironmentsCertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsCertificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsCertificates_Patch.json */ /** * Sample code: Patch Certificate. @@ -1231,8 +1259,10 @@ public final class ConnectedEnvironmentsCertificatesUpdateSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - Certificate resource = manager.connectedEnvironmentsCertificates().getWithResponse("examplerg", - "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE).getValue(); + Certificate resource = manager.connectedEnvironmentsCertificates() + .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @@ -1264,8 +1294,7 @@ import java.util.Arrays; */ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json */ /** * Sample code: Create or update dapr component. @@ -1274,9 +1303,13 @@ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { */ public static void createOrUpdateDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsDaprComponents().define("reddog") - .withExistingConnectedEnvironment("examplerg", "myenvironment").withComponentType("state.azure.cosmosdb") - .withVersion("v1").withIgnoreErrors(false).withInitTimeout("50s") + manager.connectedEnvironmentsDaprComponents() + .define("reddog") + .withExistingConnectedEnvironment("examplerg", "myenvironment") + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), new DaprMetadata().withName("database").withValue("itemsDB"), @@ -1300,8 +1333,7 @@ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { */ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsDaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json */ /** * Sample code: Delete dapr component. @@ -1309,8 +1341,8 @@ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsDaprComponents().deleteWithResponse("examplerg", "myenvironment", "reddog", - com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsDaprComponents() + .deleteWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } ``` @@ -1323,8 +1355,7 @@ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { */ public final class ConnectedEnvironmentsDaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsDaprComponents_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json */ /** * Sample code: Get Dapr Component. @@ -1332,8 +1363,8 @@ public final class ConnectedEnvironmentsDaprComponentsGetSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsDaprComponents().getWithResponse("examplerg", "myenvironment", "reddog", - com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsDaprComponents() + .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } ``` @@ -1346,8 +1377,7 @@ public final class ConnectedEnvironmentsDaprComponentsGetSamples { */ public final class ConnectedEnvironmentsDaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsDaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsDaprComponents_List.json */ /** * Sample code: List Dapr Components. @@ -1355,8 +1385,8 @@ public final class ConnectedEnvironmentsDaprComponentsListSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void listDaprComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsDaprComponents().list("examplerg", "myenvironment", - com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsDaprComponents() + .list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); } } ``` @@ -1369,8 +1399,7 @@ public final class ConnectedEnvironmentsDaprComponentsListSamples { */ public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsDaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -1379,8 +1408,8 @@ public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { */ public static void listContainerAppsSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsDaprComponents().listSecretsWithResponse("examplerg", "myenvironment", "reddog", - com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsDaprComponents() + .listSecretsWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } ``` @@ -1397,8 +1426,7 @@ import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorag */ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. @@ -1407,11 +1435,14 @@ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { */ public static void createOrUpdateEnvironmentsStorage(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages().define("jlaw-demo1") + manager.connectedEnvironmentsStorages() + .define("jlaw-demo1") .withExistingConnectedEnvironment("examplerg", "env") - .withProperties(new ConnectedEnvironmentStorageProperties().withAzureFile( - new AzureFileProperties().withAccountName("account1").withAccountKey("fakeTokenPlaceholder") - .withAccessMode(AccessMode.READ_ONLY).withShareName("share1"))) + .withProperties(new ConnectedEnvironmentStorageProperties() + .withAzureFile(new AzureFileProperties().withAccountName("account1") + .withAccountKey("fakeTokenPlaceholder") + .withAccessMode(AccessMode.READ_ONLY) + .withShareName("share1"))) .create(); } } @@ -1425,8 +1456,7 @@ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { */ public final class ConnectedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. @@ -1435,8 +1465,8 @@ public final class ConnectedEnvironmentsStoragesDeleteSamples { */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages().deleteWithResponse("examplerg", "env", "jlaw-demo1", - com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsStorages() + .deleteWithResponse("examplerg", "env", "jlaw-demo1", com.azure.core.util.Context.NONE); } } ``` @@ -1449,8 +1479,7 @@ public final class ConnectedEnvironmentsStoragesDeleteSamples { */ public final class ConnectedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. @@ -1459,8 +1488,8 @@ public final class ConnectedEnvironmentsStoragesGetSamples { */ public static void getAEnvironmentsStoragePropertiesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages().getWithResponse("examplerg", "env", "jlaw-demo1", - com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsStorages() + .getWithResponse("examplerg", "env", "jlaw-demo1", com.azure.core.util.Context.NONE); } } ``` @@ -1473,8 +1502,7 @@ public final class ConnectedEnvironmentsStoragesGetSamples { */ public final class ConnectedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. @@ -1483,8 +1511,8 @@ public final class ConnectedEnvironmentsStoragesListSamples { */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages().listWithResponse("examplerg", "managedEnv", - com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsStorages() + .listWithResponse("examplerg", "managedEnv", com.azure.core.util.Context.NONE); } } ``` @@ -1493,6 +1521,7 @@ public final class ConnectedEnvironmentsStoragesListSamples { ```java import com.azure.resourcemanager.appcontainers.models.Action; +import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; import com.azure.resourcemanager.appcontainers.models.Affinity; import com.azure.resourcemanager.appcontainers.models.AppProtocol; import com.azure.resourcemanager.appcontainers.models.BindingType; @@ -1502,6 +1531,7 @@ 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.ContainerAppPropertiesPatchingConfiguration; import com.azure.resourcemanager.appcontainers.models.ContainerResources; import com.azure.resourcemanager.appcontainers.models.CorsPolicy; import com.azure.resourcemanager.appcontainers.models.CustomDomain; @@ -1509,6 +1539,9 @@ import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; import com.azure.resourcemanager.appcontainers.models.Dapr; import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; +import com.azure.resourcemanager.appcontainers.models.IdentitySettings; +import com.azure.resourcemanager.appcontainers.models.IdentitySettingsLifeCycle; +import com.azure.resourcemanager.appcontainers.models.ImageType; import com.azure.resourcemanager.appcontainers.models.Ingress; import com.azure.resourcemanager.appcontainers.models.IngressClientCertificateMode; import com.azure.resourcemanager.appcontainers.models.IngressPortMapping; @@ -1516,7 +1549,19 @@ import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; +import com.azure.resourcemanager.appcontainers.models.Kind; +import com.azure.resourcemanager.appcontainers.models.Level; +import com.azure.resourcemanager.appcontainers.models.LoggerSetting; import com.azure.resourcemanager.appcontainers.models.LogLevel; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.appcontainers.models.PatchingMode; +import com.azure.resourcemanager.appcontainers.models.QueueScaleRule; +import com.azure.resourcemanager.appcontainers.models.Runtime; +import com.azure.resourcemanager.appcontainers.models.RuntimeDotnet; +import com.azure.resourcemanager.appcontainers.models.RuntimeJava; +import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgent; +import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging; import com.azure.resourcemanager.appcontainers.models.Scale; import com.azure.resourcemanager.appcontainers.models.ScaleRule; import com.azure.resourcemanager.appcontainers.models.Service; @@ -1526,6 +1571,7 @@ import com.azure.resourcemanager.appcontainers.models.TcpScaleRule; import com.azure.resourcemanager.appcontainers.models.Template; import com.azure.resourcemanager.appcontainers.models.TrafficWeight; import com.azure.resourcemanager.appcontainers.models.Type; +import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; import com.azure.resourcemanager.appcontainers.models.Volume; import com.azure.resourcemanager.appcontainers.models.VolumeMount; import java.util.Arrays; @@ -1537,8 +1583,124 @@ import java.util.Map; */ public final class ContainerAppsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ContainerApps_CreateOrUpdate_ConnectedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_SourceToCloudApp_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update SourceToCloud App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateSourceToCloudApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps() + .define("testcontainerApp0") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withWorkloadProfileName("My-GP-01") + .withPatchingConfiguration( + new ContainerAppPropertiesPatchingConfiguration().withPatchingMode(PatchingMode.AUTOMATIC)) + .withConfiguration( + new Configuration() + .withIngress(new Ingress().withExternal(true) + .withTargetPort(3000) + .withTraffic(Arrays.asList(new TrafficWeight() + .withRevisionName("testcontainerApp0-ab1234") + .withWeight(100) + .withLabel("production"))) + .withCustomDomains(Arrays.asList(new CustomDomain() + .withName("www.my-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + new CustomDomain().withName("www.my-other-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions( + Arrays + .asList( + new IpSecurityRestrictionRule().withName("Allow work IP A subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32") + .withAction(Action.ALLOW), + new IpSecurityRestrictionRule().withName("Allow work IP B subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8") + .withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) + .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) + .withCorsPolicy(new CorsPolicy() + .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) + .withAllowedMethods(Arrays.asList("GET", "POST")) + .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) + .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")) + .withMaxAge(1234) + .withAllowCredentials(true)) + .withAdditionalPortMappings(Arrays.asList( + new IngressPortMapping().withExternal(true).withTargetPort(1234), + new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) + .withDapr(new Dapr().withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withMaxInactiveRevisions(10) + .withService(new Service().withType("redis"))) + .withTemplate(new Template() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers(Arrays.asList(new Container() + .withImage("") + .withImageType(ImageType.CLOUD_BUILD) + .withName("testcontainerApp0") + .withVolumeMounts( + Arrays.asList( + new VolumeMount().withVolumeName("azurefile") + .withMountPath("/mnt/path1") + .withSubPath("subPath1"), + new VolumeMount() + .withVolumeName("nfsazurefile") + .withMountPath("/mnt/path2") + .withSubPath("subPath2"))) + .withProbes( + Arrays.asList(new ContainerAppProbe().withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders( + Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") + .withValue("Awesome"))) + .withPath("/health") + .withPort(8080)).withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withScale( + new Scale().withMinReplicas(1) + .withMaxReplicas(5) + .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule") + .withCustom(new CustomScaleRule().withType("http") + .withMetadata(mapOf("concurrentRequests", "50")))))) + .withVolumes(Arrays.asList( + new Volume().withName("azurefile") + .withStorageType(StorageType.AZURE_FILE) + .withStorageName("storage"), + new Volume().withName("nfsazurefile") + .withStorageType(StorageType.NFS_AZURE_FILE) + .withStorageName("nfsStorage"))) + .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") + .withName("redisService") + .withClientType("dotnet") + .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_CreateOrUpdate_ConnectedEnvironment.json */ /** * Sample code: Create or Update App On A Connected Environment. @@ -1547,68 +1709,98 @@ public final class ContainerAppsCreateOrUpdateSamples { */ public static void createOrUpdateAppOnAConnectedEnvironment( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().define("testcontainerApp0").withRegion("East US").withExistingResourceGroup("rg") + manager.containerApps() + .define("testcontainerApp0") + .withRegion("East US") + .withExistingResourceGroup("rg") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation") .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube") - .withConfiguration(new Configuration().withIngress(new Ingress().withExternal(true).withTargetPort(3000) - .withTraffic(Arrays.asList(new TrafficWeight().withRevisionName("testcontainerApp0-ab1234") - .withWeight(100).withLabel("production"))) - .withCustomDomains(Arrays.asList(new CustomDomain().withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED).withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain().withName("www.my-other-name.com").withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions(Arrays.asList( - new IpSecurityRestrictionRule().withName("Allow work IP A subnet") - .withDescription("Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/32").withAction(Action.ALLOW), - new IpSecurityRestrictionRule().withName("Allow work IP B subnet") - .withDescription("Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/8").withAction(Action.ALLOW))) - .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) - .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) - .withCorsPolicy(new CorsPolicy() - .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) - .withAllowedMethods(Arrays.asList("GET", "POST")) - .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) - .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")).withMaxAge(1234).withAllowCredentials(true)) - .withAdditionalPortMappings( - Arrays.asList(new IngressPortMapping().withExternal(true).withTargetPort(1234), - new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) - .withDapr( - new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) - .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel( - LogLevel.DEBUG) + .withConfiguration( + new Configuration() + .withIngress(new Ingress().withExternal(true) + .withTargetPort(3000) + .withTraffic(Arrays.asList(new TrafficWeight() + .withRevisionName("testcontainerApp0-ab1234") + .withWeight(100) + .withLabel("production"))) + .withCustomDomains(Arrays.asList(new CustomDomain() + .withName("www.my-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + new CustomDomain().withName("www.my-other-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions( + Arrays + .asList( + new IpSecurityRestrictionRule().withName("Allow work IP A subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32") + .withAction(Action.ALLOW), + new IpSecurityRestrictionRule().withName("Allow work IP B subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8") + .withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) + .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) + .withCorsPolicy(new CorsPolicy() + .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) + .withAllowedMethods(Arrays.asList("GET", "POST")) + .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) + .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")) + .withMaxAge(1234) + .withAllowCredentials(true)) + .withAdditionalPortMappings(Arrays.asList( + new IngressPortMapping().withExternal(true).withTargetPort(1234), + new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) + .withDapr(new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) .withEnableApiLogging(true)) - .withMaxInactiveRevisions(10)) + .withRuntime(new Runtime().withJava(new RuntimeJava().withEnableMetrics(true) + .withJavaAgent(new RuntimeJavaAgent().withEnabled(true) + .withLogging(new RuntimeJavaAgentLogging().withLoggerSettings(Arrays.asList( + new LoggerSetting().withLogger("org.springframework.boot").withLevel(Level.DEBUG)))))) + .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) + .withMaxInactiveRevisions(10)) .withTemplate(new Template() .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0").withCommand(Arrays.asList("/bin/sh")) + .withName("testinitcontainerApp0") + .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( - Arrays - .asList(new Container().withImage("repo/testcontainerApp0:v1").withName("testcontainerApp0") - .withProbes(Arrays.asList(new ContainerAppProbe() - .withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header").withValue("Awesome"))) - .withPath("/health").withPort(8080)) - .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) - .withScale(new Scale().withMinReplicas(1).withMaxReplicas(5) - .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule").withCustom( - new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50"))))))) + .withContainers(Arrays.asList(new Container() + .withImage("repo/testcontainerApp0:v1") + .withName("testcontainerApp0") + .withProbes( + Arrays.asList(new ContainerAppProbe().withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders( + Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") + .withValue("Awesome"))) + .withPath("/health") + .withPort(8080)).withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withScale( + new Scale().withMinReplicas(1) + .withMaxReplicas(5) + .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule") + .withCustom(new CustomScaleRule().withType("http") + .withMetadata(mapOf("concurrentRequests", "50"))))))) .create(); } /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_CreateOrUpdate - * .json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App. @@ -1617,77 +1809,141 @@ public final class ContainerAppsCreateOrUpdateSamples { */ public static void createOrUpdateContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().define("testcontainerApp0").withRegion("East US").withExistingResourceGroup("rg") + manager.containerApps() + .define("testcontainerApp0") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withIdentity(new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", + new UserAssignedIdentity()))) .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withWorkloadProfileName( - "My-GP-01") - .withConfiguration(new Configuration().withIngress(new Ingress().withExternal(true).withTargetPort(3000) - .withTraffic(Arrays.asList(new TrafficWeight().withRevisionName("testcontainerApp0-ab1234") - .withWeight(100).withLabel("production"))) - .withCustomDomains(Arrays.asList(new CustomDomain().withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED).withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain().withName("www.my-other-name.com").withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions(Arrays.asList( - new IpSecurityRestrictionRule().withName("Allow work IP A subnet") - .withDescription("Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/32").withAction(Action.ALLOW), - new IpSecurityRestrictionRule().withName("Allow work IP B subnet") - .withDescription("Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/8").withAction(Action.ALLOW))) - .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) - .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) - .withCorsPolicy(new CorsPolicy() - .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) - .withAllowedMethods(Arrays.asList("GET", "POST")) - .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) - .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")).withMaxAge(1234).withAllowCredentials(true)) - .withAdditionalPortMappings( - Arrays.asList(new IngressPortMapping().withExternal(true).withTargetPort(1234), - new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) - .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) - .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(true)) - .withMaxInactiveRevisions(10).withService(new Service().withType("redis"))) + .withWorkloadProfileName("My-GP-01") + .withConfiguration( + new Configuration() + .withIngress(new Ingress().withExternal(true) + .withTargetPort(3000) + .withTraffic(Arrays.asList(new TrafficWeight() + .withRevisionName("testcontainerApp0-ab1234") + .withWeight(100) + .withLabel("production"))) + .withCustomDomains(Arrays.asList(new CustomDomain() + .withName("www.my-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + new CustomDomain().withName("www.my-other-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions( + Arrays + .asList( + new IpSecurityRestrictionRule().withName("Allow work IP A subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32") + .withAction(Action.ALLOW), + new IpSecurityRestrictionRule().withName("Allow work IP B subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8") + .withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) + .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) + .withCorsPolicy(new CorsPolicy() + .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) + .withAllowedMethods(Arrays.asList("GET", "POST")) + .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) + .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")) + .withMaxAge(1234) + .withAllowCredentials(true)) + .withAdditionalPortMappings(Arrays.asList( + new IngressPortMapping().withExternal(true).withTargetPort(1234), + new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) + .withDapr(new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withRuntime(new Runtime().withJava(new RuntimeJava() + .withEnableMetrics(true) + .withJavaAgent(new RuntimeJavaAgent() + .withEnabled(true) + .withLogging(new RuntimeJavaAgentLogging().withLoggerSettings( + Arrays.asList(new LoggerSetting().withLogger("org.springframework.boot") + .withLevel(Level.DEBUG)))))) + .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) + .withMaxInactiveRevisions(10) + .withService(new Service().withType("redis")) + .withIdentitySettings(Arrays.asList(new IdentitySettings().withIdentity( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity") + .withLifecycle(IdentitySettingsLifeCycle.ALL), + new IdentitySettings().withIdentity("system").withLifecycle(IdentitySettingsLifeCycle.INIT)))) .withTemplate(new Template() .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0").withCommand(Arrays.asList("/bin/sh")) + .withName("testinitcontainerApp0") + .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( - Arrays.asList(new Container().withImage("repo/testcontainerApp0:v1").withName("testcontainerApp0") - .withVolumeMounts(Arrays.asList( - new VolumeMount().withVolumeName("azurefile").withMountPath("/mnt/path1") + .withContainers(Arrays.asList(new Container() + .withImage("repo/testcontainerApp0:v1") + .withName("testcontainerApp0") + .withVolumeMounts( + Arrays.asList( + new VolumeMount().withVolumeName("azurefile") + .withMountPath("/mnt/path1") .withSubPath("subPath1"), - new VolumeMount().withVolumeName("nfsazurefile").withMountPath("/mnt/path2") + new VolumeMount() + .withVolumeName("nfsazurefile") + .withMountPath("/mnt/path2") .withSubPath("subPath2"))) - .withProbes(Arrays.asList(new ContainerAppProbe() - .withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header").withValue("Awesome"))) - .withPath("/health").withPort(8080)) - .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) - .withScale(new Scale().withMinReplicas(1).withMaxReplicas(5) - .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule").withCustom( - new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50")))))) + .withProbes( + Arrays.asList(new ContainerAppProbe().withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders( + Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") + .withValue("Awesome"))) + .withPath("/health") + .withPort(8080)).withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withScale(new Scale().withMinReplicas(1) + .withMaxReplicas(5) + .withRules(Arrays.asList( + new ScaleRule().withName("httpscalingrule") + .withCustom( + new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50"))), + new ScaleRule().withName("servicebus") + .withCustom(new CustomScaleRule().withType("azure-servicebus") + .withMetadata( + mapOf("messageCount", "5", "namespace", "mynamespace", "queueName", "myqueue")) + .withIdentity( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity")), + new ScaleRule().withName("azure-queue") + .withAzureQueue(new QueueScaleRule().withAccountName("account1") + .withQueueName("queue1") + .withQueueLength(1) + .withIdentity("system"))))) .withVolumes(Arrays.asList( - new Volume().withName("azurefile").withStorageType(StorageType.AZURE_FILE) + new Volume().withName("azurefile") + .withStorageType(StorageType.AZURE_FILE) .withStorageName("storage"), - new Volume().withName("nfsazurefile").withStorageType(StorageType.NFS_AZURE_FILE) + new Volume().withName("nfsazurefile") + .withStorageType(StorageType.NFS_AZURE_FILE) .withStorageName("nfsStorage"))) .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") - .withName("redisService").withClientType("dotnet") + .withName("redisService") + .withClientType("dotnet") .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ContainerApps_TcpApp_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json */ /** * Sample code: Create or Update Tcp App. @@ -1695,36 +1951,63 @@ public final class ContainerAppsCreateOrUpdateSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void createOrUpdateTcpApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().define("testcontainerAppTcp").withRegion("East US").withExistingResourceGroup("rg") + manager.containerApps() + .define("testcontainerAppTcp") + .withRegion("East US") + .withExistingResourceGroup("rg") .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") .withConfiguration( - new Configuration() - .withIngress( - new Ingress().withExternal(true).withTargetPort(3000).withExposedPort(4000) - .withTransport( - IngressTransportMethod.TCP) - .withTraffic( - Arrays - .asList( - new TrafficWeight().withRevisionName( - "testcontainerAppTcp-ab1234").withWeight( - 100))))) + new Configuration().withIngress(new Ingress().withExternal(true) + .withTargetPort(3000) + .withExposedPort(4000) + .withTransport(IngressTransportMethod.TCP) + .withTraffic(Arrays + .asList(new TrafficWeight().withRevisionName("testcontainerAppTcp-ab1234").withWeight(100))))) .withTemplate(new Template() .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppTcp:v1") .withName("testcontainerAppTcp") - .withProbes(Arrays.asList(new ContainerAppProbe().withInitialDelaySeconds(3).withPeriodSeconds(3) - .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)).withType(Type.LIVENESS))))) - .withScale( - new Scale().withMinReplicas(1).withMaxReplicas(5) - .withRules(Arrays.asList(new ScaleRule().withName("tcpscalingrule") - .withTcp(new TcpScaleRule().withMetadata(mapOf("concurrentConnections", "50"))))))) + .withProbes(Arrays.asList(new ContainerAppProbe().withInitialDelaySeconds(3) + .withPeriodSeconds(3) + .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) + .withType(Type.LIVENESS))))) + .withScale(new Scale().withMinReplicas(1) + .withMaxReplicas(5) + .withRules(Arrays.asList(new ScaleRule().withName("tcpscalingrule") + .withTcp(new TcpScaleRule().withMetadata(mapOf("concurrentConnections", "50"))))))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Kind_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update App Kind. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateAppKind(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps() + .define("testcontainerAppKind") + .withRegion("East Us") + .withExistingResourceGroup("rg") + .withManagedBy( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Web/sites/testcontainerAppKind") + .withKind(Kind.WORKFLOWAPP) + .withManagedEnvironmentId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/testmanagedenv3") + .withConfiguration(new Configuration().withActiveRevisionsMode(ActiveRevisionsMode.SINGLE) + .withIngress(new Ingress().withExternal(true).withTargetPort(80).withAllowInsecure(true))) + .withTemplate(new Template() + .withContainers(Arrays.asList(new Container().withImage("default/logicapps-base:latest") + .withName("logicapps-container") + .withResources(new ContainerResources().withCpu(1.0D).withMemory("2.0Gi")))) + .withScale(new Scale().withMinReplicas(1).withMaxReplicas(30))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ContainerApps_ManagedBy_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json */ /** * Sample code: Create or Update ManagedBy App. @@ -1733,30 +2016,31 @@ public final class ContainerAppsCreateOrUpdateSamples { */ public static void createOrUpdateManagedByApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().define("testcontainerAppManagedBy").withRegion("East US") + manager.containerApps() + .define("testcontainerAppManagedBy") + .withRegion("East US") .withExistingResourceGroup("rg") .withManagedBy( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.AppPlatform/Spring/springapp") .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withConfiguration( - new Configuration() - .withIngress( - new Ingress().withExternal(true).withTargetPort(3000).withExposedPort(4000) - .withTransport(IngressTransportMethod.TCP).withTraffic( - Arrays - .asList( - new TrafficWeight().withRevisionName("testcontainerAppManagedBy-ab1234") - .withWeight(100))))) + .withConfiguration(new Configuration().withIngress(new Ingress().withExternal(true) + .withTargetPort(3000) + .withExposedPort(4000) + .withTransport(IngressTransportMethod.TCP) + .withTraffic(Arrays + .asList(new TrafficWeight().withRevisionName("testcontainerAppManagedBy-ab1234").withWeight(100))))) .withTemplate(new Template() .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppManagedBy:v1") .withName("testcontainerAppManagedBy") - .withProbes(Arrays.asList(new ContainerAppProbe().withInitialDelaySeconds(3).withPeriodSeconds(3) - .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)).withType(Type.LIVENESS))))) - .withScale( - new Scale().withMinReplicas(1).withMaxReplicas(5) - .withRules(Arrays.asList(new ScaleRule().withName("tcpscalingrule") - .withTcp(new TcpScaleRule().withMetadata(mapOf("concurrentConnections", "50"))))))) + .withProbes(Arrays.asList(new ContainerAppProbe().withInitialDelaySeconds(3) + .withPeriodSeconds(3) + .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) + .withType(Type.LIVENESS))))) + .withScale(new Scale().withMinReplicas(1) + .withMaxReplicas(5) + .withRules(Arrays.asList(new ScaleRule().withName("tcpscalingrule") + .withTcp(new TcpScaleRule().withMetadata(mapOf("concurrentConnections", "50"))))))) .create(); } @@ -1782,8 +2066,7 @@ public final class ContainerAppsCreateOrUpdateSamples { */ public final class ContainerAppsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Delete.json */ /** * Sample code: Delete Container App. @@ -1804,9 +2087,7 @@ public final class ContainerAppsDeleteSamples { */ public final class ContainerAppsGetAuthTokenSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_GetAuthToken. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_GetAuthToken.json */ /** * Sample code: Get Container App Auth Token. @@ -1828,8 +2109,7 @@ public final class ContainerAppsGetAuthTokenSamples { */ public final class ContainerAppsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -1837,8 +2117,8 @@ public final class ContainerAppsGetByResourceGroupSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().getByResourceGroupWithResponse("rg", "testcontainerApp0", - com.azure.core.util.Context.NONE); + manager.containerApps() + .getByResourceGroupWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); } } ``` @@ -1851,8 +2131,7 @@ public final class ContainerAppsGetByResourceGroupSamples { */ public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ContainerApps_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_ListBySubscription.json */ /** * Sample code: List Container Apps by subscription. @@ -1874,8 +2153,7 @@ public final class ContainerAppsListSamples { */ public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ContainerApps_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_ListByResourceGroup.json */ /** * Sample code: List Container Apps by resource group. @@ -1897,8 +2175,7 @@ public final class ContainerAppsListByResourceGroupSamples { */ public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ContainerApps_ListCustomHostNameAnalysis.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json */ /** * Sample code: Analyze Custom Hostname. @@ -1906,8 +2183,9 @@ public final class ContainerAppsListCustomHostnameAnalysisSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void analyzeCustomHostname(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().listCustomHostnameAnalysisWithResponse("rg", "testcontainerApp0", "my.name.corp", - com.azure.core.util.Context.NONE); + manager.containerApps() + .listCustomHostnameAnalysisWithResponse("rg", "testcontainerApp0", "my.name.corp", + com.azure.core.util.Context.NONE); } } ``` @@ -1920,9 +2198,7 @@ public final class ContainerAppsListCustomHostnameAnalysisSamples { */ public final class ContainerAppsListSecretsSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_ListSecrets. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -1944,8 +2220,7 @@ public final class ContainerAppsListSecretsSamples { */ public final class ContainerAppsStartSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Start.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Start.json */ /** * Sample code: Start Container App. @@ -1966,8 +2241,7 @@ public final class ContainerAppsStartSamples { */ public final class ContainerAppsStopSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Stop.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Stop.json */ /** * Sample code: Stop Container App. @@ -2001,7 +2275,14 @@ import com.azure.resourcemanager.appcontainers.models.Ingress; import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; +import com.azure.resourcemanager.appcontainers.models.Level; +import com.azure.resourcemanager.appcontainers.models.LoggerSetting; import com.azure.resourcemanager.appcontainers.models.LogLevel; +import com.azure.resourcemanager.appcontainers.models.Runtime; +import com.azure.resourcemanager.appcontainers.models.RuntimeDotnet; +import com.azure.resourcemanager.appcontainers.models.RuntimeJava; +import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgent; +import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging; import com.azure.resourcemanager.appcontainers.models.Scale; import com.azure.resourcemanager.appcontainers.models.ScaleRule; import com.azure.resourcemanager.appcontainers.models.Service; @@ -2018,8 +2299,7 @@ import java.util.Map; */ public final class ContainerAppsUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Patch.json */ /** * Sample code: Patch Container App. @@ -2028,50 +2308,82 @@ public final class ContainerAppsUpdateSamples { */ public static void patchContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { ContainerApp resource = manager.containerApps() - .getByResourceGroupWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE).getValue(); - resource - .update().withTags( - mapOf("tag1", "value1", "tag2", "value2")) - .withConfiguration(new Configuration().withIngress(new Ingress().withExternal(true).withTargetPort(3000) - .withTraffic(Arrays.asList(new TrafficWeight().withRevisionName("testcontainerApp0-ab1234") - .withWeight(100).withLabel("production"))) - .withCustomDomains(Arrays.asList(new CustomDomain().withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED).withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain().withName("www.my-other-name.com").withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions(Arrays.asList( - new IpSecurityRestrictionRule().withName("Allow work IP A subnet") - .withDescription("Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/32").withAction(Action.ALLOW), - new IpSecurityRestrictionRule().withName("Allow work IP B subnet") - .withDescription("Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/8").withAction(Action.ALLOW))) - .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY))) - .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) - .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(true)) - .withMaxInactiveRevisions(10).withService(new Service().withType("redis"))) - .withTemplate( - new Template() - .withInitContainers(Arrays.asList( - new InitContainer().withImage("repo/testcontainerApp0:v4").withName("testinitcontainerApp0") - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerApp0:v1") - .withName("testcontainerApp0").withProbes(Arrays.asList(new ContainerAppProbe() - .withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header").withValue("Awesome"))) - .withPath("/health").withPort(8080)) - .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) - .withScale(new Scale().withMinReplicas(1).withMaxReplicas(5) - .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule").withCustom( - new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50")))))) - .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service") - .withName("service").withClientType("dotnet") - .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) + .getByResourceGroupWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withConfiguration( + new Configuration() + .withIngress(new Ingress().withExternal(true) + .withTargetPort(3000) + .withTraffic(Arrays.asList(new TrafficWeight() + .withRevisionName("testcontainerApp0-ab1234") + .withWeight(100) + .withLabel("production"))) + .withCustomDomains(Arrays.asList(new CustomDomain() + .withName("www.my-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + new CustomDomain().withName("www.my-other-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions( + Arrays + .asList( + new IpSecurityRestrictionRule().withName("Allow work IP A subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32") + .withAction(Action.ALLOW), + new IpSecurityRestrictionRule().withName("Allow work IP B subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8") + .withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY))) + .withDapr(new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withRuntime(new Runtime().withJava(new RuntimeJava().withEnableMetrics(true) + .withJavaAgent(new RuntimeJavaAgent().withEnabled(true) + .withLogging(new RuntimeJavaAgentLogging().withLoggerSettings(Arrays.asList( + new LoggerSetting().withLogger("org.springframework.boot").withLevel(Level.DEBUG)))))) + .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) + .withMaxInactiveRevisions(10) + .withService(new Service().withType("redis"))) + .withTemplate(new Template() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0") + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers(Arrays.asList(new Container() + .withImage("repo/testcontainerApp0:v1") + .withName("testcontainerApp0") + .withProbes( + Arrays.asList(new ContainerAppProbe().withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders( + Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") + .withValue("Awesome"))) + .withPath("/health") + .withPort(8080)).withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withScale( + new Scale().withMinReplicas(1) + .withMaxReplicas(5) + .withRules( + Arrays.asList(new ScaleRule().withName("httpscalingrule") + .withCustom(new CustomScaleRule().withType("http") + .withMetadata(mapOf("concurrentRequests", "50")))))) + .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service") + .withName("service") + .withClientType("dotnet") + .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) .apply(); } @@ -2105,9 +2417,7 @@ import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActio */ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AuthConfigs_CreateOrUpdate. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App AuthConfig. @@ -2116,7 +2426,8 @@ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { */ public static void createOrUpdateContainerAppAuthConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsAuthConfigs().define("current") + manager.containerAppsAuthConfigs() + .define("current") .withExistingContainerApp("workerapps-rg-xj", "testcanadacentral") .withPlatform(new AuthPlatform().withEnabled(true)) .withGlobalValidation( @@ -2139,8 +2450,7 @@ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { */ public final class ContainerAppsAuthConfigsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AuthConfigs_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_Delete.json */ /** * Sample code: Delete Container App AuthConfig. @@ -2149,8 +2459,8 @@ public final class ContainerAppsAuthConfigsDeleteSamples { */ public static void deleteContainerAppAuthConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsAuthConfigs().deleteWithResponse("workerapps-rg-xj", "testcanadacentral", "current", - com.azure.core.util.Context.NONE); + manager.containerAppsAuthConfigs() + .deleteWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } } ``` @@ -2163,8 +2473,7 @@ public final class ContainerAppsAuthConfigsDeleteSamples { */ public final class ContainerAppsAuthConfigsGetSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AuthConfigs_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_Get.json */ /** * Sample code: Get Container App's AuthConfig. @@ -2173,8 +2482,8 @@ public final class ContainerAppsAuthConfigsGetSamples { */ public static void getContainerAppSAuthConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsAuthConfigs().getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", - com.azure.core.util.Context.NONE); + manager.containerAppsAuthConfigs() + .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } } ``` @@ -2187,9 +2496,7 @@ public final class ContainerAppsAuthConfigsGetSamples { */ public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AuthConfigs_ListByContainer. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_ListByContainer.json */ /** * Sample code: List Auth Configs by Container Apps. @@ -2198,8 +2505,74 @@ public final class ContainerAppsAuthConfigsListByContainerAppSamples { */ public static void listAuthConfigsByContainerApps(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsAuthConfigs().listByContainerApp("workerapps-rg-xj", "testcanadacentral", - com.azure.core.util.Context.NONE); + manager.containerAppsAuthConfigs() + .listByContainerApp("workerapps-rg-xj", "testcanadacentral", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsBuilds_Delete + +```java +/** + * Samples for ContainerAppsBuilds Delete. + */ +public final class ContainerAppsBuildsDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsBuilds_Delete.json + */ + /** + * Sample code: ContainerAppsBuilds_Delete_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsBuildsDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsBuilds().delete("rg", "testCapp", "testBuild", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsBuilds_Get + +```java +/** + * Samples for ContainerAppsBuilds Get. + */ +public final class ContainerAppsBuildsGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsBuilds_Get.json + */ + /** + * Sample code: ContainerAppsBuilds_Get_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsBuildsGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsBuilds().getWithResponse("rg", "testCapp", "testBuild", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsBuildsByContainerApp_List + +```java +/** + * Samples for ContainerAppsBuildsByContainerApp List. + */ +public final class ContainerAppsBuildsByContainerAppListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsBuilds_ListByContainerApp.json + */ + /** + * Sample code: ContainerAppsBuilds_ListByContainerApp_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void containerAppsBuildsListByContainerApp0( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsBuildsByContainerApps().list("rg", "testCapp", com.azure.core.util.Context.NONE); } } ``` @@ -2212,9 +2585,7 @@ public final class ContainerAppsAuthConfigsListByContainerAppSamples { */ public final class ContainerAppsDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerAppsDiagnostics_Get - * .json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsDiagnostics_Get.json */ /** * Sample code: Get Container App's diagnostics info. @@ -2223,8 +2594,9 @@ public final class ContainerAppsDiagnosticsGetDetectorSamples { */ public static void getContainerAppSDiagnosticsInfo(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics().getDetectorWithResponse("mikono-workerapp-test-rg", "mikono-capp-stage1", - "cappcontainerappnetworkIO", com.azure.core.util.Context.NONE); + manager.containerAppsDiagnostics() + .getDetectorWithResponse("mikono-workerapp-test-rg", "mikono-capp-stage1", "cappcontainerappnetworkIO", + com.azure.core.util.Context.NONE); } } ``` @@ -2237,8 +2609,7 @@ public final class ContainerAppsDiagnosticsGetDetectorSamples { */ public final class ContainerAppsDiagnosticsGetRevisionSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. @@ -2247,8 +2618,9 @@ public final class ContainerAppsDiagnosticsGetRevisionSamples { */ public static void getContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics().getRevisionWithResponse("rg", "testcontainerApp0", - "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + manager.containerAppsDiagnostics() + .getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", + com.azure.core.util.Context.NONE); } } ``` @@ -2261,8 +2633,7 @@ public final class ContainerAppsDiagnosticsGetRevisionSamples { */ public final class ContainerAppsDiagnosticsGetRootSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -2270,46 +2641,301 @@ public final class ContainerAppsDiagnosticsGetRootSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics().getRootWithResponse("rg", "testcontainerApp0", - com.azure.core.util.Context.NONE); + manager.containerAppsDiagnostics() + .getRootWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsDiagnostics_ListDetectors + +```java +/** + * Samples for ContainerAppsDiagnostics ListDetectors. + */ +public final class ContainerAppsDiagnosticsListDetectorsSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsDiagnostics_List.json + */ + /** + * Sample code: Get the list of available diagnostics for a given Container App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getTheListOfAvailableDiagnosticsForAGivenContainerApp( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsDiagnostics() + .listDetectors("mikono-workerapp-test-rg", "mikono-capp-stage1", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsDiagnostics_ListRevisions + +```java +/** + * Samples for ContainerAppsDiagnostics ListRevisions. + */ +public final class ContainerAppsDiagnosticsListRevisionsSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_List.json + */ + /** + * Sample code: List Container App's revisions. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listContainerAppSRevisions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsDiagnostics() + .listRevisions("rg", "testcontainerApp0", null, com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsPatches_Apply + +```java +/** + * Samples for ContainerAppsPatches Apply. + */ +public final class ContainerAppsPatchesApplySamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_Apply.json + */ + /** + * Sample code: ContainerAppsPatches_Apply_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsPatchesApply0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsPatches().apply("rg", "test-app", "testPatch-25fe4b", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsPatches_Delete + +```java +/** + * Samples for ContainerAppsPatches Delete. + */ +public final class ContainerAppsPatchesDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_Delete.json + */ + /** + * Sample code: ContainerAppsPatches_Delete_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsPatchesDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsPatches().delete("rg", "test-app", "testPatch-25fe4b", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsPatches_Get + +```java +/** + * Samples for ContainerAppsPatches Get. + */ +public final class ContainerAppsPatchesGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_Get.json + */ + /** + * Sample code: ContainerAppsPatches_Get_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsPatchesGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsPatches() + .getWithResponse("rg", "test-app", "testPatch-25fe4b", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsPatches_ListByContainerApp + +```java +/** + * Samples for ContainerAppsPatches ListByContainerApp. + */ +public final class ContainerAppsPatchesListByContainerAppSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_ListByContainerApp.json + */ + /** + * Sample code: ContainerAppsPatches_ListByContainerApp_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void containerAppsPatchesListByContainerApp0( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsPatches().listByContainerApp("rg", "test-app", null, com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsPatches_SkipConfigure + +```java +import com.azure.resourcemanager.appcontainers.models.PatchSkipConfig; + +/** + * Samples for ContainerAppsPatches SkipConfigure. + */ +public final class ContainerAppsPatchesSkipConfigureSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_Skip_Configure.json + */ + /** + * Sample code: ContainerAppsPatches_Skip_Configure_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsPatchesSkipConfigure0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsPatches() + .skipConfigure("rg", "test-app", "testPatch-25fe4b", new PatchSkipConfig().withSkip(true), + com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsRevisionReplicas_GetReplica + +```java +/** + * Samples for ContainerAppsRevisionReplicas GetReplica. + */ +public final class ContainerAppsRevisionReplicasGetReplicaSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Replicas_Get.json + */ + /** + * Sample code: Get Container App's revision replica. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + getContainerAppSRevisionReplica(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisionReplicas() + .getReplicaWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", "myapp--0wlqy09-5d9774cff-5wnd8", + com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsRevisionReplicas_ListReplicas + +```java +/** + * Samples for ContainerAppsRevisionReplicas ListReplicas. + */ +public final class ContainerAppsRevisionReplicasListReplicasSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Replicas_List.json + */ + /** + * Sample code: List Container App's replicas. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listContainerAppSReplicas(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisionReplicas() + .listReplicasWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsRevisions_ActivateRevision + +```java +/** + * Samples for ContainerAppsRevisions ActivateRevision. + */ +public final class ContainerAppsRevisionsActivateRevisionSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Activate.json + */ + /** + * Sample code: Activate Container App's revision. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + activateContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisions() + .activateRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", + com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsRevisions_DeactivateRevision + +```java +/** + * Samples for ContainerAppsRevisions DeactivateRevision. + */ +public final class ContainerAppsRevisionsDeactivateRevisionSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Deactivate.json + */ + /** + * Sample code: Deactivate Container App's revision. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + deactivateContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisions() + .deactivateRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", + com.azure.core.util.Context.NONE); } } ``` -### ContainerAppsDiagnostics_ListDetectors +### ContainerAppsRevisions_GetRevision ```java /** - * Samples for ContainerAppsDiagnostics ListDetectors. + * Samples for ContainerAppsRevisions GetRevision. */ -public final class ContainerAppsDiagnosticsListDetectorsSamples { +public final class ContainerAppsRevisionsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ContainerAppsDiagnostics_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Get.json */ /** - * Sample code: Get the list of available diagnostics for a given Container App. + * Sample code: Get Container App's revision. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getTheListOfAvailableDiagnosticsForAGivenContainerApp( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics().listDetectors("mikono-workerapp-test-rg", "mikono-capp-stage1", - com.azure.core.util.Context.NONE); + public static void + getContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisions() + .getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", + com.azure.core.util.Context.NONE); } } ``` -### ContainerAppsDiagnostics_ListRevisions +### ContainerAppsRevisions_ListRevisions ```java /** - * Samples for ContainerAppsDiagnostics ListRevisions. + * Samples for ContainerAppsRevisions ListRevisions. */ -public final class ContainerAppsDiagnosticsListRevisionsSamples { +public final class ContainerAppsRevisionsListRevisionsSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. @@ -2318,176 +2944,225 @@ public final class ContainerAppsDiagnosticsListRevisionsSamples { */ public static void listContainerAppSRevisions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics().listRevisions("rg", "testcontainerApp0", null, - com.azure.core.util.Context.NONE); + manager.containerAppsRevisions() + .listRevisions("rg", "testcontainerApp0", null, com.azure.core.util.Context.NONE); } } ``` -### ContainerAppsRevisionReplicas_GetReplica +### ContainerAppsRevisions_RestartRevision ```java /** - * Samples for ContainerAppsRevisionReplicas GetReplica. + * Samples for ContainerAppsRevisions RestartRevision. */ -public final class ContainerAppsRevisionReplicasGetReplicaSamples { +public final class ContainerAppsRevisionsRestartRevisionSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Replicas_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Restart.json */ /** - * Sample code: Get Container App's revision replica. + * Sample code: Restart Container App's revision. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - getContainerAppSRevisionReplica(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisionReplicas().getReplicaWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", - "myapp--0wlqy09-5d9774cff-5wnd8", com.azure.core.util.Context.NONE); + restartContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisions() + .restartRevisionWithResponse("rg", "testStaticSite0", "testcontainerApp0-pjxhsye", + com.azure.core.util.Context.NONE); } } ``` -### ContainerAppsRevisionReplicas_ListReplicas +### ContainerAppsSessionPools_CreateOrUpdate ```java +import com.azure.resourcemanager.appcontainers.models.ContainerType; +import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; +import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; +import com.azure.resourcemanager.appcontainers.models.ExecutionType; +import com.azure.resourcemanager.appcontainers.models.PoolManagementType; +import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; +import com.azure.resourcemanager.appcontainers.models.SessionContainer; +import com.azure.resourcemanager.appcontainers.models.SessionContainerResources; +import com.azure.resourcemanager.appcontainers.models.SessionIngress; +import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; +import com.azure.resourcemanager.appcontainers.models.SessionNetworkStatus; +import java.util.Arrays; + /** - * Samples for ContainerAppsRevisionReplicas ListReplicas. + * Samples for ContainerAppsSessionPools CreateOrUpdate. */ -public final class ContainerAppsRevisionReplicasListReplicasSamples { +public final class ContainerAppsSessionPoolsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Replicas_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SessionPools_CreateOrUpdate.json */ /** - * Sample code: List Container App's replicas. + * Sample code: Create or Update Session Pool. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - listContainerAppSReplicas(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisionReplicas().listReplicasWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", - com.azure.core.util.Context.NONE); + createOrUpdateSessionPool(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSessionPools() + .define("testsessionpool") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withContainerType(ContainerType.CUSTOM_CONTAINER) + .withPoolManagementType(PoolManagementType.DYNAMIC) + .withScaleConfiguration( + new ScaleConfiguration().withMaxConcurrentSessions(500).withReadySessionInstances(100)) + .withDynamicPoolConfiguration( + new DynamicPoolConfiguration().withExecutionType(ExecutionType.TIMED).withCooldownPeriodInSeconds(600)) + .withCustomContainerTemplate(new CustomContainerTemplate() + .withContainers(Arrays.asList(new SessionContainer().withImage("repo/testcontainer:v4") + .withName("testinitcontainer") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new SessionContainerResources().withCpu(0.25D).withMemory("0.5Gi")))) + .withIngress(new SessionIngress().withTargetPort(80))) + .withSessionNetworkConfiguration( + new SessionNetworkConfiguration().withStatus(SessionNetworkStatus.EGRESS_ENABLED)) + .create(); } } ``` -### ContainerAppsRevisions_ActivateRevision +### ContainerAppsSessionPools_Delete ```java /** - * Samples for ContainerAppsRevisions ActivateRevision. + * Samples for ContainerAppsSessionPools Delete. */ -public final class ContainerAppsRevisionsActivateRevisionSamples { +public final class ContainerAppsSessionPoolsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Activate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SessionPools_Delete.json */ /** - * Sample code: Activate Container App's revision. + * Sample code: Delete Session Pool. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void - activateContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisions().activateRevisionWithResponse("rg", "testcontainerApp0", - "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + public static void deleteSessionPool(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSessionPools().delete("rg", "testsessionpool", com.azure.core.util.Context.NONE); } } ``` -### ContainerAppsRevisions_DeactivateRevision +### ContainerAppsSessionPools_GetByResourceGroup ```java /** - * Samples for ContainerAppsRevisions DeactivateRevision. + * Samples for ContainerAppsSessionPools GetByResourceGroup. */ -public final class ContainerAppsRevisionsDeactivateRevisionSamples { +public final class ContainerAppsSessionPoolsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Deactivate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SessionPools_Get.json */ /** - * Sample code: Deactivate Container App's revision. + * Sample code: Get Session Pool. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void - deactivateContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisions().deactivateRevisionWithResponse("rg", "testcontainerApp0", - "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + public static void getSessionPool(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSessionPools() + .getByResourceGroupWithResponse("rg", "testsessionpool", com.azure.core.util.Context.NONE); } } ``` -### ContainerAppsRevisions_GetRevision +### ContainerAppsSessionPools_List ```java /** - * Samples for ContainerAppsRevisions GetRevision. + * Samples for ContainerAppsSessionPools List. */ -public final class ContainerAppsRevisionsGetRevisionSamples { +public final class ContainerAppsSessionPoolsListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SessionPools_ListBySubscription.json */ /** - * Sample code: Get Container App's revision. + * Sample code: List Session Pools by subscription. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - getContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisions().getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", - com.azure.core.util.Context.NONE); + listSessionPoolsBySubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSessionPools().list(com.azure.core.util.Context.NONE); } } ``` -### ContainerAppsRevisions_ListRevisions +### ContainerAppsSessionPools_ListByResourceGroup ```java /** - * Samples for ContainerAppsRevisions ListRevisions. + * Samples for ContainerAppsSessionPools ListByResourceGroup. */ -public final class ContainerAppsRevisionsListRevisionsSamples { +public final class ContainerAppsSessionPoolsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SessionPools_ListByResourceGroup.json */ /** - * Sample code: List Container App's revisions. + * Sample code: List Session Pools by resource group. * * @param manager Entry point to ContainerAppsApiManager. */ public static void - listContainerAppSRevisions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisions().listRevisions("rg", "testcontainerApp0", null, - com.azure.core.util.Context.NONE); + listSessionPoolsByResourceGroup(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSessionPools().listByResourceGroup("rg", com.azure.core.util.Context.NONE); } } ``` -### ContainerAppsRevisions_RestartRevision +### ContainerAppsSessionPools_Update ```java +import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; +import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; +import com.azure.resourcemanager.appcontainers.models.ExecutionType; +import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; +import com.azure.resourcemanager.appcontainers.models.SessionContainer; +import com.azure.resourcemanager.appcontainers.models.SessionContainerResources; +import com.azure.resourcemanager.appcontainers.models.SessionIngress; +import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; +import com.azure.resourcemanager.appcontainers.models.SessionNetworkStatus; +import com.azure.resourcemanager.appcontainers.models.SessionPool; +import java.util.Arrays; + /** - * Samples for ContainerAppsRevisions RestartRevision. + * Samples for ContainerAppsSessionPools Update. */ -public final class ContainerAppsRevisionsRestartRevisionSamples { +public final class ContainerAppsSessionPoolsUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Restart.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SessionPools_Patch.json */ /** - * Sample code: Restart Container App's revision. + * Sample code: Update Session Pool. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void - restartContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisions().restartRevisionWithResponse("rg", "testStaticSite0", - "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + public static void updateSessionPool(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + SessionPool resource = manager.containerAppsSessionPools() + .getByResourceGroupWithResponse("rg", "testsessionpool", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withScaleConfiguration( + new ScaleConfiguration().withMaxConcurrentSessions(500).withReadySessionInstances(100)) + .withDynamicPoolConfiguration( + new DynamicPoolConfiguration().withExecutionType(ExecutionType.TIMED).withCooldownPeriodInSeconds(600)) + .withCustomContainerTemplate(new CustomContainerTemplate() + .withContainers(Arrays.asList(new SessionContainer().withImage("repo/testcontainer:v4") + .withName("testinitcontainer") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new SessionContainerResources().withCpu(0.25D).withMemory("0.5Gi")))) + .withIngress(new SessionIngress().withTargetPort(80))) + .withSessionNetworkConfiguration( + new SessionNetworkConfiguration().withStatus(SessionNetworkStatus.EGRESS_ENABLED)) + .apply(); } } ``` @@ -2506,8 +3181,7 @@ import java.util.Arrays; */ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * SourceControls_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SourceControls_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App SourceControl. @@ -2516,15 +3190,22 @@ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { */ public static void createOrUpdateContainerAppSourceControl( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSourceControls().define("current") + manager.containerAppsSourceControls() + .define("current") .withExistingContainerApp("workerapps-rg-xj", "testcanadacentral") - .withRepoUrl("https://github.com/xwang971/ghatest").withBranch("master") + .withRepoUrl("https://github.com/xwang971/ghatest") + .withBranch("master") .withGithubActionConfiguration(new GithubActionConfiguration() .withRegistryInfo(new RegistryInfo().withRegistryUrl("test-registry.azurecr.io") - .withRegistryUsername("test-registry").withRegistryPassword("fakeTokenPlaceholder")) + .withRegistryUsername("test-registry") + .withRegistryPassword("fakeTokenPlaceholder")) .withAzureCredentials(new AzureCredentials().withClientId("") - .withClientSecret("fakeTokenPlaceholder").withTenantId("").withKind("feaderated")) - .withContextPath("./").withGithubPersonalAccessToken("fakeTokenPlaceholder").withImage("image/tag") + .withClientSecret("fakeTokenPlaceholder") + .withTenantId("") + .withKind("feaderated")) + .withContextPath("./") + .withGithubPersonalAccessToken("fakeTokenPlaceholder") + .withImage("image/tag") .withBuildEnvironmentVariables( Arrays.asList(new EnvironmentVariable().withName("foo1").withValue("bar1"), new EnvironmentVariable().withName("foo2").withValue("bar2")))) @@ -2541,8 +3222,7 @@ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { */ public final class ContainerAppsSourceControlsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/SourceControls_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SourceControls_Delete.json */ /** * Sample code: Delete Container App SourceControl. @@ -2551,8 +3231,8 @@ public final class ContainerAppsSourceControlsDeleteSamples { */ public static void deleteContainerAppSourceControl(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSourceControls().delete("workerapps-rg-xj", "testcanadacentral", "current", - com.azure.core.util.Context.NONE); + manager.containerAppsSourceControls() + .delete("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } } ``` @@ -2565,8 +3245,7 @@ public final class ContainerAppsSourceControlsDeleteSamples { */ public final class ContainerAppsSourceControlsGetSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/SourceControls_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SourceControls_Get.json */ /** * Sample code: Get Container App's SourceControl. @@ -2575,8 +3254,8 @@ public final class ContainerAppsSourceControlsGetSamples { */ public static void getContainerAppSSourceControl(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSourceControls().getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", - com.azure.core.util.Context.NONE); + manager.containerAppsSourceControls() + .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } } ``` @@ -2589,8 +3268,7 @@ public final class ContainerAppsSourceControlsGetSamples { */ public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * SourceControls_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SourceControls_ListByContainer.json */ /** * Sample code: List App's Source Controls. @@ -2598,8 +3276,8 @@ public final class ContainerAppsSourceControlsListByContainerAppSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void listAppSSourceControls(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSourceControls().listByContainerApp("workerapps-rg-xj", "testcanadacentral", - com.azure.core.util.Context.NONE); + manager.containerAppsSourceControls() + .listByContainerApp("workerapps-rg-xj", "testcanadacentral", com.azure.core.util.Context.NONE); } } ``` @@ -2618,8 +3296,7 @@ import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPol */ public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprComponentResiliencyPolicy_CreateOrUpdate_OutboundOnly.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_OutboundOnly.json */ /** * Sample code: Create or update dapr component resiliency policy with outbound policy only. @@ -2628,22 +3305,25 @@ public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { */ public static void createOrUpdateDaprComponentResiliencyPolicyWithOutboundPolicyOnly( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies().define("myresiliencypolicy") + manager.daprComponentResiliencyPolicies() + .define("myresiliencypolicy") .withExistingDaprComponent("examplerg", "myenvironment", "mydaprcomponent") .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(5) .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(100).withMaxIntervalInMilliseconds(30000))) + .withInitialDelayInMilliseconds(100) + .withMaxIntervalInMilliseconds(30000))) .withTimeoutPolicy( new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(12)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(3).withTimeoutInSeconds(20).withIntervalInSeconds(60))) + .withCircuitBreakerPolicy( + new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(3) + .withTimeoutInSeconds(20) + .withIntervalInSeconds(60))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprComponentResiliencyPolicy_CreateOrUpdate_AllOptions.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_AllOptions.json */ /** * Sample code: Create or update dapr component resiliency policy with all options. @@ -2652,30 +3332,36 @@ public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { */ public static void createOrUpdateDaprComponentResiliencyPolicyWithAllOptions( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies().define("myresiliencypolicy") + manager.daprComponentResiliencyPolicies() + .define("myresiliencypolicy") .withExistingDaprComponent("examplerg", "myenvironment", "mydaprcomponent") .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(15) .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(2000).withMaxIntervalInMilliseconds(5500))) + .withInitialDelayInMilliseconds(2000) + .withMaxIntervalInMilliseconds(5500))) .withTimeoutPolicy( new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(30)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(5).withTimeoutInSeconds(10).withIntervalInSeconds(4))) + .withCircuitBreakerPolicy( + new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(5) + .withTimeoutInSeconds(10) + .withIntervalInSeconds(4))) .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(5) .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(100).withMaxIntervalInMilliseconds(30000))) + .withInitialDelayInMilliseconds(100) + .withMaxIntervalInMilliseconds(30000))) .withTimeoutPolicy( new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(12)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(3).withTimeoutInSeconds(20).withIntervalInSeconds(60))) + .withCircuitBreakerPolicy( + new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(3) + .withTimeoutInSeconds(20) + .withIntervalInSeconds(60))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprComponentResiliencyPolicy_CreateOrUpdate_SparseOptions.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_SparseOptions.json */ /** * Sample code: Create or update dapr component resiliency policy with sparse options. @@ -2684,14 +3370,17 @@ public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { */ public static void createOrUpdateDaprComponentResiliencyPolicyWithSparseOptions( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies().define("myresiliencypolicy") + manager.daprComponentResiliencyPolicies() + .define("myresiliencypolicy") .withExistingDaprComponent("examplerg", "myenvironment", "mydaprcomponent") .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(5) .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(2000).withMaxIntervalInMilliseconds(5500))) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(3).withTimeoutInSeconds(20))) + .withInitialDelayInMilliseconds(2000) + .withMaxIntervalInMilliseconds(5500))) + .withCircuitBreakerPolicy( + new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(3) + .withTimeoutInSeconds(20))) .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration().withTimeoutPolicy( new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(12))) .create(); @@ -2707,8 +3396,7 @@ public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { */ public final class DaprComponentResiliencyPoliciesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprComponentResiliencyPolicies_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponentResiliencyPolicies_Delete.json */ /** * Sample code: Delete dapr component resiliency policy. @@ -2717,8 +3405,9 @@ public final class DaprComponentResiliencyPoliciesDeleteSamples { */ public static void deleteDaprComponentResiliencyPolicy(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies().deleteWithResponse("examplerg", "myenvironment", "mydaprcomponent", - "myresiliencypolicy", com.azure.core.util.Context.NONE); + manager.daprComponentResiliencyPolicies() + .deleteWithResponse("examplerg", "myenvironment", "mydaprcomponent", "myresiliencypolicy", + com.azure.core.util.Context.NONE); } } ``` @@ -2731,8 +3420,7 @@ public final class DaprComponentResiliencyPoliciesDeleteSamples { */ public final class DaprComponentResiliencyPoliciesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprComponentResiliencyPolicies_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponentResiliencyPolicies_Get.json */ /** * Sample code: Get Dapr component resiliency policy. @@ -2741,8 +3429,9 @@ public final class DaprComponentResiliencyPoliciesGetSamples { */ public static void getDaprComponentResiliencyPolicy(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies().getWithResponse("examplerg", "myenvironment", "mydaprcomponent", - "myresiliencypolicy", com.azure.core.util.Context.NONE); + manager.daprComponentResiliencyPolicies() + .getWithResponse("examplerg", "myenvironment", "mydaprcomponent", "myresiliencypolicy", + com.azure.core.util.Context.NONE); } } ``` @@ -2755,8 +3444,7 @@ public final class DaprComponentResiliencyPoliciesGetSamples { */ public final class DaprComponentResiliencyPoliciesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprComponentResiliencyPolicies_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponentResiliencyPolicies_List.json */ /** * Sample code: List Dapr component resiliency policies. @@ -2765,8 +3453,8 @@ public final class DaprComponentResiliencyPoliciesListSamples { */ public static void listDaprComponentResiliencyPolicies(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies().list("examplerg", "myenvironment", "mydaprcomponent", - com.azure.core.util.Context.NONE); + manager.daprComponentResiliencyPolicies() + .list("examplerg", "myenvironment", "mydaprcomponent", com.azure.core.util.Context.NONE); } } ``` @@ -2786,8 +3474,7 @@ import java.util.Arrays; */ public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprComponents_CreateOrUpdate_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json */ /** * Sample code: Create or update dapr component with secrets. @@ -2796,26 +3483,28 @@ public final class DaprComponentsCreateOrUpdateSamples { */ public static void createOrUpdateDaprComponentWithSecrets( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().createOrUpdateWithResponse("examplerg", "myenvironment", "reddog", - new DaprComponentInner().withComponentType("state.azure.cosmosdb").withVersion("v1").withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) - .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), - 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")) - .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); + manager.daprComponents() + .createOrUpdateWithResponse("examplerg", "myenvironment", "reddog", + new DaprComponentInner().withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), + 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")) + .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/preview/2023-11-02-preview/examples/ - * DaprComponents_CreateOrUpdate_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json */ /** * Sample code: Create or update dapr component with secret store component. @@ -2824,20 +3513,24 @@ public final class DaprComponentsCreateOrUpdateSamples { */ public static void createOrUpdateDaprComponentWithSecretStoreComponent( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().createOrUpdateWithResponse("examplerg", "myenvironment", "reddog", - new DaprComponentInner().withComponentType("state.azure.cosmosdb").withVersion("v1").withIgnoreErrors(false) - .withInitTimeout("50s").withSecretStoreComponent("fakeTokenPlaceholder") - .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), - 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")) - .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); + manager.daprComponents() + .createOrUpdateWithResponse("examplerg", "myenvironment", "reddog", + new DaprComponentInner().withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecretStoreComponent("fakeTokenPlaceholder") + .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), + 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")) + .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); } } ``` @@ -2850,8 +3543,7 @@ public final class DaprComponentsCreateOrUpdateSamples { */ public final class DaprComponentsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_Delete.json */ /** * Sample code: Delete dapr component. @@ -2859,8 +3551,8 @@ public final class DaprComponentsDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().deleteWithResponse("examplerg", "myenvironment", "reddog", - com.azure.core.util.Context.NONE); + manager.daprComponents() + .deleteWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } ``` @@ -2873,8 +3565,7 @@ public final class DaprComponentsDeleteSamples { */ public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprComponents_Get_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_Get_SecretStoreComponent.json */ /** * Sample code: Get Dapr Component with secret store component. @@ -2883,14 +3574,12 @@ public final class DaprComponentsGetSamples { */ public static void getDaprComponentWithSecretStoreComponent( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", - com.azure.core.util.Context.NONE); + manager.daprComponents() + .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_Get_Secrets. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_Get_Secrets.json */ /** * Sample code: Get Dapr Component with secrets. @@ -2899,8 +3588,8 @@ public final class DaprComponentsGetSamples { */ public static void getDaprComponentWithSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", - com.azure.core.util.Context.NONE); + manager.daprComponents() + .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } ``` @@ -2913,8 +3602,7 @@ public final class DaprComponentsGetSamples { */ public final class DaprComponentsListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_List.json */ /** * Sample code: List Dapr Components. @@ -2935,9 +3623,7 @@ public final class DaprComponentsListSamples { */ public final class DaprComponentsListSecretsSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_ListSecrets. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -2946,8 +3632,8 @@ public final class DaprComponentsListSecretsSamples { */ public static void listContainerAppsSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().listSecretsWithResponse("examplerg", "myenvironment", "reddog", - com.azure.core.util.Context.NONE); + manager.daprComponents() + .listSecretsWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } ``` @@ -2967,8 +3653,7 @@ import java.util.Map; */ public final class DaprSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprSubscriptions_CreateOrUpdate_RouteRulesAndMetadata.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_CreateOrUpdate_RouteRulesAndMetadata.json */ /** * Sample code: Create or update dapr subscription with route rules and metadata. @@ -2977,20 +3662,22 @@ public final class DaprSubscriptionsCreateOrUpdateSamples { */ public static void createOrUpdateDaprSubscriptionWithRouteRulesAndMetadata( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions().define("mysubscription") - .withExistingManagedEnvironment("examplerg", "myenvironment").withPubsubName("mypubsubcomponent") + manager.daprSubscriptions() + .define("mysubscription") + .withExistingManagedEnvironment("examplerg", "myenvironment") + .withPubsubName("mypubsubcomponent") .withTopic("inventory") .withRoutes(new DaprSubscriptionRoutes() .withRules(Arrays.asList( new DaprSubscriptionRouteRule().withMatch("event.type == 'widget'").withPath("/widgets"), new DaprSubscriptionRouteRule().withMatch("event.type == 'gadget'").withPath("/gadgets"))) .withDefaultProperty("/products")) - .withMetadata(mapOf("foo", "bar", "hello", "world")).create(); + .withMetadata(mapOf("foo", "bar", "hello", "world")) + .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprSubscriptions_CreateOrUpdate_DefaultRoute.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_CreateOrUpdate_DefaultRoute.json */ /** * Sample code: Create or update dapr subscription with default route only. @@ -2999,14 +3686,17 @@ public final class DaprSubscriptionsCreateOrUpdateSamples { */ public static void createOrUpdateDaprSubscriptionWithDefaultRouteOnly( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions().define("mysubscription") - .withExistingManagedEnvironment("examplerg", "myenvironment").withPubsubName("mypubsubcomponent") - .withTopic("inventory").withRoutes(new DaprSubscriptionRoutes().withDefaultProperty("/products")).create(); + manager.daprSubscriptions() + .define("mysubscription") + .withExistingManagedEnvironment("examplerg", "myenvironment") + .withPubsubName("mypubsubcomponent") + .withTopic("inventory") + .withRoutes(new DaprSubscriptionRoutes().withDefaultProperty("/products")) + .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprSubscriptions_CreateOrUpdate_BulkSubscribeAndScopes.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_CreateOrUpdate_BulkSubscribeAndScopes.json */ /** * Sample code: Create or update dapr subscription with bulk subscribe configuration and scopes. @@ -3015,11 +3705,15 @@ public final class DaprSubscriptionsCreateOrUpdateSamples { */ public static void createOrUpdateDaprSubscriptionWithBulkSubscribeConfigurationAndScopes( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions().define("mysubscription") - .withExistingManagedEnvironment("examplerg", "myenvironment").withPubsubName("mypubsubcomponent") - .withTopic("inventory").withRoutes(new DaprSubscriptionRoutes().withDefaultProperty("/products")) + manager.daprSubscriptions() + .define("mysubscription") + .withExistingManagedEnvironment("examplerg", "myenvironment") + .withPubsubName("mypubsubcomponent") + .withTopic("inventory") + .withRoutes(new DaprSubscriptionRoutes().withDefaultProperty("/products")) .withScopes(Arrays.asList("warehouseapp", "customersupportapp")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(true).withMaxMessagesCount(123) + .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(true) + .withMaxMessagesCount(123) .withMaxAwaitDurationMs(500)) .create(); } @@ -3046,9 +3740,7 @@ public final class DaprSubscriptionsCreateOrUpdateSamples { */ public final class DaprSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprSubscriptions_Delete. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_Delete.json */ /** * Sample code: Delete dapr subscription. @@ -3056,8 +3748,8 @@ public final class DaprSubscriptionsDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteDaprSubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions().deleteWithResponse("examplerg", "myenvironment", "mysubscription", - com.azure.core.util.Context.NONE); + manager.daprSubscriptions() + .deleteWithResponse("examplerg", "myenvironment", "mysubscription", com.azure.core.util.Context.NONE); } } ``` @@ -3070,8 +3762,7 @@ public final class DaprSubscriptionsDeleteSamples { */ public final class DaprSubscriptionsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprSubscriptions_Get_DefaultRoute.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_Get_DefaultRoute.json */ /** * Sample code: Get Dapr subscription with bulk subscribe configuration and scopes. @@ -3080,13 +3771,12 @@ public final class DaprSubscriptionsGetSamples { */ public static void getDaprSubscriptionWithBulkSubscribeConfigurationAndScopes( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions().getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", - com.azure.core.util.Context.NONE); + manager.daprSubscriptions() + .getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprSubscriptions_Get_BulkSubscribeAndScopes.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_Get_BulkSubscribeAndScopes.json */ /** * Sample code: Get Dapr subscription with default route only. @@ -3095,13 +3785,12 @@ public final class DaprSubscriptionsGetSamples { */ public static void getDaprSubscriptionWithDefaultRouteOnly( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions().getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", - com.azure.core.util.Context.NONE); + manager.daprSubscriptions() + .getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprSubscriptions_Get_RouteRulesAndMetadata.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_Get_RouteRulesAndMetadata.json */ /** * Sample code: GetDapr subscription with route rules and metadata. @@ -3110,8 +3799,8 @@ public final class DaprSubscriptionsGetSamples { */ public static void getDaprSubscriptionWithRouteRulesAndMetadata( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions().getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", - com.azure.core.util.Context.NONE); + manager.daprSubscriptions() + .getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", com.azure.core.util.Context.NONE); } } ``` @@ -3124,8 +3813,7 @@ public final class DaprSubscriptionsGetSamples { */ public final class DaprSubscriptionsListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprSubscriptions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_List.json */ /** * Sample code: List Dapr subscriptions. @@ -3151,8 +3839,7 @@ import java.util.Arrays; */ public final class DotNetComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DotNetComponents_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_CreateOrUpdate.json */ /** * Sample code: Create or Update .NET Component. @@ -3161,7 +3848,8 @@ public final class DotNetComponentsCreateOrUpdateSamples { */ public static void createOrUpdateNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents().define("mydotnetcomponent") + manager.dotNetComponents() + .define("mydotnetcomponent") .withExistingManagedEnvironment("examplerg", "myenvironment") .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) .withConfigurations(Arrays.asList( @@ -3170,8 +3858,7 @@ public final class DotNetComponentsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DotNetComponents_CreateOrUpdate_ServiceBind.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_CreateOrUpdate_ServiceBind.json */ /** * Sample code: Create or Update .NET Component with ServiceBinds. @@ -3180,13 +3867,15 @@ public final class DotNetComponentsCreateOrUpdateSamples { */ public static void createOrUpdateNETComponentWithServiceBinds( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents().define("mydotnetcomponent") + manager.dotNetComponents() + .define("mydotnetcomponent") .withExistingManagedEnvironment("examplerg", "myenvironment") .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) .withConfigurations(Arrays.asList( new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) - .withServiceBinds(Arrays.asList(new DotNetComponentServiceBind().withName("yellowcat").withServiceId( - "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/dotNetComponents/yellowcat"))) + .withServiceBinds(Arrays.asList(new DotNetComponentServiceBind().withName("yellowcat") + .withServiceId( + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/dotNetComponents/yellowcat"))) .create(); } } @@ -3200,8 +3889,7 @@ public final class DotNetComponentsCreateOrUpdateSamples { */ public final class DotNetComponentsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Delete.json */ /** * Sample code: Delete .NET Component. @@ -3209,8 +3897,8 @@ public final class DotNetComponentsDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents().delete("examplerg", "myenvironment", "mydotnetcomponent", - com.azure.core.util.Context.NONE); + manager.dotNetComponents() + .delete("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE); } } ``` @@ -3223,8 +3911,7 @@ public final class DotNetComponentsDeleteSamples { */ public final class DotNetComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DotNetComponents_Get_ServiceBind.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Get_ServiceBind.json */ /** * Sample code: Get .NET Component with ServiceBinds. @@ -3233,13 +3920,12 @@ public final class DotNetComponentsGetSamples { */ public static void getNETComponentWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents().getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", - com.azure.core.util.Context.NONE); + manager.dotNetComponents() + .getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Get.json */ /** * Sample code: Get .NET Component. @@ -3247,8 +3933,8 @@ public final class DotNetComponentsGetSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents().getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", - com.azure.core.util.Context.NONE); + manager.dotNetComponents() + .getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE); } } ``` @@ -3261,8 +3947,7 @@ public final class DotNetComponentsGetSamples { */ public final class DotNetComponentsListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_List.json */ /** * Sample code: List .NET Components. @@ -3274,8 +3959,7 @@ public final class DotNetComponentsListSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DotNetComponents_List_ServiceBind.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_List_ServiceBind.json */ /** * Sample code: List .NET Components with ServiceBinds. @@ -3303,8 +3987,7 @@ import java.util.Arrays; */ public final class DotNetComponentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DotNetComponents_Patch_ServiceBind.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Patch_ServiceBind.json */ /** * Sample code: Patch .NET Component with ServiceBinds. @@ -3316,17 +3999,18 @@ public final class DotNetComponentsUpdateSamples { DotNetComponent resource = manager.dotNetComponents() .getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) + resource.update() + .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) .withConfigurations(Arrays.asList( new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) - .withServiceBinds(Arrays.asList(new DotNetComponentServiceBind().withName("yellowcat").withServiceId( - "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/dotNetComponents/yellowcat"))) + .withServiceBinds(Arrays.asList(new DotNetComponentServiceBind().withName("yellowcat") + .withServiceId( + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/dotNetComponents/yellowcat"))) .apply(); } /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Patch.json */ /** * Sample code: Patch .NET Component. @@ -3337,7 +4021,8 @@ public final class DotNetComponentsUpdateSamples { DotNetComponent resource = manager.dotNetComponents() .getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) + resource.update() + .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) .withConfigurations(Arrays.asList( new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) .apply(); @@ -3345,12 +4030,36 @@ public final class DotNetComponentsUpdateSamples { } ``` +### FunctionsExtension_InvokeFunctionsHost + +```java +/** + * Samples for FunctionsExtension InvokeFunctionsHost. + */ +public final class FunctionsExtensionInvokeFunctionsHostSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/FunctionsExtension_Post.json + */ + /** + * Sample code: Invoke Functions host using Functions Extension API. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void invokeFunctionsHostUsingFunctionsExtensionAPI( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.functionsExtensions() + .invokeFunctionsHostWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", + "testcontainerApp0", com.azure.core.util.Context.NONE); + } +} +``` + ### JavaComponents_CreateOrUpdate ```java import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; +import com.azure.resourcemanager.appcontainers.models.SpringBootAdminComponent; import java.util.Arrays; /** @@ -3358,8 +4067,7 @@ import java.util.Arrays; */ public final class JavaComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * JavaComponents_CreateOrUpdate_ServiceBind.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_CreateOrUpdate_ServiceBind.json */ /** * Sample code: Create or Update Java Component with ServiceBinds. @@ -3368,21 +4076,22 @@ public final class JavaComponentsCreateOrUpdateSamples { */ public static void createOrUpdateJavaComponentWithServiceBinds( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.javaComponents().define("myjavacomponent").withExistingManagedEnvironment("examplerg", "myenvironment") - .withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) - .withConfigurations(Arrays.asList( + manager.javaComponents() + .define("myjavacomponent") + .withExistingManagedEnvironment("examplerg", "myenvironment") + .withProperties(new SpringBootAdminComponent().withConfigurations(Arrays.asList( new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") .withValue("true"), new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") .withValue("10000ms"))) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat").withServiceId( - "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat"))) + .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat") + .withServiceId( + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat")))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * JavaComponents_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_CreateOrUpdate.json */ /** * Sample code: Create or Update Java Component. @@ -3391,13 +4100,14 @@ public final class JavaComponentsCreateOrUpdateSamples { */ public static void createOrUpdateJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.javaComponents().define("myjavacomponent").withExistingManagedEnvironment("examplerg", "myenvironment") - .withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) - .withConfigurations(Arrays.asList( + manager.javaComponents() + .define("myjavacomponent") + .withExistingManagedEnvironment("examplerg", "myenvironment") + .withProperties(new SpringBootAdminComponent().withConfigurations(Arrays.asList( new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") .withValue("true"), new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") - .withValue("10000ms"))) + .withValue("10000ms")))) .create(); } } @@ -3411,8 +4121,7 @@ public final class JavaComponentsCreateOrUpdateSamples { */ public final class JavaComponentsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Delete.json */ /** * Sample code: Delete Java Component. @@ -3420,8 +4129,8 @@ public final class JavaComponentsDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.javaComponents().delete("examplerg", "myenvironment", "myjavacomponent", - com.azure.core.util.Context.NONE); + manager.javaComponents() + .delete("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE); } } ``` @@ -3434,8 +4143,7 @@ public final class JavaComponentsDeleteSamples { */ public final class JavaComponentsGetSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Get.json */ /** * Sample code: Get Java Component. @@ -3443,13 +4151,12 @@ public final class JavaComponentsGetSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.javaComponents().getWithResponse("examplerg", "myenvironment", "myjavacomponent", - com.azure.core.util.Context.NONE); + manager.javaComponents() + .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * JavaComponents_Get_ServiceBind.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Get_ServiceBind.json */ /** * Sample code: Get Java Component with ServiceBinds. @@ -3458,8 +4165,8 @@ public final class JavaComponentsGetSamples { */ public static void getJavaComponentWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.javaComponents().getWithResponse("examplerg", "myenvironment", "myjavacomponent", - com.azure.core.util.Context.NONE); + manager.javaComponents() + .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE); } } ``` @@ -3472,8 +4179,7 @@ public final class JavaComponentsGetSamples { */ public final class JavaComponentsListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_List.json */ /** * Sample code: List Java Components. @@ -3485,8 +4191,7 @@ public final class JavaComponentsListSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * JavaComponents_List_ServiceBind.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_List_ServiceBind.json */ /** * Sample code: List Java Components with ServiceBinds. @@ -3506,7 +4211,7 @@ public final class JavaComponentsListSamples { import com.azure.resourcemanager.appcontainers.models.JavaComponent; import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; +import com.azure.resourcemanager.appcontainers.models.SpringBootAdminComponent; import java.util.Arrays; /** @@ -3514,8 +4219,7 @@ import java.util.Arrays; */ public final class JavaComponentsUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Patch.json */ /** * Sample code: Patch Java Component. @@ -3526,18 +4230,17 @@ public final class JavaComponentsUpdateSamples { JavaComponent resource = manager.javaComponents() .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) - .withConfigurations(Arrays.asList( + resource.update() + .withProperties(new SpringBootAdminComponent().withConfigurations(Arrays.asList( new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") .withValue("true"), new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") - .withValue("10000ms"))) + .withValue("10000ms")))) .apply(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * JavaComponents_Patch_ServiceBind.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Patch_ServiceBind.json */ /** * Sample code: Patch Java Component with ServiceBinds. @@ -3549,14 +4252,15 @@ public final class JavaComponentsUpdateSamples { JavaComponent resource = manager.javaComponents() .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) - .withConfigurations(Arrays.asList( + resource.update() + .withProperties(new SpringBootAdminComponent().withConfigurations(Arrays.asList( new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") .withValue("true"), new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") .withValue("10000ms"))) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat").withServiceId( - "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat"))) + .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat") + .withServiceId( + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat")))) .apply(); } } @@ -3574,6 +4278,8 @@ import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHt import com.azure.resourcemanager.appcontainers.models.ContainerResources; import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; +import com.azure.resourcemanager.appcontainers.models.IdentitySettings; +import com.azure.resourcemanager.appcontainers.models.IdentitySettingsLifeCycle; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.JobConfiguration; import com.azure.resourcemanager.appcontainers.models.JobConfigurationEventTriggerConfig; @@ -3581,19 +4287,23 @@ import com.azure.resourcemanager.appcontainers.models.JobConfigurationManualTrig import com.azure.resourcemanager.appcontainers.models.JobScale; import com.azure.resourcemanager.appcontainers.models.JobScaleRule; import com.azure.resourcemanager.appcontainers.models.JobTemplate; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; import com.azure.resourcemanager.appcontainers.models.TriggerType; import com.azure.resourcemanager.appcontainers.models.Type; +import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; import com.azure.resourcemanager.appcontainers.models.VolumeMount; import java.io.IOException; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** * Samples for Jobs CreateOrUpdate. */ public final class JobsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * Job_CreateorUpdate_ConnectedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_CreateorUpdate_ConnectedEnvironment.json */ /** * Sample code: Create or Update Container Apps Job On A Connected Environment. @@ -3602,34 +4312,43 @@ public final class JobsCreateOrUpdateSamples { */ public static void createOrUpdateContainerAppsJobOnAConnectedEnvironment( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().define("testcontainerAppsJob0").withRegion("East US").withExistingResourceGroup("rg") + manager.jobs() + .define("testcontainerAppsJob0") + .withRegion("East US") + .withExistingResourceGroup("rg") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation") .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube") - .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL).withReplicaTimeout(10) - .withReplicaRetryLimit(10).withManualTriggerConfig( + .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL) + .withReplicaTimeout(10) + .withReplicaRetryLimit(10) + .withManualTriggerConfig( new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4))) .withTemplate(new JobTemplate() .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) + .withName("testinitcontainerAppsJob0") + .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers(Arrays - .asList(new Container().withImage("repo/testcontainerAppsJob0:v1").withName("testcontainerAppsJob0") - .withProbes(Arrays.asList(new ContainerAppProbe() - .withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header").withValue("Awesome"))) - .withPath("/health").withPort(8080)) - .withInitialDelaySeconds(5).withPeriodSeconds(3).withType(Type.LIVENESS)))))) + .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppsJob0:v1") + .withName("testcontainerAppsJob0") + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders( + Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") + .withValue("Awesome"))) + .withPath("/health") + .withPort(8080)) + .withInitialDelaySeconds(5) + .withPeriodSeconds(3) + .withType(Type.LIVENESS)))))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * Job_CreateorUpdate_EventTrigger.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_CreateorUpdate_EventTrigger.json */ /** * Sample code: Create or Update Container Apps Job With Event Driven Trigger. @@ -3638,20 +4357,34 @@ public final class JobsCreateOrUpdateSamples { */ public static void createOrUpdateContainerAppsJobWithEventDrivenTrigger( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) throws IOException { - manager.jobs().define("testcontainerAppsJob0").withRegion("East US").withExistingResourceGroup("rg") + manager.jobs() + .define("testcontainerAppsJob0") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", + new UserAssignedIdentity()))) .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.EVENT).withReplicaTimeout(10) - .withReplicaRetryLimit(10).withEventTriggerConfig( - new JobConfigurationEventTriggerConfig().withReplicaCompletionCount(1).withParallelism(4) - .withScale(new JobScale().withPollingInterval(40).withMinExecutions(1).withMaxExecutions(5) - .withRules(Arrays.asList(new JobScaleRule().withName("servicebuscalingrule") - .withType("azure-servicebus") - .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter().deserialize( - "{\"topicName\":\"my-topic\"}", Object.class, SerializerEncoding.JSON))))))) + .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.EVENT) + .withReplicaTimeout(10) + .withReplicaRetryLimit(10) + .withEventTriggerConfig(new JobConfigurationEventTriggerConfig().withReplicaCompletionCount(1) + .withParallelism(4) + .withScale(new JobScale().withPollingInterval(40) + .withMinExecutions(1) + .withMaxExecutions(5) + .withRules(Arrays.asList(new JobScaleRule().withName("servicebuscalingrule") + .withType("azure-servicebus") + .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"topicName\":\"my-topic\"}", Object.class, SerializerEncoding.JSON)) + .withIdentity( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity")))))) .withTemplate(new JobTemplate() .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) + .withName("testinitcontainerAppsJob0") + .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) .withContainers(Arrays.asList( @@ -3660,8 +4393,7 @@ public final class JobsCreateOrUpdateSamples { } /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_CreateorUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_CreateorUpdate.json */ /** * Sample code: Create or Update Container Apps Job. @@ -3670,33 +4402,65 @@ public final class JobsCreateOrUpdateSamples { */ public static void createOrUpdateContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().define("testcontainerAppsJob0").withRegion("East US").withExistingResourceGroup("rg") + manager.jobs() + .define("testcontainerAppsJob0") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withIdentity(new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", + new UserAssignedIdentity()))) .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL).withReplicaTimeout(10) - .withReplicaRetryLimit(10).withManualTriggerConfig( - new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4))) - .withTemplate( - new JobTemplate() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers(Arrays.asList( - new Container().withImage("repo/testcontainerAppsJob0:v1").withName("testcontainerAppsJob0") - .withVolumeMounts(Arrays.asList( - new VolumeMount().withVolumeName("azurefile").withMountPath("/mnt/path1") - .withSubPath("subPath1"), - new VolumeMount().withVolumeName("nfsazurefile").withMountPath("/mnt/path2") - .withSubPath("subPath2"))) - .withProbes(Arrays.asList(new ContainerAppProbe() - .withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header").withValue("Awesome"))) - .withPath("/health").withPort(8080)) - .withInitialDelaySeconds(5).withPeriodSeconds(3).withType(Type.LIVENESS)))))) + .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL) + .withReplicaTimeout(10) + .withReplicaRetryLimit(10) + .withManualTriggerConfig( + new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4)) + .withIdentitySettings(Arrays.asList(new IdentitySettings().withIdentity( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity") + .withLifecycle(IdentitySettingsLifeCycle.ALL), + new IdentitySettings().withIdentity("system").withLifecycle(IdentitySettingsLifeCycle.INIT)))) + .withTemplate(new JobTemplate() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") + .withName("testinitcontainerAppsJob0") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppsJob0:v1") + .withName("testcontainerAppsJob0") + .withVolumeMounts(Arrays.asList( + new VolumeMount().withVolumeName("azurefile") + .withMountPath("/mnt/path1") + .withSubPath("subPath1"), + new VolumeMount().withVolumeName("nfsazurefile") + .withMountPath("/mnt/path2") + .withSubPath("subPath2"))) + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders( + Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") + .withValue("Awesome"))) + .withPath("/health") + .withPort(8080)) + .withInitialDelaySeconds(5) + .withPeriodSeconds(3) + .withType(Type.LIVENESS)))))) .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; + } } ``` @@ -3708,8 +4472,7 @@ public final class JobsCreateOrUpdateSamples { */ public final class JobsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Delete.json */ /** * Sample code: Delete Container Apps Job. @@ -3730,8 +4493,7 @@ public final class JobsDeleteSamples { */ public final class JobsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Get.json */ /** * Sample code: Get Container Apps Job. @@ -3752,8 +4514,7 @@ public final class JobsGetByResourceGroupSamples { */ public final class JobsGetDetectorSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_GetDetector.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_GetDetector.json */ /** * Sample code: Get diagnostic data for a Container App Job. @@ -3762,8 +4523,9 @@ public final class JobsGetDetectorSamples { */ public static void getDiagnosticDataForAContainerAppJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().getDetectorWithResponse("mikono-workerapp-test-rg", "mikonojob1", "containerappjobnetworkIO", - com.azure.core.util.Context.NONE); + manager.jobs() + .getDetectorWithResponse("mikono-workerapp-test-rg", "mikonojob1", "containerappjobnetworkIO", + com.azure.core.util.Context.NONE); } } ``` @@ -3776,8 +4538,7 @@ public final class JobsGetDetectorSamples { */ public final class JobsListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Jobs_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Jobs_ListBySubscription.json */ /** * Sample code: List Container Apps Jobs by subscription. @@ -3799,9 +4560,7 @@ public final class JobsListSamples { */ public final class JobsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Jobs_ListByResourceGroup. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Jobs_ListByResourceGroup.json */ /** * Sample code: List Container Apps Jobs by resource group. @@ -3823,8 +4582,7 @@ public final class JobsListByResourceGroupSamples { */ public final class JobsListDetectorsSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_ListDetectors.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_ListDetectors.json */ /** * Sample code: Get the list of available diagnostic data for a Container App Job. @@ -3833,8 +4591,8 @@ public final class JobsListDetectorsSamples { */ public static void getTheListOfAvailableDiagnosticDataForAContainerAppJob( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonojob1", - com.azure.core.util.Context.NONE); + manager.jobs() + .listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonojob1", com.azure.core.util.Context.NONE); } } ``` @@ -3847,8 +4605,7 @@ public final class JobsListDetectorsSamples { */ public final class JobsListSecretsSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_ListSecrets.json */ /** * Sample code: List Container Apps Job Secrets. @@ -3870,8 +4627,7 @@ public final class JobsListSecretsSamples { */ public final class JobsProxyGetSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_ProxyGet.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_ProxyGet.json */ /** * Sample code: Get Container App Job by name. @@ -3898,8 +4654,7 @@ import java.util.Arrays; */ public final class JobsStartSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Start.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Start.json */ /** * Sample code: Run a Container Apps Job. @@ -3907,16 +4662,17 @@ public final class JobsStartSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void runAContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().start("rg", "testcontainerAppsJob0", - new JobExecutionTemplate() + manager.jobs() + .start("rg", "testcontainerAppsJob0", new JobExecutionTemplate() .withContainers(Arrays.asList(new JobExecutionContainer().withImage("repo/testcontainerAppsJob0:v4") .withName("testcontainerAppsJob0") .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) .withInitContainers(Arrays.asList(new JobExecutionContainer().withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) + .withName("testinitcontainerAppsJob0") + .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))), - com.azure.core.util.Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -3929,8 +4685,7 @@ public final class JobsStartSamples { */ public final class JobsStopExecutionSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Stop_Execution.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Stop_Execution.json */ /** * Sample code: Terminate a Container Apps Job. @@ -3952,8 +4707,7 @@ public final class JobsStopExecutionSamples { */ public final class JobsStopMultipleExecutionsSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Stop_Multiple.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Stop_Multiple.json */ /** * Sample code: Terminate Multiple Container Apps Job. @@ -3990,8 +4744,7 @@ import java.util.Arrays; */ public final class JobsUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Patch.json */ /** * Sample code: Patch Container Apps Job. @@ -4000,28 +4753,33 @@ public final class JobsUpdateSamples { */ public static void patchContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { Job resource = manager.jobs() - .getByResourceGroupWithResponse("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE).getValue(); + .getByResourceGroupWithResponse("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE) + .getValue(); resource.update() - .withProperties( - new JobPatchPropertiesProperties() - .withConfiguration( - new JobConfiguration().withTriggerType(TriggerType.MANUAL).withReplicaTimeout(10) - .withReplicaRetryLimit(10) - .withManualTriggerConfig(new JobConfigurationManualTriggerConfig() - .withReplicaCompletionCount(1).withParallelism(4))) - .withTemplate(new JobTemplate() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers(Arrays.asList( - new Container().withImage("repo/testcontainerAppsJob0:v1").withName("testcontainerAppsJob0") - .withProbes(Arrays.asList(new ContainerAppProbe() - .withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header").withValue("Awesome"))) - .withPath("/health").withPort(8080)) - .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))))) + .withProperties(new JobPatchPropertiesProperties() + .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL) + .withReplicaTimeout(10) + .withReplicaRetryLimit(10) + .withManualTriggerConfig( + new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4))) + .withTemplate(new JobTemplate() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") + .withName("testinitcontainerAppsJob0") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppsJob0:v1") + .withName("testcontainerAppsJob0") + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders(Arrays + .asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") + .withValue("Awesome"))) + .withPath("/health") + .withPort(8080)) + .withInitialDelaySeconds(3) + .withPeriodSeconds(3) + .withType(Type.LIVENESS))))))) .apply(); } } @@ -4035,8 +4793,7 @@ public final class JobsUpdateSamples { */ public final class JobsExecutionsListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Executions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Executions_Get.json */ /** * Sample code: Get a Container Apps Job Executions. @@ -4061,8 +4818,7 @@ import com.azure.resourcemanager.appcontainers.models.ManagedCertificateProperti */ public final class ManagedCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedCertificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedCertificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -4071,7 +4827,9 @@ public final class ManagedCertificatesCreateOrUpdateSamples { */ public static void createOrUpdateCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedCertificates().define("certificate-firendly-name").withRegion("East US") + manager.managedCertificates() + .define("certificate-firendly-name") + .withRegion("East US") .withExistingManagedEnvironment("examplerg", "testcontainerenv") .withProperties(new ManagedCertificateProperties().withSubjectName("my-subject-name.company.country.net") .withDomainControlValidation(ManagedCertificateDomainControlValidation.CNAME)) @@ -4088,9 +4846,7 @@ public final class ManagedCertificatesCreateOrUpdateSamples { */ public final class ManagedCertificatesDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedCertificate_Delete. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedCertificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -4098,8 +4854,9 @@ public final class ManagedCertificatesDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedCertificates().deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - com.azure.core.util.Context.NONE); + manager.managedCertificates() + .deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } ``` @@ -4112,8 +4869,7 @@ public final class ManagedCertificatesDeleteSamples { */ public final class ManagedCertificatesGetSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedCertificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedCertificate_Get.json */ /** * Sample code: Get Certificate. @@ -4121,8 +4877,9 @@ public final class ManagedCertificatesGetSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedCertificates().getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - com.azure.core.util.Context.NONE); + manager.managedCertificates() + .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } ``` @@ -4135,8 +4892,7 @@ public final class ManagedCertificatesGetSamples { */ public final class ManagedCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedCertificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedCertificates_ListByManagedEnvironment.json */ /** * Sample code: List Managed Certificates by Managed Environment. @@ -4162,9 +4918,7 @@ import java.util.Map; */ public final class ManagedCertificatesUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedCertificates_Patch. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedCertificates_Patch.json */ /** * Sample code: Patch Managed Certificate. @@ -4173,8 +4927,10 @@ public final class ManagedCertificatesUpdateSamples { */ public static void patchManagedCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - ManagedCertificate resource = manager.managedCertificates().getWithResponse("examplerg", "testcontainerenv", - "certificate-firendly-name", com.azure.core.util.Context.NONE).getValue(); + ManagedCertificate resource = manager.managedCertificates() + .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @@ -4200,8 +4956,7 @@ public final class ManagedCertificatesUpdateSamples { */ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironmentDiagnostics_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentDiagnostics_Get.json */ /** * Sample code: Get diagnostic data for a managed environments. @@ -4210,8 +4965,9 @@ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { */ public static void getDiagnosticDataForAManagedEnvironments( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentDiagnostics().getDetectorWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", - "ManagedEnvAvailabilityMetrics", com.azure.core.util.Context.NONE); + manager.managedEnvironmentDiagnostics() + .getDetectorWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", "ManagedEnvAvailabilityMetrics", + com.azure.core.util.Context.NONE); } } ``` @@ -4224,8 +4980,7 @@ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { */ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironmentDiagnostics_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostic data for a managed environments. @@ -4234,8 +4989,133 @@ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { */ public static void getTheListOfAvailableDiagnosticDataForAManagedEnvironments( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentDiagnostics().listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", - com.azure.core.util.Context.NONE); + manager.managedEnvironmentDiagnostics() + .listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedEnvironmentPrivateEndpointConnections_CreateOrUpdate + +```java +import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnection; +import com.azure.resourcemanager.appcontainers.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; + +/** + * Samples for ManagedEnvironmentPrivateEndpointConnections CreateOrUpdate. + */ +public final class ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentPrivateEndpointConnections_CreateOrUpdate.json + */ + /** + * Sample code: Update a Private Endpoint Connection by Managed Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void updateAPrivateEndpointConnectionByManagedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + PrivateEndpointConnection resource = manager.managedEnvironmentPrivateEndpointConnections() + .getWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withActionsRequired("None")) + .apply(); + } +} +``` + +### ManagedEnvironmentPrivateEndpointConnections_Delete + +```java +/** + * Samples for ManagedEnvironmentPrivateEndpointConnections Delete. + */ +public final class ManagedEnvironmentPrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentPrivateEndpointConnections_Delete.json + */ + /** + * Sample code: Delete a Private Endpoint Connection by Managed Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void deleteAPrivateEndpointConnectionByManagedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironmentPrivateEndpointConnections() + .delete("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedEnvironmentPrivateEndpointConnections_Get + +```java +/** + * Samples for ManagedEnvironmentPrivateEndpointConnections Get. + */ +public final class ManagedEnvironmentPrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentPrivateEndpointConnections_Get.json + */ + /** + * Sample code: Get a Private Endpoint Connection by Managed Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getAPrivateEndpointConnectionByManagedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironmentPrivateEndpointConnections() + .getWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedEnvironmentPrivateEndpointConnections_List + +```java +/** + * Samples for ManagedEnvironmentPrivateEndpointConnections List. + */ +public final class ManagedEnvironmentPrivateEndpointConnectionsListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentPrivateEndpointConnections_List.json + */ + /** + * Sample code: List Private Endpoint Connections by Managed Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listPrivateEndpointConnectionsByManagedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironmentPrivateEndpointConnections() + .list("examplerg", "managedEnv", com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedEnvironmentPrivateLinkResources_List + +```java +/** + * Samples for ManagedEnvironmentPrivateLinkResources List. + */ +public final class ManagedEnvironmentPrivateLinkResourcesListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentPrivateLinkResources_List.json + */ + /** + * Sample code: List Private Link Resources by Managed Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listPrivateLinkResourcesByManagedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironmentPrivateLinkResources() + .list("examplerg", "managedEnv", com.azure.core.util.Context.NONE); } } ``` @@ -4248,8 +5128,7 @@ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { */ public final class ManagedEnvironmentUsagesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironmentUsages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentUsages_List.json */ /** * Sample code: List managed environment usages. @@ -4275,6 +5154,8 @@ import com.azure.resourcemanager.appcontainers.models.Header; 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.ManagedEnvironmentPropertiesPeerTrafficConfiguration; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; import com.azure.resourcemanager.appcontainers.models.MetricsConfiguration; @@ -4294,8 +5175,7 @@ import java.util.Map; */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json */ /** * Sample code: Create environment with custom infrastructureResourceGroup. @@ -4304,7 +5184,9 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { */ public static void createEnvironmentWithCustomInfrastructureResourceGroup( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().define("testcontainerenv").withRegion("East US") + manager.managedEnvironments() + .define("testcontainerenv") + .withRegion("East US") .withExistingResourceGroup("examplerg") .withDaprAIConnectionString( "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") @@ -4314,21 +5196,28 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("fakeTokenPlaceholder"))) .withZoneRedundant(true) .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("www.my-name.com") - .withCertificateValue("Y2VydA==".getBytes()).withCertificatePassword("fakeTokenPlaceholder")) + .withCertificateValue("Y2VydA==".getBytes()) + .withCertificatePassword("fakeTokenPlaceholder")) .withWorkloadProfiles(Arrays.asList( - new WorkloadProfile().withName("My-GP-01").withWorkloadProfileType("GeneralPurpose").withMinimumCount(3) + new WorkloadProfile().withName("My-GP-01") + .withWorkloadProfileType("GeneralPurpose") + .withMinimumCount(3) .withMaximumCount(12), - new WorkloadProfile().withName("My-MO-01").withWorkloadProfileType("MemoryOptimized") - .withMinimumCount(3).withMaximumCount(6), - new WorkloadProfile().withName("My-CO-01").withWorkloadProfileType("ComputeOptimized") - .withMinimumCount(3).withMaximumCount(6), + new WorkloadProfile().withName("My-MO-01") + .withWorkloadProfileType("MemoryOptimized") + .withMinimumCount(3) + .withMaximumCount(6), + new WorkloadProfile().withName("My-CO-01") + .withWorkloadProfileType("ComputeOptimized") + .withMinimumCount(3) + .withMaximumCount(6), new WorkloadProfile().withName("My-consumption-01").withWorkloadProfileType("Consumption"))) - .withInfrastructureResourceGroup("myInfrastructureRgName").create(); + .withInfrastructureResourceGroup("myInfrastructureRgName") + .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create environments. @@ -4336,7 +5225,9 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void createEnvironments(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().define("testcontainerenv").withRegion("East US") + manager.managedEnvironments() + .define("testcontainerenv") + .withRegion("East US") .withExistingResourceGroup("examplerg") .withIdentity(new ManagedServiceIdentity() .withType(ManagedServiceIdentityType.fromString("SystemAssigned, UserAssigned")) @@ -4347,9 +5238,10 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") .withVnetConfiguration(new VnetConfiguration().withInfrastructureSubnetId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1")) - .withAppLogsConfiguration( - new AppLogsConfiguration().withLogAnalyticsConfiguration(new LogAnalyticsConfiguration() - .withCustomerId("string").withSharedKey("fakeTokenPlaceholder").withDynamicJsonColumns(true))) + .withAppLogsConfiguration(new AppLogsConfiguration() + .withLogAnalyticsConfiguration(new LogAnalyticsConfiguration().withCustomerId("string") + .withSharedKey("fakeTokenPlaceholder") + .withDynamicJsonColumns(true))) .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( @@ -4359,7 +5251,8 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { .withDataDogConfiguration( new DataDogConfiguration().withSite("string").withKey("fakeTokenPlaceholder")) .withOtlpConfigurations(Arrays.asList(new OtlpConfiguration().withName("dashboard") - .withEndpoint("dashboard.k8s.region.azurecontainerapps.io:80").withInsecure(true) + .withEndpoint("dashboard.k8s.region.azurecontainerapps.io:80") + .withInsecure(true) .withHeaders(Arrays .asList(new Header().withKey("fakeTokenPlaceholder").withValue("xxxxxxxxxxx")))))) .withTracesConfiguration(new TracesConfiguration().withDestinations(Arrays.asList("appInsights"))) @@ -4367,17 +5260,26 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { .withMetricsConfiguration(new MetricsConfiguration().withDestinations(Arrays.asList("dataDog")))) .withZoneRedundant(true) .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("www.my-name.com") - .withCertificateValue("Y2VydA==".getBytes()).withCertificatePassword("fakeTokenPlaceholder")) + .withCertificateValue("Y2VydA==".getBytes()) + .withCertificatePassword("fakeTokenPlaceholder")) .withWorkloadProfiles(Arrays.asList( - new WorkloadProfile().withName("My-GP-01").withWorkloadProfileType("GeneralPurpose").withMinimumCount(3) + new WorkloadProfile().withName("My-GP-01") + .withWorkloadProfileType("GeneralPurpose") + .withMinimumCount(3) .withMaximumCount(12), - new WorkloadProfile().withName("My-MO-01").withWorkloadProfileType("MemoryOptimized") - .withMinimumCount(3).withMaximumCount(6), - new WorkloadProfile().withName("My-CO-01").withWorkloadProfileType("ComputeOptimized") - .withMinimumCount(3).withMaximumCount(6), + new WorkloadProfile().withName("My-MO-01") + .withWorkloadProfileType("MemoryOptimized") + .withMinimumCount(3) + .withMaximumCount(6), + new WorkloadProfile().withName("My-CO-01") + .withWorkloadProfileType("ComputeOptimized") + .withMinimumCount(3) + .withMaximumCount(6), new WorkloadProfile().withName("My-consumption-01").withWorkloadProfileType("Consumption"))) .withPeerAuthentication( new ManagedEnvironmentPropertiesPeerAuthentication().withMtls(new Mtls().withEnabled(true))) + .withPeerTrafficConfiguration(new ManagedEnvironmentPropertiesPeerTrafficConfiguration() + .withEncryption(new ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption().withEnabled(true))) .create(); } @@ -4403,9 +5305,7 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { */ public final class ManagedEnvironmentsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_Delete. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_Delete.json */ /** * Sample code: Delete environment by name. @@ -4427,8 +5327,7 @@ public final class ManagedEnvironmentsDeleteSamples { */ public final class ManagedEnvironmentsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironments_GetAuthToken.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_GetAuthToken.json */ /** * Sample code: Get Managed Environment Auth Token. @@ -4450,8 +5349,7 @@ public final class ManagedEnvironmentsGetAuthTokenSamples { */ public final class ManagedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -4459,8 +5357,8 @@ public final class ManagedEnvironmentsGetByResourceGroupSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getEnvironmentsByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().getByResourceGroupWithResponse("examplerg", "jlaw-demo1", - com.azure.core.util.Context.NONE); + manager.managedEnvironments() + .getByResourceGroupWithResponse("examplerg", "jlaw-demo1", com.azure.core.util.Context.NONE); } } ``` @@ -4473,8 +5371,7 @@ public final class ManagedEnvironmentsGetByResourceGroupSamples { */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_ListBySubscription.json */ /** * Sample code: List environments by subscription. @@ -4496,8 +5393,7 @@ public final class ManagedEnvironmentsListSamples { */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. @@ -4519,8 +5415,7 @@ public final class ManagedEnvironmentsListByResourceGroupSamples { */ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironments_ListWorkloadProfileStates.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json */ /** * Sample code: List environments by subscription. @@ -4529,8 +5424,8 @@ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { */ public static void listEnvironmentsBySubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().listWorkloadProfileStates("examplerg", "jlaw-demo1", - com.azure.core.util.Context.NONE); + manager.managedEnvironments() + .listWorkloadProfileStates("examplerg", "jlaw-demo1", com.azure.core.util.Context.NONE); } } ``` @@ -4547,9 +5442,7 @@ import java.util.Map; */ public final class ManagedEnvironmentsUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_Patch. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. @@ -4586,8 +5479,7 @@ public final class ManagedEnvironmentsUpdateSamples { */ public final class ManagedEnvironmentsDiagnosticsGetRootSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -4595,8 +5487,8 @@ public final class ManagedEnvironmentsDiagnosticsGetRootSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getEnvironmentsByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsDiagnostics().getRootWithResponse("examplerg", "jlaw-demo1", - com.azure.core.util.Context.NONE); + manager.managedEnvironmentsDiagnostics() + .getRootWithResponse("examplerg", "jlaw-demo1", com.azure.core.util.Context.NONE); } } ``` @@ -4614,8 +5506,7 @@ import com.azure.resourcemanager.appcontainers.models.NfsAzureFileProperties; */ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironmentsStorages_CreateOrUpdate_NfsAzureFile.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate_NfsAzureFile.json */ /** * Sample code: Create or update environments storage for NFS Azure file. @@ -4624,16 +5515,18 @@ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { */ public static void createOrUpdateEnvironmentsStorageForNFSAzureFile( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().define("jlaw-demo1") + manager.managedEnvironmentsStorages() + .define("jlaw-demo1") .withExistingManagedEnvironment("examplerg", "managedEnv") - .withProperties(new ManagedEnvironmentStorageProperties().withNfsAzureFile(new NfsAzureFileProperties() - .withServer("server1").withAccessMode(AccessMode.READ_ONLY).withShareName("share1"))) + .withProperties(new ManagedEnvironmentStorageProperties() + .withNfsAzureFile(new NfsAzureFileProperties().withServer("server1") + .withAccessMode(AccessMode.READ_ONLY) + .withShareName("share1"))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. @@ -4642,11 +5535,14 @@ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { */ public static void createOrUpdateEnvironmentsStorage(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().define("jlaw-demo1") + manager.managedEnvironmentsStorages() + .define("jlaw-demo1") .withExistingManagedEnvironment("examplerg", "managedEnv") - .withProperties(new ManagedEnvironmentStorageProperties().withAzureFile( - new AzureFileProperties().withAccountName("account1").withAccountKey("fakeTokenPlaceholder") - .withAccessMode(AccessMode.READ_ONLY).withShareName("share1"))) + .withProperties(new ManagedEnvironmentStorageProperties() + .withAzureFile(new AzureFileProperties().withAccountName("account1") + .withAccountKey("fakeTokenPlaceholder") + .withAccessMode(AccessMode.READ_ONLY) + .withShareName("share1"))) .create(); } } @@ -4660,8 +5556,7 @@ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. @@ -4670,8 +5565,8 @@ public final class ManagedEnvironmentsStoragesDeleteSamples { */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().deleteWithResponse("examplerg", "managedEnv", "jlaw-demo1", - com.azure.core.util.Context.NONE); + manager.managedEnvironmentsStorages() + .deleteWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); } } ``` @@ -4684,8 +5579,7 @@ public final class ManagedEnvironmentsStoragesDeleteSamples { */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage. @@ -4694,13 +5588,12 @@ public final class ManagedEnvironmentsStoragesGetSamples { */ public static void getAEnvironmentsStorage(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().getWithResponse("examplerg", "managedEnv", "jlaw-demo1", - com.azure.core.util.Context.NONE); + manager.managedEnvironmentsStorages() + .getWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironmentsStorages_Get_NfsAzureFile.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentsStorages_Get_NfsAzureFile.json */ /** * Sample code: get a environments storage for NFS Azure file. @@ -4709,8 +5602,8 @@ public final class ManagedEnvironmentsStoragesGetSamples { */ public static void getAEnvironmentsStorageForNFSAzureFile( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().getWithResponse("examplerg", "managedEnv", "jlaw-demo1", - com.azure.core.util.Context.NONE); + manager.managedEnvironmentsStorages() + .getWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); } } ``` @@ -4723,8 +5616,7 @@ public final class ManagedEnvironmentsStoragesGetSamples { */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. @@ -4733,8 +5625,8 @@ public final class ManagedEnvironmentsStoragesListSamples { */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().listWithResponse("examplerg", "managedEnv", - com.azure.core.util.Context.NONE); + manager.managedEnvironmentsStorages() + .listWithResponse("examplerg", "managedEnv", com.azure.core.util.Context.NONE); } } ``` @@ -4749,8 +5641,7 @@ import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReque */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * Certificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -4760,14 +5651,14 @@ public final class NamespacesCheckNameAvailabilitySamples { public static void certificatesCheckNameAvailability(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.namespaces() - .checkNameAvailabilityWithResponse("examplerg", "testcontainerenv", new CheckNameAvailabilityRequest() - .withName("testcertificatename").withType("Microsoft.App/managedEnvironments/certificates"), + .checkNameAvailabilityWithResponse("examplerg", "testcontainerenv", + new CheckNameAvailabilityRequest().withName("testcertificatename") + .withType("Microsoft.App/managedEnvironments/certificates"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ContainerApps_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_CheckNameAvailability.json */ /** * Sample code: ContainerApps_CheckNameAvailability. @@ -4776,9 +5667,10 @@ public final class NamespacesCheckNameAvailabilitySamples { */ public static void containerAppsCheckNameAvailability(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.namespaces().checkNameAvailabilityWithResponse("examplerg", "testcontainerenv", - new CheckNameAvailabilityRequest().withName("testcappname").withType("Microsoft.App/containerApps"), - com.azure.core.util.Context.NONE); + manager.namespaces() + .checkNameAvailabilityWithResponse("examplerg", "testcontainerenv", + new CheckNameAvailabilityRequest().withName("testcappname").withType("Microsoft.App/containerApps"), + com.azure.core.util.Context.NONE); } } ``` @@ -4791,8 +5683,7 @@ public final class NamespacesCheckNameAvailabilitySamples { */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Operations_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Operations_List.json */ /** * Sample code: List all operations. @@ -4813,8 +5704,7 @@ public final class OperationsListSamples { */ public final class ResourceProviderGetCustomDomainVerificationIdSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * Subscriptions_GetCustomDomainVerificationId.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Subscriptions_GetCustomDomainVerificationId.json */ /** * Sample code: List all operations. @@ -4835,8 +5725,7 @@ public final class ResourceProviderGetCustomDomainVerificationIdSamples { */ public final class ResourceProviderJobExecutionSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Execution_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Execution_Get.json */ /** * Sample code: Get a single Job Execution. @@ -4844,8 +5733,8 @@ public final class ResourceProviderJobExecutionSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getASingleJobExecution(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.resourceProviders().jobExecutionWithResponse("rg", "testcontainerAppsJob0", "jobExecution1", - com.azure.core.util.Context.NONE); + manager.resourceProviders() + .jobExecutionWithResponse("rg", "testcontainerAppsJob0", "jobExecution1", com.azure.core.util.Context.NONE); } } ``` @@ -4858,8 +5747,7 @@ public final class ResourceProviderJobExecutionSamples { */ public final class UsagesListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Usages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Usages_List.json */ /** * Sample code: List usages. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml b/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml index 0bef6c90b82b..bcfb7024373d 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-preview-2023-11. + 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. Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource. Package tag package-preview-2024-02. https://github.com/Azure/azure-sdk-for-java @@ -61,7 +61,7 @@ com.azure azure-core-test - 1.26.0-beta.1 + 1.25.0 test 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 087cc2b9ecae..59521868b7f0 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 @@ -11,8 +11,8 @@ import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; @@ -38,24 +38,31 @@ import com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsStoragesImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsApiClientBuilder; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsAuthConfigsImpl; +import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsBuildsByContainerAppsImpl; +import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsBuildsImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsDiagnosticsImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsImpl; +import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsPatchesImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionReplicasImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionsImpl; +import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsSessionPoolsImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsSourceControlsImpl; import com.azure.resourcemanager.appcontainers.implementation.DaprComponentResiliencyPoliciesImpl; import com.azure.resourcemanager.appcontainers.implementation.DaprComponentsImpl; import com.azure.resourcemanager.appcontainers.implementation.DaprSubscriptionsImpl; import com.azure.resourcemanager.appcontainers.implementation.DotNetComponentsImpl; +import com.azure.resourcemanager.appcontainers.implementation.FunctionsExtensionsImpl; import com.azure.resourcemanager.appcontainers.implementation.JavaComponentsImpl; import com.azure.resourcemanager.appcontainers.implementation.JobsExecutionsImpl; 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.ManagedEnvironmentPrivateEndpointConnectionsImpl; +import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentPrivateLinkResourcesImpl; 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.ManagedEnvironmentUsagesImpl; import com.azure.resourcemanager.appcontainers.implementation.NamespacesImpl; import com.azure.resourcemanager.appcontainers.implementation.OperationsImpl; import com.azure.resourcemanager.appcontainers.implementation.ResourceProvidersImpl; @@ -74,23 +81,30 @@ import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsStorages; import com.azure.resourcemanager.appcontainers.models.ContainerApps; import com.azure.resourcemanager.appcontainers.models.ContainerAppsAuthConfigs; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuilds; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildsByContainerApps; import com.azure.resourcemanager.appcontainers.models.ContainerAppsDiagnostics; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatches; import com.azure.resourcemanager.appcontainers.models.ContainerAppsRevisionReplicas; import com.azure.resourcemanager.appcontainers.models.ContainerAppsRevisions; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsSessionPools; import com.azure.resourcemanager.appcontainers.models.ContainerAppsSourceControls; import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicies; import com.azure.resourcemanager.appcontainers.models.DaprComponents; import com.azure.resourcemanager.appcontainers.models.DaprSubscriptions; import com.azure.resourcemanager.appcontainers.models.DotNetComponents; +import com.azure.resourcemanager.appcontainers.models.FunctionsExtensions; import com.azure.resourcemanager.appcontainers.models.JavaComponents; import com.azure.resourcemanager.appcontainers.models.Jobs; 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.ManagedEnvironmentPrivateEndpointConnections; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPrivateLinkResources; 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.ManagedEnvironmentUsages; import com.azure.resourcemanager.appcontainers.models.Namespaces; import com.azure.resourcemanager.appcontainers.models.Operations; import com.azure.resourcemanager.appcontainers.models.ResourceProviders; @@ -104,6 +118,9 @@ /** * Entry point to ContainerAppsApiManager. + * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the + * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions + * extension resource. */ public final class ContainerAppsApiManager { private AppResiliencies appResiliencies; @@ -136,6 +153,12 @@ public final class ContainerAppsApiManager { private ContainerAppsRevisionReplicas containerAppsRevisionReplicas; + private ContainerAppsBuildsByContainerApps containerAppsBuildsByContainerApps; + + private ContainerAppsBuilds containerAppsBuilds; + + private ContainerAppsPatches containerAppsPatches; + private ContainerAppsDiagnostics containerAppsDiagnostics; private ManagedEnvironmentDiagnostics managedEnvironmentDiagnostics; @@ -144,8 +167,12 @@ public final class ContainerAppsApiManager { private Jobs jobs; + private DotNetComponents dotNetComponents; + private Operations operations; + private JavaComponents javaComponents; + private JobsExecutions jobsExecutions; private ResourceProviders resourceProviders; @@ -158,6 +185,10 @@ public final class ContainerAppsApiManager { private Namespaces namespaces; + private ManagedEnvironmentPrivateEndpointConnections managedEnvironmentPrivateEndpointConnections; + + private ManagedEnvironmentPrivateLinkResources managedEnvironmentPrivateLinkResources; + private DaprComponentResiliencyPolicies daprComponentResiliencyPolicies; private DaprComponents daprComponents; @@ -172,9 +203,9 @@ public final class ContainerAppsApiManager { private ManagedEnvironmentUsages managedEnvironmentUsages; - private JavaComponents javaComponents; + private FunctionsExtensions functionsExtensions; - private DotNetComponents dotNetComponents; + private ContainerAppsSessionPools containerAppsSessionPools; private final ContainerAppsApiClient clientObject; @@ -182,8 +213,10 @@ private ContainerAppsApiManager(HttpPipeline httpPipeline, AzureProfile profile, Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); this.clientObject = new ContainerAppsApiClientBuilder().pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval).buildClient(); + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) + .subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval) + .buildClient(); } /** @@ -334,12 +367,19 @@ public ContainerAppsApiManager authenticate(TokenCredential credential, AzurePro Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.appcontainers") - .append("/").append("1.0.0-beta.7"); + userAgentBuilder.append("azsdk-java") + .append("-") + .append("com.azure.resourcemanager.appcontainers") + .append("/") + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)"); + userAgentBuilder.append(" (") + .append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.name")) + .append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")) + .append("; auto-generated)"); } else { userAgentBuilder.append(" (auto-generated)"); } @@ -358,18 +398,21 @@ public ContainerAppsApiManager authenticate(TokenCredential credential, AzurePro policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList())); + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])).build(); + .policies(policies.toArray(new HttpPipelinePolicy[0])) + .build(); return new ContainerAppsApiManager(httpPipeline, profile, defaultPollInterval); } } @@ -562,6 +605,43 @@ public ContainerAppsRevisionReplicas containerAppsRevisionReplicas() { return containerAppsRevisionReplicas; } + /** + * Gets the resource collection API of ContainerAppsBuildsByContainerApps. + * + * @return Resource collection API of ContainerAppsBuildsByContainerApps. + */ + public ContainerAppsBuildsByContainerApps containerAppsBuildsByContainerApps() { + if (this.containerAppsBuildsByContainerApps == null) { + this.containerAppsBuildsByContainerApps = new ContainerAppsBuildsByContainerAppsImpl( + clientObject.getContainerAppsBuildsByContainerApps(), this); + } + return containerAppsBuildsByContainerApps; + } + + /** + * Gets the resource collection API of ContainerAppsBuilds. + * + * @return Resource collection API of ContainerAppsBuilds. + */ + public ContainerAppsBuilds containerAppsBuilds() { + if (this.containerAppsBuilds == null) { + this.containerAppsBuilds = new ContainerAppsBuildsImpl(clientObject.getContainerAppsBuilds(), this); + } + return containerAppsBuilds; + } + + /** + * Gets the resource collection API of ContainerAppsPatches. + * + * @return Resource collection API of ContainerAppsPatches. + */ + public ContainerAppsPatches containerAppsPatches() { + if (this.containerAppsPatches == null) { + this.containerAppsPatches = new ContainerAppsPatchesImpl(clientObject.getContainerAppsPatches(), this); + } + return containerAppsPatches; + } + /** * Gets the resource collection API of ContainerAppsDiagnostics. * @@ -613,6 +693,18 @@ public Jobs jobs() { return jobs; } + /** + * Gets the resource collection API of DotNetComponents. It manages DotNetComponent. + * + * @return Resource collection API of DotNetComponents. + */ + public DotNetComponents dotNetComponents() { + if (this.dotNetComponents == null) { + this.dotNetComponents = new DotNetComponentsImpl(clientObject.getDotNetComponents(), this); + } + return dotNetComponents; + } + /** * Gets the resource collection API of Operations. * @@ -625,6 +717,18 @@ public Operations operations() { return operations; } + /** + * Gets the resource collection API of JavaComponents. It manages JavaComponent. + * + * @return Resource collection API of JavaComponents. + */ + public JavaComponents javaComponents() { + if (this.javaComponents == null) { + this.javaComponents = new JavaComponentsImpl(clientObject.getJavaComponents(), this); + } + return javaComponents; + } + /** * Gets the resource collection API of JobsExecutions. * @@ -697,6 +801,33 @@ public Namespaces namespaces() { return namespaces; } + /** + * Gets the resource collection API of ManagedEnvironmentPrivateEndpointConnections. It manages + * PrivateEndpointConnection. + * + * @return Resource collection API of ManagedEnvironmentPrivateEndpointConnections. + */ + public ManagedEnvironmentPrivateEndpointConnections managedEnvironmentPrivateEndpointConnections() { + if (this.managedEnvironmentPrivateEndpointConnections == null) { + this.managedEnvironmentPrivateEndpointConnections = new ManagedEnvironmentPrivateEndpointConnectionsImpl( + clientObject.getManagedEnvironmentPrivateEndpointConnections(), this); + } + return managedEnvironmentPrivateEndpointConnections; + } + + /** + * Gets the resource collection API of ManagedEnvironmentPrivateLinkResources. + * + * @return Resource collection API of ManagedEnvironmentPrivateLinkResources. + */ + public ManagedEnvironmentPrivateLinkResources managedEnvironmentPrivateLinkResources() { + if (this.managedEnvironmentPrivateLinkResources == null) { + this.managedEnvironmentPrivateLinkResources = new ManagedEnvironmentPrivateLinkResourcesImpl( + clientObject.getManagedEnvironmentPrivateLinkResources(), this); + } + return managedEnvironmentPrivateLinkResources; + } + /** * Gets the resource collection API of DaprComponentResiliencyPolicies. It manages DaprComponentResiliencyPolicy. * @@ -786,27 +917,28 @@ public ManagedEnvironmentUsages managedEnvironmentUsages() { } /** - * Gets the resource collection API of JavaComponents. It manages JavaComponent. + * Gets the resource collection API of FunctionsExtensions. * - * @return Resource collection API of JavaComponents. + * @return Resource collection API of FunctionsExtensions. */ - public JavaComponents javaComponents() { - if (this.javaComponents == null) { - this.javaComponents = new JavaComponentsImpl(clientObject.getJavaComponents(), this); + public FunctionsExtensions functionsExtensions() { + if (this.functionsExtensions == null) { + this.functionsExtensions = new FunctionsExtensionsImpl(clientObject.getFunctionsExtensions(), this); } - return javaComponents; + return functionsExtensions; } /** - * Gets the resource collection API of DotNetComponents. It manages DotNetComponent. + * Gets the resource collection API of ContainerAppsSessionPools. It manages SessionPool. * - * @return Resource collection API of DotNetComponents. + * @return Resource collection API of ContainerAppsSessionPools. */ - public DotNetComponents dotNetComponents() { - if (this.dotNetComponents == null) { - this.dotNetComponents = new DotNetComponentsImpl(clientObject.getDotNetComponents(), this); + public ContainerAppsSessionPools containerAppsSessionPools() { + if (this.containerAppsSessionPools == null) { + this.containerAppsSessionPools + = new ContainerAppsSessionPoolsImpl(clientObject.getContainerAppsSessionPools(), this); } - return dotNetComponents; + return containerAppsSessionPools; } /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsDaprComponentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsDaprComponentsClient.java index b0839ec31463..f0d390ee1103 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsDaprComponentsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsDaprComponentsClient.java @@ -13,8 +13,7 @@ import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; /** - * An instance of this class provides access to all the operations defined in - * ConnectedEnvironmentsDaprComponentsClient. + * An instance of this class provides access to all the operations defined in ConnectedEnvironmentsDaprComponentsClient. */ public interface ConnectedEnvironmentsDaprComponentsClient { /** 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 51855da3e2ff..78b99343df82 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 @@ -151,6 +151,27 @@ public interface ContainerAppsApiClient { */ ContainerAppsRevisionReplicasClient getContainerAppsRevisionReplicas(); + /** + * Gets the ContainerAppsBuildsByContainerAppsClient object to access its operations. + * + * @return the ContainerAppsBuildsByContainerAppsClient object. + */ + ContainerAppsBuildsByContainerAppsClient getContainerAppsBuildsByContainerApps(); + + /** + * Gets the ContainerAppsBuildsClient object to access its operations. + * + * @return the ContainerAppsBuildsClient object. + */ + ContainerAppsBuildsClient getContainerAppsBuilds(); + + /** + * Gets the ContainerAppsPatchesClient object to access its operations. + * + * @return the ContainerAppsPatchesClient object. + */ + ContainerAppsPatchesClient getContainerAppsPatches(); + /** * Gets the ContainerAppsDiagnosticsClient object to access its operations. * @@ -179,6 +200,13 @@ public interface ContainerAppsApiClient { */ JobsClient getJobs(); + /** + * Gets the DotNetComponentsClient object to access its operations. + * + * @return the DotNetComponentsClient object. + */ + DotNetComponentsClient getDotNetComponents(); + /** * Gets the OperationsClient object to access its operations. * @@ -186,6 +214,13 @@ public interface ContainerAppsApiClient { */ OperationsClient getOperations(); + /** + * Gets the JavaComponentsClient object to access its operations. + * + * @return the JavaComponentsClient object. + */ + JavaComponentsClient getJavaComponents(); + /** * Gets the JobsExecutionsClient object to access its operations. * @@ -228,6 +263,20 @@ public interface ContainerAppsApiClient { */ NamespacesClient getNamespaces(); + /** + * Gets the ManagedEnvironmentPrivateEndpointConnectionsClient object to access its operations. + * + * @return the ManagedEnvironmentPrivateEndpointConnectionsClient object. + */ + ManagedEnvironmentPrivateEndpointConnectionsClient getManagedEnvironmentPrivateEndpointConnections(); + + /** + * Gets the ManagedEnvironmentPrivateLinkResourcesClient object to access its operations. + * + * @return the ManagedEnvironmentPrivateLinkResourcesClient object. + */ + ManagedEnvironmentPrivateLinkResourcesClient getManagedEnvironmentPrivateLinkResources(); + /** * Gets the DaprComponentResiliencyPoliciesClient object to access its operations. * @@ -278,16 +327,16 @@ public interface ContainerAppsApiClient { ManagedEnvironmentUsagesClient getManagedEnvironmentUsages(); /** - * Gets the JavaComponentsClient object to access its operations. + * Gets the FunctionsExtensionsClient object to access its operations. * - * @return the JavaComponentsClient object. + * @return the FunctionsExtensionsClient object. */ - JavaComponentsClient getJavaComponents(); + FunctionsExtensionsClient getFunctionsExtensions(); /** - * Gets the DotNetComponentsClient object to access its operations. + * Gets the ContainerAppsSessionPoolsClient object to access its operations. * - * @return the DotNetComponentsClient object. + * @return the ContainerAppsSessionPoolsClient object. */ - DotNetComponentsClient getDotNetComponents(); + ContainerAppsSessionPoolsClient getContainerAppsSessionPools(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsByContainerAppsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsByContainerAppsClient.java new file mode 100644 index 000000000000..258e621ecb99 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsByContainerAppsClient.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.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.ContainerAppsBuildResourceInner; + +/** + * An instance of this class provides access to all the operations defined in ContainerAppsBuildsByContainerAppsClient. + */ +public interface ContainerAppsBuildsByContainerAppsClient { + /** + * List Container Apps Build resources by Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Container Apps Build Resource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String containerAppName); + + /** + * List Container Apps Build resources by Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Container Apps Build Resource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String containerAppName, + Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsClient.java new file mode 100644 index 000000000000..7d3c288df126 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsClient.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.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.ContainerAppsBuildResourceInner; + +/** + * An instance of this class provides access to all the operations defined in ContainerAppsBuildsClient. + */ +public interface ContainerAppsBuildsClient { + /** + * Get a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @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.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Container Apps Build resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String containerAppName, + String buildName, Context context); + + /** + * Get a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Container Apps Build resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ContainerAppsBuildResourceInner get(String resourceGroupName, String containerAppName, String buildName); + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 containerAppName, String buildName); + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @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.core.management.exception.ManagementException thrown if the request is 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 containerAppName, String buildName, + Context context); + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String containerAppName, String buildName); + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @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.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String containerAppName, String buildName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsPatchesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsPatchesClient.java new file mode 100644 index 000000000000..12ce9706f0b7 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsPatchesClient.java @@ -0,0 +1,263 @@ +// 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.ContainerAppsPatchResourceInner; +import com.azure.resourcemanager.appcontainers.models.PatchSkipConfig; + +/** + * An instance of this class provides access to all the operations defined in ContainerAppsPatchesClient. + */ +public interface ContainerAppsPatchesClient { + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 collection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByContainerApp(String resourceGroupName, + String containerAppName); + + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq + * 'Succeeded'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 collection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, + String filter, Context context); + + /** + * Get details for specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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.core.management.exception.ManagementException 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 Container Apps Patch by patch name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String containerAppName, + String patchName, Context context); + + /** + * Get details for specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Container Apps Patch by patch name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ContainerAppsPatchResourceInner get(String resourceGroupName, String containerAppName, String patchName); + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 containerAppName, String patchName); + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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.core.management.exception.ManagementException thrown if the request is 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 containerAppName, String patchName, + Context context); + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String containerAppName, String patchName); + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String containerAppName, String patchName, Context context); + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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.core.management.exception.ManagementException thrown if the request is 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 containerAppName, + String patchName, PatchSkipConfig patchSkipConfig); + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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.core.management.exception.ManagementException thrown if the request is 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 containerAppName, + String patchName, PatchSkipConfig patchSkipConfig, Context context); + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void skipConfigure(String resourceGroupName, String containerAppName, String patchName, + PatchSkipConfig patchSkipConfig); + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void skipConfigure(String resourceGroupName, String containerAppName, String patchName, + PatchSkipConfig patchSkipConfig, Context context); + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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, ContainerAppsPatchResourceInner> + beginApply(String resourceGroupName, String containerAppName, String patchName); + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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.core.management.exception.ManagementException thrown if the request is 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, ContainerAppsPatchResourceInner> + beginApply(String resourceGroupName, String containerAppName, String patchName, Context context); + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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) + ContainerAppsPatchResourceInner apply(String resourceGroupName, String containerAppName, String patchName); + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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.core.management.exception.ManagementException 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) + ContainerAppsPatchResourceInner apply(String resourceGroupName, String containerAppName, String patchName, + Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSessionPoolsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSessionPoolsClient.java new file mode 100644 index 000000000000..78e691488e7d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSessionPoolsClient.java @@ -0,0 +1,315 @@ +// 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.SessionPoolInner; +import com.azure.resourcemanager.appcontainers.models.SessionPoolUpdatableProperties; + +/** + * An instance of this class provides access to all the operations defined in ContainerAppsSessionPoolsClient. + */ +public interface ContainerAppsSessionPoolsClient { + /** + * Get the session pools in a given subscription. + * + * @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 session pools in a given subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * Get the session pools in a given subscription. + * + * @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 session pools in a given subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * Get the session pools in a given resource group of a subscription. + * + * @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 session pools in a given resource group of a subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get the session pools in a given resource group of a subscription. + * + * @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 session pools in a given resource group of a subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get the properties of a session pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 properties of a session pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String sessionPoolName, + Context context); + + /** + * Get the properties of a session pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 properties of a session pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SessionPoolInner getByResourceGroup(String resourceGroupName, String sessionPoolName); + + /** + * Create or update a session pool. + * + * Create or update a session pool with the given properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SessionPoolInner> beginCreateOrUpdate(String resourceGroupName, + String sessionPoolName, SessionPoolInner sessionPoolEnvelope); + + /** + * Create or update a session pool. + * + * Create or update a session pool with the given properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SessionPoolInner> beginCreateOrUpdate(String resourceGroupName, + String sessionPoolName, SessionPoolInner sessionPoolEnvelope, Context context); + + /** + * Create or update a session pool. + * + * Create or update a session pool with the given properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SessionPoolInner createOrUpdate(String resourceGroupName, String sessionPoolName, + SessionPoolInner sessionPoolEnvelope); + + /** + * Create or update a session pool. + * + * Create or update a session pool with the given properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SessionPoolInner createOrUpdate(String resourceGroupName, String sessionPoolName, + SessionPoolInner sessionPoolEnvelope, Context context); + + /** + * Update properties of a session pool + * + * Patches a session pool using JSON merge patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SessionPoolInner> beginUpdate(String resourceGroupName, + String sessionPoolName, SessionPoolUpdatableProperties sessionPoolEnvelope); + + /** + * Update properties of a session pool + * + * Patches a session pool using JSON merge patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, SessionPoolInner> beginUpdate(String resourceGroupName, + String sessionPoolName, SessionPoolUpdatableProperties sessionPoolEnvelope, Context context); + + /** + * Update properties of a session pool + * + * Patches a session pool using JSON merge patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SessionPoolInner update(String resourceGroupName, String sessionPoolName, + SessionPoolUpdatableProperties sessionPoolEnvelope); + + /** + * Update properties of a session pool + * + * Patches a session pool using JSON merge patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SessionPoolInner update(String resourceGroupName, String sessionPoolName, + SessionPoolUpdatableProperties sessionPoolEnvelope, Context context); + + /** + * Delete a session pool. + * + * Delete the session pool with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 sessionPoolName); + + /** + * Delete a session pool. + * + * Delete the session pool with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 sessionPoolName, Context context); + + /** + * Delete a session pool. + * + * Delete the session pool with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 sessionPoolName); + + /** + * Delete a session pool. + * + * Delete the session pool with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 sessionPoolName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/FunctionsExtensionsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/FunctionsExtensionsClient.java new file mode 100644 index 000000000000..45732c3aac77 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/FunctionsExtensionsClient.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.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * An instance of this class provides access to all the operations defined in FunctionsExtensionsClient. + */ +public interface FunctionsExtensionsClient { + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @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 body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response invokeFunctionsHostWithResponse(String resourceGroupName, String containerAppName, + String revisionName, String functionAppName, Context context); + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + String invokeFunctionsHost(String resourceGroupName, String containerAppName, String revisionName, + String functionAppName); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentPrivateEndpointConnectionsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentPrivateEndpointConnectionsClient.java new file mode 100644 index 000000000000..37a4ed33fe03 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentPrivateEndpointConnectionsClient.java @@ -0,0 +1,219 @@ +// 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.PrivateEndpointConnectionInner; + +/** + * An instance of this class provides access to all the operations defined in + * ManagedEnvironmentPrivateEndpointConnectionsClient. + */ +public interface ManagedEnvironmentPrivateEndpointConnectionsClient { + /** + * List private endpoint connections for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified resource as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String environmentName); + + /** + * List private endpoint connections for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified resource as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String environmentName, + Context context); + + /** + * Get a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection for a given managed environment along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String environmentName, + String privateEndpointConnectionName, Context context); + + /** + * Get a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection for a given managed environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner get(String resourceGroupName, String environmentName, + String privateEndpointConnectionName); + + /** + * Update the state of a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( + String resourceGroupName, String environmentName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner privateEndpointConnectionEnvelope); + + /** + * Update the state of a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( + String resourceGroupName, String environmentName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner privateEndpointConnectionEnvelope, Context context); + + /** + * Update the state of a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String environmentName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnectionEnvelope); + + /** + * Update the state of a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String environmentName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnectionEnvelope, + Context context); + + /** + * Delete a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName, + String privateEndpointConnectionName); + + /** + * Delete a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName, + String privateEndpointConnectionName, Context context); + + /** + * Delete a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String environmentName, String privateEndpointConnectionName); + + /** + * Delete a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String environmentName, String privateEndpointConnectionName, + Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentPrivateLinkResourcesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentPrivateLinkResourcesClient.java new file mode 100644 index 000000000000..7235c21740e7 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentPrivateLinkResourcesClient.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.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.PrivateLinkResourceInner; + +/** + * An instance of this class provides access to all the operations defined in + * ManagedEnvironmentPrivateLinkResourcesClient. + */ +public interface ManagedEnvironmentPrivateLinkResourcesClient { + /** + * List private link resources for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String environmentName); + + /** + * List private link resources for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources 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/models/AuthConfigProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigProperties.java index 2dd5af9254bd..db4344dd4f30 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 @@ -25,15 +25,13 @@ public final class AuthConfigProperties { private AuthPlatform platform; /* - * The configuration settings that determines the validation flow of users using Service - * Authentication/Authorization. + * The configuration settings that determines the validation flow of users using Service Authentication/Authorization. */ @JsonProperty(value = "globalValidation") private GlobalValidation globalValidation; /* - * The configuration settings of each of the identity providers used to configure ContainerApp Service - * Authentication/Authorization. + * The configuration settings of each of the identity providers used to configure ContainerApp Service Authentication/Authorization. */ @JsonProperty(value = "identityProviders") private IdentityProviders identityProviders; @@ -45,15 +43,13 @@ public final class AuthConfigProperties { private Login login; /* - * The configuration settings of the HTTP requests for authentication and authorization requests made against - * ContainerApp Service Authentication/Authorization. + * The configuration settings of the HTTP requests for authentication and authorization requests made against ContainerApp Service Authentication/Authorization. */ @JsonProperty(value = "httpSettings") private HttpSettings httpSettings; /* - * The configuration settings of the secrets references of encryption key and signing key for ContainerApp Service - * Authentication/Authorization. + * The configuration settings of the secrets references of encryption key and signing key for ContainerApp Service Authentication/Authorization. */ @JsonProperty(value = "encryptionSettings") private EncryptionSettings encryptionSettings; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BillingMeterCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BillingMeterCollectionInner.java index 9508a6498f6e..b1b5baaf908a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BillingMeterCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BillingMeterCollectionInner.java @@ -54,8 +54,9 @@ public BillingMeterCollectionInner withValue(List value) { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model BillingMeterCollectionInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model BillingMeterCollectionInner")); } else { value().forEach(e -> e.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 index 4004bc345160..1a1b95455e2b 100644 --- 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 @@ -100,8 +100,9 @@ public BuilderProperties withContainerRegistries(List contain */ public void validate() { if (environmentId() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property environmentId in model BuilderProperties")); + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property environmentId in model BuilderProperties")); } if (containerRegistries() != null) { containerRegistries().forEach(e -> e.validate()); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentInner.java index 79a0b8bbeb9d..bd819522dca8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentInner.java @@ -149,8 +149,8 @@ public ConnectedEnvironmentInner withStaticIp(String staticIp) { } /** - * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service - * to Service communication telemetry. + * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to + * Service communication telemetry. * * @return the daprAIConnectionString value. */ @@ -159,8 +159,8 @@ public String daprAIConnectionString() { } /** - * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service - * to Service communication telemetry. + * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to + * Service communication telemetry. * * @param daprAIConnectionString the daprAIConnectionString value to set. * @return the ConnectedEnvironmentInner object itself. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentProperties.java index f9eb45032dfc..fb4bf5b14804 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentProperties.java @@ -104,8 +104,8 @@ public ConnectedEnvironmentProperties withStaticIp(String staticIp) { } /** - * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service - * to Service communication telemetry. + * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to + * Service communication telemetry. * * @return the daprAIConnectionString value. */ @@ -114,8 +114,8 @@ public String daprAIConnectionString() { } /** - * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service - * to Service communication telemetry. + * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to + * Service communication telemetry. * * @param daprAIConnectionString the daprAIConnectionString value to set. * @return the ConnectedEnvironmentProperties object itself. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.java index 53bca84c6d61..171ee0d4ee58 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.java @@ -53,8 +53,9 @@ public ConnectedEnvironmentStoragesCollectionInner withValue(List e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java index a51478dfb1d9..19ae7d83aabf 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java @@ -8,8 +8,10 @@ import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.Configuration; +import com.azure.resourcemanager.appcontainers.models.ContainerAppPropertiesPatchingConfiguration; import com.azure.resourcemanager.appcontainers.models.ContainerAppProvisioningState; import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; +import com.azure.resourcemanager.appcontainers.models.Kind; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.Template; import com.fasterxml.jackson.annotation.JsonProperty; @@ -28,20 +30,23 @@ public final class ContainerAppInner extends Resource { private ExtendedLocation extendedLocation; /* - * managed identities for the Container App to interact with other Azure services without maintaining any secrets - * or credentials in code. + * managed identities for the Container App to interact with other Azure services without maintaining any secrets or credentials in code. */ @JsonProperty(value = "identity") private ManagedServiceIdentity identity; /* - * The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is - * managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if - * it is removed from the template since it is managed by another resource. + * The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. */ @JsonProperty(value = "managedBy") private String managedBy; + /* + * Metadata used to render different experiences for resources of the same type; e.g. WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider must validate and persist this value. + */ + @JsonProperty(value = "kind") + private Kind kind; + /* * ContainerApp resource specific properties */ @@ -81,8 +86,8 @@ public ContainerAppInner withExtendedLocation(ExtendedLocation extendedLocation) } /** - * Get the identity property: managed identities for the Container App to interact with other Azure services - * without maintaining any secrets or credentials in code. + * Get the identity property: managed identities for the Container App to interact with other Azure services without + * maintaining any secrets or credentials in code. * * @return the identity value. */ @@ -91,8 +96,8 @@ public ManagedServiceIdentity identity() { } /** - * Set the identity property: managed identities for the Container App to interact with other Azure services - * without maintaining any secrets or credentials in code. + * Set the identity property: managed identities for the Container App to interact with other Azure services without + * maintaining any secrets or credentials in code. * * @param identity the identity value to set. * @return the ContainerAppInner object itself. @@ -103,9 +108,9 @@ public ContainerAppInner withIdentity(ManagedServiceIdentity identity) { } /** - * Get the managedBy property: The fully qualified resource ID of the resource that manages this resource. - * Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment - * will not delete the resource if it is removed from the template since it is managed by another resource. + * Get the managedBy property: The fully qualified resource ID of the resource that manages this resource. Indicates + * if this resource is managed by another Azure resource. If this is present, complete mode deployment will not + * delete the resource if it is removed from the template since it is managed by another resource. * * @return the managedBy value. */ @@ -114,9 +119,9 @@ public String managedBy() { } /** - * Set the managedBy property: The fully qualified resource ID of the resource that manages this resource. - * Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment - * will not delete the resource if it is removed from the template since it is managed by another resource. + * Set the managedBy property: The fully qualified resource ID of the resource that manages this resource. Indicates + * if this resource is managed by another Azure resource. If this is present, complete mode deployment will not + * delete the resource if it is removed from the template since it is managed by another resource. * * @param managedBy the managedBy value to set. * @return the ContainerAppInner object itself. @@ -126,6 +131,30 @@ public ContainerAppInner withManagedBy(String managedBy) { return this; } + /** + * Get the kind property: Metadata used to render different experiences for resources of the same type; e.g. + * WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider must validate and + * persist this value. + * + * @return the kind value. + */ + public Kind kind() { + return this.kind; + } + + /** + * Set the kind property: Metadata used to render different experiences for resources of the same type; e.g. + * WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider must validate and + * persist this value. + * + * @param kind the kind value to set. + * @return the ContainerAppInner object itself. + */ + public ContainerAppInner withKind(Kind kind) { + this.kind = kind; + return this; + } + /** * Get the innerProperties property: ContainerApp resource specific properties. * @@ -240,6 +269,30 @@ public ContainerAppInner withWorkloadProfileName(String workloadProfileName) { return this; } + /** + * Get the patchingConfiguration property: Container App auto patch configuration. + * + * @return the patchingConfiguration value. + */ + public ContainerAppPropertiesPatchingConfiguration patchingConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().patchingConfiguration(); + } + + /** + * Set the patchingConfiguration property: Container App auto patch configuration. + * + * @param patchingConfiguration the patchingConfiguration value to set. + * @return the ContainerAppInner object itself. + */ + public ContainerAppInner + withPatchingConfiguration(ContainerAppPropertiesPatchingConfiguration patchingConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new ContainerAppProperties(); + } + this.innerProperties().withPatchingConfiguration(patchingConfiguration); + return this; + } + /** * Get the latestRevisionName property: Name of the latest revision of the Container App. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppJobExecutionsInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppJobExecutionsInner.java index be02df97a4b8..665a3b1d6ed3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppJobExecutionsInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppJobExecutionsInner.java @@ -68,8 +68,9 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property value in model ContainerAppJobExecutionsInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ContainerAppJobExecutionsInner")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java index 312d98bd745c..a4751afca8a1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.appcontainers.models.Configuration; +import com.azure.resourcemanager.appcontainers.models.ContainerAppPropertiesPatchingConfiguration; import com.azure.resourcemanager.appcontainers.models.ContainerAppProvisioningState; import com.azure.resourcemanager.appcontainers.models.Template; import com.fasterxml.jackson.annotation.JsonProperty; @@ -40,6 +41,12 @@ public final class ContainerAppProperties { @JsonProperty(value = "workloadProfileName") private String workloadProfileName; + /* + * Container App auto patch configuration. + */ + @JsonProperty(value = "patchingConfiguration") + private ContainerAppPropertiesPatchingConfiguration patchingConfiguration; + /* * Name of the latest revision of the Container App. */ @@ -163,6 +170,27 @@ public ContainerAppProperties withWorkloadProfileName(String workloadProfileName return this; } + /** + * Get the patchingConfiguration property: Container App auto patch configuration. + * + * @return the patchingConfiguration value. + */ + public ContainerAppPropertiesPatchingConfiguration patchingConfiguration() { + return this.patchingConfiguration; + } + + /** + * Set the patchingConfiguration property: Container App auto patch configuration. + * + * @param patchingConfiguration the patchingConfiguration value to set. + * @return the ContainerAppProperties object itself. + */ + public ContainerAppProperties + withPatchingConfiguration(ContainerAppPropertiesPatchingConfiguration patchingConfiguration) { + this.patchingConfiguration = patchingConfiguration; + return this; + } + /** * Get the latestRevisionName property: Name of the latest revision of the Container App. * @@ -263,6 +291,9 @@ public String eventStreamEndpoint() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (patchingConfiguration() != null) { + patchingConfiguration().validate(); + } if (configuration() != null) { configuration().validate(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsBuildProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsBuildProperties.java new file mode 100644 index 000000000000..964024fa64dc --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsBuildProperties.java @@ -0,0 +1,113 @@ +// 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.resourcemanager.appcontainers.models.BuildProvisioningState; +import com.azure.resourcemanager.appcontainers.models.BuildStatus; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildConfiguration; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ContainerAppBuild properties. + */ +@Immutable +public final class ContainerAppsBuildProperties { + /* + * 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", access = JsonProperty.Access.WRITE_ONLY) + private ContainerRegistryWithCustomImage destinationContainerRegistry; + + /* + * Configuration of the build. + */ + @JsonProperty(value = "configuration", access = JsonProperty.Access.WRITE_ONLY) + private ContainerAppsBuildConfiguration configuration; + + /* + * Endpoint from which the build logs can be streamed. + */ + @JsonProperty(value = "logStreamEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String logStreamEndpoint; + + /** + * Creates an instance of ContainerAppsBuildProperties class. + */ + public ContainerAppsBuildProperties() { + } + + /** + * 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; + } + + /** + * Get the configuration property: Configuration of the build. + * + * @return the configuration value. + */ + public ContainerAppsBuildConfiguration configuration() { + return this.configuration; + } + + /** + * Get the logStreamEndpoint property: Endpoint from which the build logs can be streamed. + * + * @return the logStreamEndpoint value. + */ + public String logStreamEndpoint() { + return this.logStreamEndpoint; + } + + /** + * 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/ContainerAppsBuildResourceInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsBuildResourceInner.java new file mode 100644 index 000000000000..fd417e534aa4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsBuildResourceInner.java @@ -0,0 +1,112 @@ +// 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.BuildProvisioningState; +import com.azure.resourcemanager.appcontainers.models.BuildStatus; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildConfiguration; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information pertaining to an individual build. + */ +@Immutable +public final class ContainerAppsBuildResourceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private ContainerAppsBuildProperties 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 ContainerAppsBuildResourceInner class. + */ + public ContainerAppsBuildResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private ContainerAppsBuildProperties 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(); + } + + /** + * Get the configuration property: Configuration of the build. + * + * @return the configuration value. + */ + public ContainerAppsBuildConfiguration configuration() { + return this.innerProperties() == null ? null : this.innerProperties().configuration(); + } + + /** + * Get the logStreamEndpoint property: Endpoint from which the build logs can be streamed. + * + * @return the logStreamEndpoint value. + */ + public String logStreamEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().logStreamEndpoint(); + } + + /** + * 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/ContainerAppsPatchResourceInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsPatchResourceInner.java new file mode 100644 index 000000000000..34145a127eee --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsPatchResourceInner.java @@ -0,0 +1,64 @@ +// 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 ContainerAppsPatchResourceInner 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 ContainerAppsPatchResourceInner class. + */ + public ContainerAppsPatchResourceInner() { + } + + /** + * 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/CustomHostnameAnalysisResultInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java index 4f00be750b53..6922e5317c8e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java @@ -40,15 +40,13 @@ public final class CustomHostnameAnalysisResultInner { private CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo; /* - * true if there is a conflict on the Container App's managed environment; otherwise, - * false. + * true if there is a conflict on the Container App's managed environment; otherwise, false. */ @JsonProperty(value = "hasConflictOnManagedEnvironment", access = JsonProperty.Access.WRITE_ONLY) private Boolean hasConflictOnManagedEnvironment; /* - * true if there is a conflict on the Container App's managed environment level custom domain; - * otherwise, false. + * true if there is a conflict on the Container App's managed environment level custom domain; otherwise, false. */ @JsonProperty(value = "conflictWithEnvironmentCustomDomain", access = JsonProperty.Access.WRITE_ONLY) private Boolean conflictWithEnvironmentCustomDomain; @@ -143,8 +141,8 @@ public Boolean hasConflictOnManagedEnvironment() { } /** - * Get the conflictWithEnvironmentCustomDomain property: <code>true</code> if there is a conflict on - * the Container App's managed environment level custom domain; otherwise, <code>false</code>. + * Get the conflictWithEnvironmentCustomDomain property: <code>true</code> if there is a conflict on the + * Container App's managed environment level custom domain; otherwise, <code>false</code>. * * @return the conflictWithEnvironmentCustomDomain value. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSecretsCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSecretsCollectionInner.java index 4f4b9a166bde..ca7171d645d3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSecretsCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSecretsCollectionInner.java @@ -54,8 +54,9 @@ public DaprSecretsCollectionInner withValue(List value) { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model DaprSecretsCollectionInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model DaprSecretsCollectionInner")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsCollectionInner.java index 3467b799bcbb..c8aa84f648bd 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsCollectionInner.java @@ -68,8 +68,9 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model DiagnosticsCollectionInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model DiagnosticsCollectionInner")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JavaComponentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JavaComponentInner.java index cedf0eaf85e1..4340ed8e2712 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JavaComponentInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JavaComponentInner.java @@ -7,12 +7,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.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; +import com.azure.resourcemanager.appcontainers.models.JavaComponentProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; /** * Java Component. @@ -23,7 +19,7 @@ public final class JavaComponentInner extends ProxyResource { * Java Component resource specific properties */ @JsonProperty(value = "properties") - private JavaComponentProperties innerProperties; + private JavaComponentProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -38,99 +34,32 @@ public JavaComponentInner() { } /** - * Get the innerProperties property: Java Component resource specific properties. + * Get the properties property: Java Component resource specific properties. * - * @return the innerProperties value. + * @return the properties value. */ - private JavaComponentProperties innerProperties() { - return this.innerProperties; + public JavaComponentProperties properties() { + return this.properties; } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the componentType property: Type of the Java Component. + * Set the properties property: Java Component resource specific properties. * - * @return the componentType value. - */ - public JavaComponentType componentType() { - return this.innerProperties() == null ? null : this.innerProperties().componentType(); - } - - /** - * Set the componentType property: Type of the Java Component. - * - * @param componentType the componentType value to set. + * @param properties the properties value to set. * @return the JavaComponentInner object itself. */ - public JavaComponentInner withComponentType(JavaComponentType componentType) { - if (this.innerProperties() == null) { - this.innerProperties = new JavaComponentProperties(); - } - this.innerProperties().withComponentType(componentType); + public JavaComponentInner withProperties(JavaComponentProperties properties) { + this.properties = properties; return this; } /** - * Get the provisioningState property: Provisioning state of the Java Component. - * - * @return the provisioningState value. - */ - public JavaComponentProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the configurations property: List of Java Components configuration properties. - * - * @return the configurations value. - */ - public List configurations() { - return this.innerProperties() == null ? null : this.innerProperties().configurations(); - } - - /** - * Set the configurations property: List of Java Components configuration properties. - * - * @param configurations the configurations value to set. - * @return the JavaComponentInner object itself. - */ - public JavaComponentInner withConfigurations(List configurations) { - if (this.innerProperties() == null) { - this.innerProperties = new JavaComponentProperties(); - } - this.innerProperties().withConfigurations(configurations); - return this; - } - - /** - * Get the serviceBinds property: List of Java Components that are bound to the Java component. - * - * @return the serviceBinds value. - */ - public List serviceBinds() { - return this.innerProperties() == null ? null : this.innerProperties().serviceBinds(); - } - - /** - * Set the serviceBinds property: List of Java Components that are bound to the Java component. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @param serviceBinds the serviceBinds value to set. - * @return the JavaComponentInner object itself. + * @return the systemData value. */ - public JavaComponentInner withServiceBinds(List serviceBinds) { - if (this.innerProperties() == null) { - this.innerProperties = new JavaComponentProperties(); - } - this.innerProperties().withServiceBinds(serviceBinds); - return this; + public SystemData systemData() { + return this.systemData; } /** @@ -139,8 +68,8 @@ public JavaComponentInner withServiceBinds(List servic * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (properties() != null) { + properties().validate(); } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionInner.java index d407d72fc16f..f5d3db346f1c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.appcontainers.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.models.ExecutionStatus; import com.azure.resourcemanager.appcontainers.models.JobExecutionRunningState; import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; import com.fasterxml.jackson.annotation.JsonProperty; @@ -192,6 +193,29 @@ public JobExecutionInner withTemplate(JobExecutionTemplate template) { return this; } + /** + * Get the detailedStatus property: Detailed status of the job execution. + * + * @return the detailedStatus value. + */ + public ExecutionStatus detailedStatus() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); + } + + /** + * Set the detailedStatus property: Detailed status of the job execution. + * + * @param detailedStatus the detailedStatus value to set. + * @return the JobExecutionInner object itself. + */ + public JobExecutionInner withDetailedStatus(ExecutionStatus detailedStatus) { + if (this.innerProperties() == null) { + this.innerProperties = new JobExecutionProperties(); + } + this.innerProperties().withDetailedStatus(detailedStatus); + return this; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionProperties.java index 38038116fad5..3568e1835e9d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.appcontainers.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.models.ExecutionStatus; import com.azure.resourcemanager.appcontainers.models.JobExecutionRunningState; import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; import com.fasterxml.jackson.annotation.JsonProperty; @@ -39,6 +40,12 @@ public final class JobExecutionProperties { @JsonProperty(value = "template") private JobExecutionTemplate template; + /* + * Detailed status of the job execution. + */ + @JsonProperty(value = "detailedStatus") + private ExecutionStatus detailedStatus; + /** * Creates an instance of JobExecutionProperties class. */ @@ -114,6 +121,26 @@ public JobExecutionProperties withTemplate(JobExecutionTemplate template) { return this; } + /** + * Get the detailedStatus property: Detailed status of the job execution. + * + * @return the detailedStatus value. + */ + public ExecutionStatus detailedStatus() { + return this.detailedStatus; + } + + /** + * Set the detailedStatus property: Detailed status of the job execution. + * + * @param detailedStatus the detailedStatus value to set. + * @return the JobExecutionProperties object itself. + */ + public JobExecutionProperties withDetailedStatus(ExecutionStatus detailedStatus) { + this.detailedStatus = detailedStatus; + return this; + } + /** * Validates the instance. * @@ -123,5 +150,8 @@ public void validate() { if (template() != null) { template().validate(); } + if (detailedStatus() != null) { + detailedStatus().validate(); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobInner.java index 1f480d8be425..7445b61745d7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobInner.java @@ -28,8 +28,7 @@ public final class JobInner extends Resource { private ExtendedLocation extendedLocation; /* - * Managed identities needed by a container app job to interact with other Azure services to not maintain any - * secrets or credentials in code. + * Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. */ @JsonProperty(value = "identity") private ManagedServiceIdentity identity; @@ -73,8 +72,8 @@ public JobInner withExtendedLocation(ExtendedLocation extendedLocation) { } /** - * Get the identity property: Managed identities needed by a container app job to interact with other Azure - * services to not maintain any secrets or credentials in code. + * Get the identity property: Managed identities needed by a container app job to interact with other Azure services + * to not maintain any secrets or credentials in code. * * @return the identity value. */ @@ -83,8 +82,8 @@ public ManagedServiceIdentity identity() { } /** - * Set the identity property: Managed identities needed by a container app job to interact with other Azure - * services to not maintain any secrets or credentials in code. + * Set the identity property: Managed identities needed by a container app job to interact with other Azure services + * to not maintain any secrets or credentials in code. * * @param identity the identity value to set. * @return the JobInner object itself. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobSecretsCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobSecretsCollectionInner.java index 47707c7fade7..c55b5a147a7b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobSecretsCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobSecretsCollectionInner.java @@ -54,8 +54,9 @@ public JobSecretsCollectionInner withValue(List value) { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model JobSecretsCollectionInner")); + throw LOGGER.atError() + .log( + new IllegalArgumentException("Missing required property value in model JobSecretsCollectionInner")); } else { value().forEach(e -> e.validate()); } 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 c31e5a5ee4f0..7fd69802682f 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 @@ -14,6 +14,7 @@ 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.ManagedEnvironmentPropertiesPeerTrafficConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; @@ -34,8 +35,7 @@ public final class ManagedEnvironmentInner extends Resource { private String kind; /* - * Managed identities for the Managed Environment to interact with other Azure services without maintaining any - * secrets or credentials in code. + * Managed identities for the Managed Environment to interact with other Azure services without maintaining any secrets or credentials in code. */ @JsonProperty(value = "identity") private ManagedServiceIdentity identity; @@ -171,8 +171,8 @@ public ManagedEnvironmentInner withDaprAIInstrumentationKey(String daprAIInstrum } /** - * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service - * to Service communication telemetry. + * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to + * Service communication telemetry. * * @return the daprAIConnectionString value. */ @@ -181,8 +181,8 @@ public String daprAIConnectionString() { } /** - * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service - * to Service communication telemetry. + * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to + * Service communication telemetry. * * @param daprAIConnectionString the daprAIConnectionString value to set. * @return the ManagedEnvironmentInner object itself. @@ -444,9 +444,9 @@ public ManagedEnvironmentInner withDaprConfiguration(DaprConfiguration daprConfi } /** - * Get the infrastructureResourceGroup property: Name of the platform-managed resource group created for the - * Managed Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be - * created in the same subscription as the subnet. + * Get the infrastructureResourceGroup property: Name of the platform-managed resource group created for the Managed + * Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be created in + * the same subscription as the subnet. * * @return the infrastructureResourceGroup value. */ @@ -455,9 +455,9 @@ public String infrastructureResourceGroup() { } /** - * Set the infrastructureResourceGroup property: Name of the platform-managed resource group created for the - * Managed Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be - * created in the same subscription as the subnet. + * Set the infrastructureResourceGroup property: Name of the platform-managed resource group created for the Managed + * Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be created in + * the same subscription as the subnet. * * @param infrastructureResourceGroup the infrastructureResourceGroup value to set. * @return the ManagedEnvironmentInner object itself. @@ -494,6 +494,39 @@ public ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication() { return this; } + /** + * Get the peerTrafficConfiguration property: Peer traffic settings for the Managed Environment. + * + * @return the peerTrafficConfiguration value. + */ + public ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().peerTrafficConfiguration(); + } + + /** + * Set the peerTrafficConfiguration property: Peer traffic settings for the Managed Environment. + * + * @param peerTrafficConfiguration the peerTrafficConfiguration value to set. + * @return the ManagedEnvironmentInner object itself. + */ + public ManagedEnvironmentInner + withPeerTrafficConfiguration(ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedEnvironmentProperties(); + } + this.innerProperties().withPeerTrafficConfiguration(peerTrafficConfiguration); + return this; + } + + /** + * Get the privateEndpointConnections property: Private endpoint connections to the resource. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); + } + /** * Validates the instance. * 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 8cdc1ac40fbd..18738a87828c 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 @@ -12,6 +12,7 @@ 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.ManagedEnvironmentPropertiesPeerTrafficConfiguration; import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; @@ -122,9 +123,7 @@ public final class ManagedEnvironmentProperties { private DaprConfiguration daprConfiguration; /* - * Name of the platform-managed resource group created for the Managed Environment to host infrastructure - * resources. If a subnet ID is provided, this resource group will be created in the same subscription as the - * subnet. + * Name of the platform-managed resource group created for the Managed Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be created in the same subscription as the subnet. */ @JsonProperty(value = "infrastructureResourceGroup") private String infrastructureResourceGroup; @@ -135,6 +134,18 @@ public final class ManagedEnvironmentProperties { @JsonProperty(value = "peerAuthentication") private ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication; + /* + * Peer traffic settings for the Managed Environment + */ + @JsonProperty(value = "peerTrafficConfiguration") + private ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration; + + /* + * Private endpoint connections to the resource. + */ + @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; + /** * Creates an instance of ManagedEnvironmentProperties class. */ @@ -173,8 +184,8 @@ public ManagedEnvironmentProperties withDaprAIInstrumentationKey(String daprAIIn } /** - * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service - * to Service communication telemetry. + * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to + * Service communication telemetry. * * @return the daprAIConnectionString value. */ @@ -183,8 +194,8 @@ public String daprAIConnectionString() { } /** - * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service - * to Service communication telemetry. + * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to + * Service communication telemetry. * * @param daprAIConnectionString the daprAIConnectionString value to set. * @return the ManagedEnvironmentProperties object itself. @@ -418,9 +429,9 @@ public ManagedEnvironmentProperties withDaprConfiguration(DaprConfiguration dapr } /** - * Get the infrastructureResourceGroup property: Name of the platform-managed resource group created for the - * Managed Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be - * created in the same subscription as the subnet. + * Get the infrastructureResourceGroup property: Name of the platform-managed resource group created for the Managed + * Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be created in + * the same subscription as the subnet. * * @return the infrastructureResourceGroup value. */ @@ -429,9 +440,9 @@ public String infrastructureResourceGroup() { } /** - * Set the infrastructureResourceGroup property: Name of the platform-managed resource group created for the - * Managed Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be - * created in the same subscription as the subnet. + * Set the infrastructureResourceGroup property: Name of the platform-managed resource group created for the Managed + * Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be created in + * the same subscription as the subnet. * * @param infrastructureResourceGroup the infrastructureResourceGroup value to set. * @return the ManagedEnvironmentProperties object itself. @@ -462,6 +473,36 @@ public ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication() { return this; } + /** + * Get the peerTrafficConfiguration property: Peer traffic settings for the Managed Environment. + * + * @return the peerTrafficConfiguration value. + */ + public ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration() { + return this.peerTrafficConfiguration; + } + + /** + * Set the peerTrafficConfiguration property: Peer traffic settings for the Managed Environment. + * + * @param peerTrafficConfiguration the peerTrafficConfiguration value to set. + * @return the ManagedEnvironmentProperties object itself. + */ + public ManagedEnvironmentProperties + withPeerTrafficConfiguration(ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration) { + this.peerTrafficConfiguration = peerTrafficConfiguration; + return this; + } + + /** + * Get the privateEndpointConnections property: Private endpoint connections to the resource. + * + * @return the privateEndpointConnections value. + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + /** * Validates the instance. * @@ -495,5 +536,11 @@ public void validate() { if (peerAuthentication() != null) { peerAuthentication().validate(); } + if (peerTrafficConfiguration() != null) { + peerTrafficConfiguration().validate(); + } + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.validate()); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStoragesCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStoragesCollectionInner.java index 58a26bebfd69..3a2d90a0b376 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStoragesCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStoragesCollectionInner.java @@ -53,8 +53,9 @@ public ManagedEnvironmentStoragesCollectionInner withValue(List e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateEndpointConnectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateEndpointConnectionInner.java new file mode 100644 index 000000000000..89c2a5036bee --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateEndpointConnectionInner.java @@ -0,0 +1,134 @@ +// 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.PrivateEndpoint; +import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The Private Endpoint Connection resource. + */ +@Fluent +public final class PrivateEndpointConnectionInner extends ProxyResource { + /* + * Resource properties. + */ + @JsonProperty(value = "properties") + private PrivateEndpointConnectionProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of PrivateEndpointConnectionInner class. + */ + public PrivateEndpointConnectionInner() { + } + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private PrivateEndpointConnectionProperties 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 groupIds property: The group ids for the private endpoint resource. + * + * @return the groupIds value. + */ + public List groupIds() { + return this.innerProperties() == null ? null : this.innerProperties().groupIds(); + } + + /** + * Get the privateEndpoint property: The resource of private end point. + * + * @return the privateEndpoint value. + */ + public PrivateEndpoint privateEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); + } + + /** + * Set the privateEndpoint property: The resource of private end point. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateEndpoint(privateEndpoint); + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); + } + + /** + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateEndpointConnectionInner object itself. + */ + public PrivateEndpointConnectionInner + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateEndpointConnectionProperties(); + } + this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the private endpoint connection resource. + * + * @return the provisioningState value. + */ + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateEndpointConnectionProperties.java new file mode 100644 index 000000000000..2c2e5ddf408e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateEndpointConnectionProperties.java @@ -0,0 +1,130 @@ +// 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.PrivateEndpoint; +import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Properties of the private endpoint connection. + */ +@Fluent +public final class PrivateEndpointConnectionProperties { + /* + * The group ids for the private endpoint resource. + */ + @JsonProperty(value = "groupIds", access = JsonProperty.Access.WRITE_ONLY) + private List groupIds; + + /* + * The resource of private end point. + */ + @JsonProperty(value = "privateEndpoint") + private PrivateEndpoint privateEndpoint; + + /* + * A collection of information about the state of the connection between service consumer and provider. + */ + @JsonProperty(value = "privateLinkServiceConnectionState", required = true) + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /* + * The provisioning state of the private endpoint connection resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private PrivateEndpointConnectionProvisioningState provisioningState; + + /** + * Creates an instance of PrivateEndpointConnectionProperties class. + */ + public PrivateEndpointConnectionProperties() { + } + + /** + * Get the groupIds property: The group ids for the private endpoint resource. + * + * @return the groupIds value. + */ + public List groupIds() { + return this.groupIds; + } + + /** + * Get the privateEndpoint property: The resource of private end point. + * + * @return the privateEndpoint value. + */ + public PrivateEndpoint privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the privateEndpoint property: The resource of private end point. + * + * @param privateEndpoint the privateEndpoint value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set the privateLinkServiceConnectionState property: A collection of information about the state of the connection + * between service consumer and provider. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set. + * @return the PrivateEndpointConnectionProperties object itself. + */ + public PrivateEndpointConnectionProperties + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + + /** + * Get the provisioningState property: The provisioning state of the private endpoint connection resource. + * + * @return the provisioningState value. + */ + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (privateEndpoint() != null) { + privateEndpoint().validate(); + } + if (privateLinkServiceConnectionState() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property privateLinkServiceConnectionState in model PrivateEndpointConnectionProperties")); + } else { + privateLinkServiceConnectionState().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateLinkResourceInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateLinkResourceInner.java new file mode 100644 index 000000000000..fcd0db6e63e0 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateLinkResourceInner.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A private link resource. + */ +@Fluent +public final class PrivateLinkResourceInner extends ProxyResource { + /* + * Resource properties. + */ + @JsonProperty(value = "properties") + private PrivateLinkResourceProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of PrivateLinkResourceInner class. + */ + public PrivateLinkResourceInner() { + } + + /** + * Get the innerProperties property: Resource properties. + * + * @return the innerProperties value. + */ + private PrivateLinkResourceProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + public String groupId() { + return this.innerProperties() == null ? null : this.innerProperties().groupId(); + } + + /** + * Get the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.innerProperties() == null ? null : this.innerProperties().requiredMembers(); + } + + /** + * Get the requiredZoneNames property: The private link resource private link DNS zone name. + * + * @return the requiredZoneNames value. + */ + public List requiredZoneNames() { + return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); + } + + /** + * Set the requiredZoneNames property: The private link resource private link DNS zone name. + * + * @param requiredZoneNames the requiredZoneNames value to set. + * @return the PrivateLinkResourceInner object itself. + */ + public PrivateLinkResourceInner withRequiredZoneNames(List requiredZoneNames) { + if (this.innerProperties() == null) { + this.innerProperties = new PrivateLinkResourceProperties(); + } + this.innerProperties().withRequiredZoneNames(requiredZoneNames); + return this; + } + + /** + * Validates the instance. + * + * @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/PrivateLinkResourceProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateLinkResourceProperties.java new file mode 100644 index 000000000000..b2eadba60ea9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateLinkResourceProperties.java @@ -0,0 +1,85 @@ +// 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; +import java.util.List; + +/** + * Properties of a private link resource. + */ +@Fluent +public final class PrivateLinkResourceProperties { + /* + * The private link resource group id. + */ + @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY) + private String groupId; + + /* + * The private link resource required member names. + */ + @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY) + private List requiredMembers; + + /* + * The private link resource private link DNS zone name. + */ + @JsonProperty(value = "requiredZoneNames") + private List requiredZoneNames; + + /** + * Creates an instance of PrivateLinkResourceProperties class. + */ + public PrivateLinkResourceProperties() { + } + + /** + * Get the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + public String groupId() { + return this.groupId; + } + + /** + * Get the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Get the requiredZoneNames property: The private link resource private link DNS zone name. + * + * @return the requiredZoneNames value. + */ + public List requiredZoneNames() { + return this.requiredZoneNames; + } + + /** + * Set the requiredZoneNames property: The private link resource private link DNS zone name. + * + * @param requiredZoneNames the requiredZoneNames value to set. + * @return the PrivateLinkResourceProperties object itself. + */ + public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) { + this.requiredZoneNames = requiredZoneNames; + return this; + } + + /** + * Validates the instance. + * + * @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/ReplicaCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaCollectionInner.java index ef472cec5078..06c91a40ea62 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaCollectionInner.java @@ -53,8 +53,8 @@ public ReplicaCollectionInner withValue(List value) { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model ReplicaCollectionInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ReplicaCollectionInner")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SecretsCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SecretsCollectionInner.java index f3ee91d90586..f1566bac02a7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SecretsCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SecretsCollectionInner.java @@ -54,8 +54,8 @@ public SecretsCollectionInner withValue(List value) { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model SecretsCollectionInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model SecretsCollectionInner")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolInner.java new file mode 100644 index 000000000000..3c7d54bd4258 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolInner.java @@ -0,0 +1,304 @@ +// 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.ContainerType; +import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; +import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; +import com.azure.resourcemanager.appcontainers.models.PoolManagementType; +import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; +import com.azure.resourcemanager.appcontainers.models.SecretAutoGenerated; +import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; +import com.azure.resourcemanager.appcontainers.models.SessionPoolProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** + * Container App session pool. + */ +@Fluent +public final class SessionPoolInner extends Resource { + /* + * Container App session pool resource specific properties + */ + @JsonProperty(value = "properties") + private SessionPoolProperties 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 SessionPoolInner class. + */ + public SessionPoolInner() { + } + + /** + * Get the innerProperties property: Container App session pool resource specific properties. + * + * @return the innerProperties value. + */ + private SessionPoolProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * {@inheritDoc} + */ + @Override + public SessionPoolInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SessionPoolInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the environmentId property: Resource ID of the session pool's environment. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.innerProperties() == null ? null : this.innerProperties().environmentId(); + } + + /** + * Set the environmentId property: Resource ID of the session pool's environment. + * + * @param environmentId the environmentId value to set. + * @return the SessionPoolInner object itself. + */ + public SessionPoolInner withEnvironmentId(String environmentId) { + if (this.innerProperties() == null) { + this.innerProperties = new SessionPoolProperties(); + } + this.innerProperties().withEnvironmentId(environmentId); + return this; + } + + /** + * Get the containerType property: The container type of the sessions. + * + * @return the containerType value. + */ + public ContainerType containerType() { + return this.innerProperties() == null ? null : this.innerProperties().containerType(); + } + + /** + * Set the containerType property: The container type of the sessions. + * + * @param containerType the containerType value to set. + * @return the SessionPoolInner object itself. + */ + public SessionPoolInner withContainerType(ContainerType containerType) { + if (this.innerProperties() == null) { + this.innerProperties = new SessionPoolProperties(); + } + this.innerProperties().withContainerType(containerType); + return this; + } + + /** + * Get the poolManagementType property: The pool management type of the session pool. + * + * @return the poolManagementType value. + */ + public PoolManagementType poolManagementType() { + return this.innerProperties() == null ? null : this.innerProperties().poolManagementType(); + } + + /** + * Set the poolManagementType property: The pool management type of the session pool. + * + * @param poolManagementType the poolManagementType value to set. + * @return the SessionPoolInner object itself. + */ + public SessionPoolInner withPoolManagementType(PoolManagementType poolManagementType) { + if (this.innerProperties() == null) { + this.innerProperties = new SessionPoolProperties(); + } + this.innerProperties().withPoolManagementType(poolManagementType); + return this; + } + + /** + * Get the nodeCount property: The number of nodes the session pool is using. + * + * @return the nodeCount value. + */ + public Integer nodeCount() { + return this.innerProperties() == null ? null : this.innerProperties().nodeCount(); + } + + /** + * Get the scaleConfiguration property: The scale configuration of the session pool. + * + * @return the scaleConfiguration value. + */ + public ScaleConfiguration scaleConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().scaleConfiguration(); + } + + /** + * Set the scaleConfiguration property: The scale configuration of the session pool. + * + * @param scaleConfiguration the scaleConfiguration value to set. + * @return the SessionPoolInner object itself. + */ + public SessionPoolInner withScaleConfiguration(ScaleConfiguration scaleConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new SessionPoolProperties(); + } + this.innerProperties().withScaleConfiguration(scaleConfiguration); + return this; + } + + /** + * Get the secrets property: The secrets of the session pool. + * + * @return the secrets value. + */ + public List secrets() { + return this.innerProperties() == null ? null : this.innerProperties().secrets(); + } + + /** + * Set the secrets property: The secrets of the session pool. + * + * @param secrets the secrets value to set. + * @return the SessionPoolInner object itself. + */ + public SessionPoolInner withSecrets(List secrets) { + if (this.innerProperties() == null) { + this.innerProperties = new SessionPoolProperties(); + } + this.innerProperties().withSecrets(secrets); + return this; + } + + /** + * Get the dynamicPoolConfiguration property: The pool configuration if the poolManagementType is dynamic. + * + * @return the dynamicPoolConfiguration value. + */ + public DynamicPoolConfiguration dynamicPoolConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().dynamicPoolConfiguration(); + } + + /** + * Set the dynamicPoolConfiguration property: The pool configuration if the poolManagementType is dynamic. + * + * @param dynamicPoolConfiguration the dynamicPoolConfiguration value to set. + * @return the SessionPoolInner object itself. + */ + public SessionPoolInner withDynamicPoolConfiguration(DynamicPoolConfiguration dynamicPoolConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new SessionPoolProperties(); + } + this.innerProperties().withDynamicPoolConfiguration(dynamicPoolConfiguration); + return this; + } + + /** + * Get the customContainerTemplate property: The custom container configuration if the containerType is + * CustomContainer. + * + * @return the customContainerTemplate value. + */ + public CustomContainerTemplate customContainerTemplate() { + return this.innerProperties() == null ? null : this.innerProperties().customContainerTemplate(); + } + + /** + * Set the customContainerTemplate property: The custom container configuration if the containerType is + * CustomContainer. + * + * @param customContainerTemplate the customContainerTemplate value to set. + * @return the SessionPoolInner object itself. + */ + public SessionPoolInner withCustomContainerTemplate(CustomContainerTemplate customContainerTemplate) { + if (this.innerProperties() == null) { + this.innerProperties = new SessionPoolProperties(); + } + this.innerProperties().withCustomContainerTemplate(customContainerTemplate); + return this; + } + + /** + * Get the sessionNetworkConfiguration property: The network configuration of the sessions in the session pool. + * + * @return the sessionNetworkConfiguration value. + */ + public SessionNetworkConfiguration sessionNetworkConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().sessionNetworkConfiguration(); + } + + /** + * Set the sessionNetworkConfiguration property: The network configuration of the sessions in the session pool. + * + * @param sessionNetworkConfiguration the sessionNetworkConfiguration value to set. + * @return the SessionPoolInner object itself. + */ + public SessionPoolInner withSessionNetworkConfiguration(SessionNetworkConfiguration sessionNetworkConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new SessionPoolProperties(); + } + this.innerProperties().withSessionNetworkConfiguration(sessionNetworkConfiguration); + return this; + } + + /** + * Get the poolManagementEndpoint property: The endpoint to manage the pool. + * + * @return the poolManagementEndpoint value. + */ + public String poolManagementEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().poolManagementEndpoint(); + } + + /** + * Get the provisioningState property: Provisioning state of the session pool. + * + * @return the provisioningState value. + */ + public SessionPoolProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolProperties.java new file mode 100644 index 000000000000..f5384158fb65 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolProperties.java @@ -0,0 +1,308 @@ +// 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.ContainerType; +import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; +import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; +import com.azure.resourcemanager.appcontainers.models.PoolManagementType; +import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; +import com.azure.resourcemanager.appcontainers.models.SecretAutoGenerated; +import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; +import com.azure.resourcemanager.appcontainers.models.SessionPoolProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Container App session pool resource specific properties. + */ +@Fluent +public final class SessionPoolProperties { + /* + * Resource ID of the session pool's environment. + */ + @JsonProperty(value = "environmentId") + private String environmentId; + + /* + * The container type of the sessions. + */ + @JsonProperty(value = "containerType") + private ContainerType containerType; + + /* + * The pool management type of the session pool. + */ + @JsonProperty(value = "poolManagementType") + private PoolManagementType poolManagementType; + + /* + * The number of nodes the session pool is using. + */ + @JsonProperty(value = "nodeCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer nodeCount; + + /* + * The scale configuration of the session pool. + */ + @JsonProperty(value = "scaleConfiguration") + private ScaleConfiguration scaleConfiguration; + + /* + * The secrets of the session pool. + */ + @JsonProperty(value = "secrets") + private List secrets; + + /* + * The pool configuration if the poolManagementType is dynamic. + */ + @JsonProperty(value = "dynamicPoolConfiguration") + private DynamicPoolConfiguration dynamicPoolConfiguration; + + /* + * The custom container configuration if the containerType is CustomContainer. + */ + @JsonProperty(value = "customContainerTemplate") + private CustomContainerTemplate customContainerTemplate; + + /* + * The network configuration of the sessions in the session pool. + */ + @JsonProperty(value = "sessionNetworkConfiguration") + private SessionNetworkConfiguration sessionNetworkConfiguration; + + /* + * The endpoint to manage the pool. + */ + @JsonProperty(value = "poolManagementEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String poolManagementEndpoint; + + /* + * Provisioning state of the session pool. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private SessionPoolProvisioningState provisioningState; + + /** + * Creates an instance of SessionPoolProperties class. + */ + public SessionPoolProperties() { + } + + /** + * Get the environmentId property: Resource ID of the session pool's environment. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.environmentId; + } + + /** + * Set the environmentId property: Resource ID of the session pool's environment. + * + * @param environmentId the environmentId value to set. + * @return the SessionPoolProperties object itself. + */ + public SessionPoolProperties withEnvironmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Get the containerType property: The container type of the sessions. + * + * @return the containerType value. + */ + public ContainerType containerType() { + return this.containerType; + } + + /** + * Set the containerType property: The container type of the sessions. + * + * @param containerType the containerType value to set. + * @return the SessionPoolProperties object itself. + */ + public SessionPoolProperties withContainerType(ContainerType containerType) { + this.containerType = containerType; + return this; + } + + /** + * Get the poolManagementType property: The pool management type of the session pool. + * + * @return the poolManagementType value. + */ + public PoolManagementType poolManagementType() { + return this.poolManagementType; + } + + /** + * Set the poolManagementType property: The pool management type of the session pool. + * + * @param poolManagementType the poolManagementType value to set. + * @return the SessionPoolProperties object itself. + */ + public SessionPoolProperties withPoolManagementType(PoolManagementType poolManagementType) { + this.poolManagementType = poolManagementType; + return this; + } + + /** + * Get the nodeCount property: The number of nodes the session pool is using. + * + * @return the nodeCount value. + */ + public Integer nodeCount() { + return this.nodeCount; + } + + /** + * Get the scaleConfiguration property: The scale configuration of the session pool. + * + * @return the scaleConfiguration value. + */ + public ScaleConfiguration scaleConfiguration() { + return this.scaleConfiguration; + } + + /** + * Set the scaleConfiguration property: The scale configuration of the session pool. + * + * @param scaleConfiguration the scaleConfiguration value to set. + * @return the SessionPoolProperties object itself. + */ + public SessionPoolProperties withScaleConfiguration(ScaleConfiguration scaleConfiguration) { + this.scaleConfiguration = scaleConfiguration; + return this; + } + + /** + * Get the secrets property: The secrets of the session pool. + * + * @return the secrets value. + */ + public List secrets() { + return this.secrets; + } + + /** + * Set the secrets property: The secrets of the session pool. + * + * @param secrets the secrets value to set. + * @return the SessionPoolProperties object itself. + */ + public SessionPoolProperties withSecrets(List secrets) { + this.secrets = secrets; + return this; + } + + /** + * Get the dynamicPoolConfiguration property: The pool configuration if the poolManagementType is dynamic. + * + * @return the dynamicPoolConfiguration value. + */ + public DynamicPoolConfiguration dynamicPoolConfiguration() { + return this.dynamicPoolConfiguration; + } + + /** + * Set the dynamicPoolConfiguration property: The pool configuration if the poolManagementType is dynamic. + * + * @param dynamicPoolConfiguration the dynamicPoolConfiguration value to set. + * @return the SessionPoolProperties object itself. + */ + public SessionPoolProperties withDynamicPoolConfiguration(DynamicPoolConfiguration dynamicPoolConfiguration) { + this.dynamicPoolConfiguration = dynamicPoolConfiguration; + return this; + } + + /** + * Get the customContainerTemplate property: The custom container configuration if the containerType is + * CustomContainer. + * + * @return the customContainerTemplate value. + */ + public CustomContainerTemplate customContainerTemplate() { + return this.customContainerTemplate; + } + + /** + * Set the customContainerTemplate property: The custom container configuration if the containerType is + * CustomContainer. + * + * @param customContainerTemplate the customContainerTemplate value to set. + * @return the SessionPoolProperties object itself. + */ + public SessionPoolProperties withCustomContainerTemplate(CustomContainerTemplate customContainerTemplate) { + this.customContainerTemplate = customContainerTemplate; + return this; + } + + /** + * Get the sessionNetworkConfiguration property: The network configuration of the sessions in the session pool. + * + * @return the sessionNetworkConfiguration value. + */ + public SessionNetworkConfiguration sessionNetworkConfiguration() { + return this.sessionNetworkConfiguration; + } + + /** + * Set the sessionNetworkConfiguration property: The network configuration of the sessions in the session pool. + * + * @param sessionNetworkConfiguration the sessionNetworkConfiguration value to set. + * @return the SessionPoolProperties object itself. + */ + public SessionPoolProperties + withSessionNetworkConfiguration(SessionNetworkConfiguration sessionNetworkConfiguration) { + this.sessionNetworkConfiguration = sessionNetworkConfiguration; + return this; + } + + /** + * Get the poolManagementEndpoint property: The endpoint to manage the pool. + * + * @return the poolManagementEndpoint value. + */ + public String poolManagementEndpoint() { + return this.poolManagementEndpoint; + } + + /** + * Get the provisioningState property: Provisioning state of the session pool. + * + * @return the provisioningState value. + */ + public SessionPoolProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (scaleConfiguration() != null) { + scaleConfiguration().validate(); + } + if (secrets() != null) { + secrets().forEach(e -> e.validate()); + } + if (dynamicPoolConfiguration() != null) { + dynamicPoolConfiguration().validate(); + } + if (customContainerTemplate() != null) { + customContainerTemplate().validate(); + } + if (sessionNetworkConfiguration() != null) { + sessionNetworkConfiguration().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolUpdatablePropertiesProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolUpdatablePropertiesProperties.java new file mode 100644 index 000000000000..6f76cff5c76a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolUpdatablePropertiesProperties.java @@ -0,0 +1,184 @@ +// 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.CustomContainerTemplate; +import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; +import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; +import com.azure.resourcemanager.appcontainers.models.SecretAutoGenerated; +import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Session pool resource specific updatable properties. + */ +@Fluent +public final class SessionPoolUpdatablePropertiesProperties { + /* + * The scale configuration of the session pool. + */ + @JsonProperty(value = "scaleConfiguration") + private ScaleConfiguration scaleConfiguration; + + /* + * The secrets of the session pool. + */ + @JsonProperty(value = "secrets") + private List secrets; + + /* + * The pool configuration if the poolManagementType is dynamic. + */ + @JsonProperty(value = "dynamicPoolConfiguration") + private DynamicPoolConfiguration dynamicPoolConfiguration; + + /* + * The custom container configuration if the containerType is CustomContainer. + */ + @JsonProperty(value = "customContainerTemplate") + private CustomContainerTemplate customContainerTemplate; + + /* + * The network configuration of the sessions in the session pool. + */ + @JsonProperty(value = "sessionNetworkConfiguration") + private SessionNetworkConfiguration sessionNetworkConfiguration; + + /** + * Creates an instance of SessionPoolUpdatablePropertiesProperties class. + */ + public SessionPoolUpdatablePropertiesProperties() { + } + + /** + * Get the scaleConfiguration property: The scale configuration of the session pool. + * + * @return the scaleConfiguration value. + */ + public ScaleConfiguration scaleConfiguration() { + return this.scaleConfiguration; + } + + /** + * Set the scaleConfiguration property: The scale configuration of the session pool. + * + * @param scaleConfiguration the scaleConfiguration value to set. + * @return the SessionPoolUpdatablePropertiesProperties object itself. + */ + public SessionPoolUpdatablePropertiesProperties withScaleConfiguration(ScaleConfiguration scaleConfiguration) { + this.scaleConfiguration = scaleConfiguration; + return this; + } + + /** + * Get the secrets property: The secrets of the session pool. + * + * @return the secrets value. + */ + public List secrets() { + return this.secrets; + } + + /** + * Set the secrets property: The secrets of the session pool. + * + * @param secrets the secrets value to set. + * @return the SessionPoolUpdatablePropertiesProperties object itself. + */ + public SessionPoolUpdatablePropertiesProperties withSecrets(List secrets) { + this.secrets = secrets; + return this; + } + + /** + * Get the dynamicPoolConfiguration property: The pool configuration if the poolManagementType is dynamic. + * + * @return the dynamicPoolConfiguration value. + */ + public DynamicPoolConfiguration dynamicPoolConfiguration() { + return this.dynamicPoolConfiguration; + } + + /** + * Set the dynamicPoolConfiguration property: The pool configuration if the poolManagementType is dynamic. + * + * @param dynamicPoolConfiguration the dynamicPoolConfiguration value to set. + * @return the SessionPoolUpdatablePropertiesProperties object itself. + */ + public SessionPoolUpdatablePropertiesProperties + withDynamicPoolConfiguration(DynamicPoolConfiguration dynamicPoolConfiguration) { + this.dynamicPoolConfiguration = dynamicPoolConfiguration; + return this; + } + + /** + * Get the customContainerTemplate property: The custom container configuration if the containerType is + * CustomContainer. + * + * @return the customContainerTemplate value. + */ + public CustomContainerTemplate customContainerTemplate() { + return this.customContainerTemplate; + } + + /** + * Set the customContainerTemplate property: The custom container configuration if the containerType is + * CustomContainer. + * + * @param customContainerTemplate the customContainerTemplate value to set. + * @return the SessionPoolUpdatablePropertiesProperties object itself. + */ + public SessionPoolUpdatablePropertiesProperties + withCustomContainerTemplate(CustomContainerTemplate customContainerTemplate) { + this.customContainerTemplate = customContainerTemplate; + return this; + } + + /** + * Get the sessionNetworkConfiguration property: The network configuration of the sessions in the session pool. + * + * @return the sessionNetworkConfiguration value. + */ + public SessionNetworkConfiguration sessionNetworkConfiguration() { + return this.sessionNetworkConfiguration; + } + + /** + * Set the sessionNetworkConfiguration property: The network configuration of the sessions in the session pool. + * + * @param sessionNetworkConfiguration the sessionNetworkConfiguration value to set. + * @return the SessionPoolUpdatablePropertiesProperties object itself. + */ + public SessionPoolUpdatablePropertiesProperties + withSessionNetworkConfiguration(SessionNetworkConfiguration sessionNetworkConfiguration) { + this.sessionNetworkConfiguration = sessionNetworkConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (scaleConfiguration() != null) { + scaleConfiguration().validate(); + } + if (secrets() != null) { + secrets().forEach(e -> e.validate()); + } + if (dynamicPoolConfiguration() != null) { + dynamicPoolConfiguration().validate(); + } + if (customContainerTemplate() != null) { + customContainerTemplate().validate(); + } + if (sessionNetworkConfiguration() != null) { + sessionNetworkConfiguration().validate(); + } + } +} 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 index e37f5a12c5f9..43fbf24ec7d1 100644 --- 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 @@ -131,8 +131,8 @@ public UsageInner withName(UsageName name) { */ public void validate() { if (name() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property name in model UsageInner")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model UsageInner")); } else { name().validate(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java index 9ea383c7aad7..f87287ab52d0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java @@ -4,6 +4,8 @@ /** * Package containing the inner data models for ContainerAppsApiClient. - * null. + * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the + * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions + * extension resource. */ package com.azure.resourcemanager.appcontainers.fluent.models; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java index 131b0b619aad..0eba2fe983f2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java @@ -4,6 +4,8 @@ /** * Package containing the service clients for ContainerAppsApiClient. - * null. + * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the + * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions + * extension resource. */ package com.azure.resourcemanager.appcontainers.fluent; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesClientImpl.java index af7bcd069fbb..9f504c7f1452 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesClientImpl.java @@ -60,8 +60,8 @@ public final class AppResilienciesClientImpl implements AppResilienciesClient { } /** - * The interface defining all the services for ContainerAppsApiClientAppResiliencies to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for ContainerAppsApiClientAppResiliencies to be used by the proxy service + * to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResiliencyImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResiliencyImpl.java index 2d715f1928f4..ac7c0ecd7a10 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResiliencyImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResiliencyImpl.java @@ -85,14 +85,18 @@ public AppResiliencyImpl withExistingContainerApp(String resourceGroupName, Stri } public AppResiliency create() { - this.innerObject = serviceManager.serviceClient().getAppResiliencies() - .createOrUpdateWithResponse(resourceGroupName, appName, name, this.innerModel(), Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getAppResiliencies() + .createOrUpdateWithResponse(resourceGroupName, appName, name, this.innerModel(), Context.NONE) + .getValue(); return this; } public AppResiliency create(Context context) { - this.innerObject = serviceManager.serviceClient().getAppResiliencies() - .createOrUpdateWithResponse(resourceGroupName, appName, name, this.innerModel(), context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getAppResiliencies() + .createOrUpdateWithResponse(resourceGroupName, appName, name, this.innerModel(), context) + .getValue(); return this; } @@ -107,14 +111,18 @@ public AppResiliencyImpl update() { } public AppResiliency apply() { - this.innerObject = serviceManager.serviceClient().getAppResiliencies() - .updateWithResponse(resourceGroupName, appName, name, this.innerModel(), Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getAppResiliencies() + .updateWithResponse(resourceGroupName, appName, name, this.innerModel(), Context.NONE) + .getValue(); return this; } public AppResiliency apply(Context context) { - this.innerObject = serviceManager.serviceClient().getAppResiliencies() - .updateWithResponse(resourceGroupName, appName, name, this.innerModel(), context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getAppResiliencies() + .updateWithResponse(resourceGroupName, appName, name, this.innerModel(), context) + .getValue(); return this; } @@ -128,14 +136,18 @@ public AppResiliency apply(Context context) { } public AppResiliency refresh() { - this.innerObject = serviceManager.serviceClient().getAppResiliencies() - .getWithResponse(resourceGroupName, appName, name, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getAppResiliencies() + .getWithResponse(resourceGroupName, appName, name, Context.NONE) + .getValue(); return this; } public AppResiliency refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getAppResiliencies() - .getWithResponse(resourceGroupName, appName, name, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getAppResiliencies() + .getWithResponse(resourceGroupName, appName, name, context) + .getValue(); return this; } 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 579bbf3d7b60..dac6789aac8f 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 @@ -85,14 +85,17 @@ public AuthConfigImpl withExistingContainerApp(String resourceGroupName, String } public AuthConfig create() { - this.innerObject - = serviceManager.serviceClient().getContainerAppsAuthConfigs().createOrUpdateWithResponse(resourceGroupName, - containerAppName, authConfigName, this.innerModel(), Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getContainerAppsAuthConfigs() + .createOrUpdateWithResponse(resourceGroupName, containerAppName, authConfigName, this.innerModel(), + Context.NONE) + .getValue(); return this; } public AuthConfig create(Context context) { - this.innerObject = serviceManager.serviceClient().getContainerAppsAuthConfigs() + this.innerObject = serviceManager.serviceClient() + .getContainerAppsAuthConfigs() .createOrUpdateWithResponse(resourceGroupName, containerAppName, authConfigName, this.innerModel(), context) .getValue(); return this; @@ -109,14 +112,17 @@ public AuthConfigImpl update() { } public AuthConfig apply() { - this.innerObject - = serviceManager.serviceClient().getContainerAppsAuthConfigs().createOrUpdateWithResponse(resourceGroupName, - containerAppName, authConfigName, this.innerModel(), Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getContainerAppsAuthConfigs() + .createOrUpdateWithResponse(resourceGroupName, containerAppName, authConfigName, this.innerModel(), + Context.NONE) + .getValue(); return this; } public AuthConfig apply(Context context) { - this.innerObject = serviceManager.serviceClient().getContainerAppsAuthConfigs() + this.innerObject = serviceManager.serviceClient() + .getContainerAppsAuthConfigs() .createOrUpdateWithResponse(resourceGroupName, containerAppName, authConfigName, this.innerModel(), context) .getValue(); return this; @@ -132,14 +138,18 @@ public AuthConfig apply(Context context) { } public AuthConfig refresh() { - this.innerObject = serviceManager.serviceClient().getContainerAppsAuthConfigs() - .getWithResponse(resourceGroupName, containerAppName, authConfigName, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getContainerAppsAuthConfigs() + .getWithResponse(resourceGroupName, containerAppName, authConfigName, Context.NONE) + .getValue(); return this; } public AuthConfig refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getContainerAppsAuthConfigs() - .getWithResponse(resourceGroupName, containerAppName, authConfigName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getContainerAppsAuthConfigs() + .getWithResponse(resourceGroupName, containerAppName, authConfigName, context) + .getValue(); return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensClientImpl.java index 416f699371ba..c41f96fc70bf 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensClientImpl.java @@ -51,8 +51,8 @@ public final class BuildAuthTokensClientImpl implements BuildAuthTokensClient { } /** - * The interface defining all the services for ContainerAppsApiClientBuildAuthTokens to be used by the proxy - * service to perform REST calls. + * The interface defining all the services for ContainerAppsApiClientBuildAuthTokens to be used by the proxy service + * to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") 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 index da4354a5db34..f254e9354fc1 100644 --- 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 @@ -87,14 +87,16 @@ public BuildResourceImpl withExistingBuilder(String resourceGroupName, String bu } public BuildResource create() { - this.innerObject = serviceManager.serviceClient().getBuilds().createOrUpdate(resourceGroupName, builderName, - buildName, this.innerModel(), Context.NONE); + 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); + this.innerObject = serviceManager.serviceClient() + .getBuilds() + .createOrUpdate(resourceGroupName, builderName, buildName, this.innerModel(), context); return this; } @@ -109,14 +111,16 @@ public BuildResourceImpl update() { } public BuildResource apply() { - this.innerObject = serviceManager.serviceClient().getBuilds().createOrUpdate(resourceGroupName, builderName, - buildName, this.innerModel(), Context.NONE); + 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); + this.innerObject = serviceManager.serviceClient() + .getBuilds() + .createOrUpdate(resourceGroupName, builderName, buildName, this.innerModel(), context); return this; } @@ -130,14 +134,18 @@ public BuildResource apply(Context context) { } public BuildResource refresh() { - this.innerObject = serviceManager.serviceClient().getBuilds() - .getWithResponse(resourceGroupName, builderName, buildName, Context.NONE).getValue(); + 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(); + this.innerObject = serviceManager.serviceClient() + .getBuilds() + .getWithResponse(resourceGroupName, builderName, buildName, context) + .getValue(); 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 index 9926d63f18bc..14d509009b5e 100644 --- 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 @@ -104,14 +104,16 @@ public BuilderResourceImpl withExistingResourceGroup(String resourceGroupName) { } public BuilderResource create() { - this.innerObject = serviceManager.serviceClient().getBuilders().createOrUpdate(resourceGroupName, builderName, - this.innerModel(), Context.NONE); + 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); + this.innerObject = serviceManager.serviceClient() + .getBuilders() + .createOrUpdate(resourceGroupName, builderName, this.innerModel(), context); return this; } @@ -127,14 +129,16 @@ public BuilderResourceImpl update() { } public BuilderResource apply() { - this.innerObject = serviceManager.serviceClient().getBuilders().update(resourceGroupName, builderName, - updateBuilderEnvelope, Context.NONE); + 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); + this.innerObject = serviceManager.serviceClient() + .getBuilders() + .update(resourceGroupName, builderName, updateBuilderEnvelope, context); return this; } @@ -147,14 +151,18 @@ public BuilderResource apply(Context context) { } public BuilderResource refresh() { - this.innerObject = serviceManager.serviceClient().getBuilders() - .getByResourceGroupWithResponse(resourceGroupName, builderName, Context.NONE).getValue(); + 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(); + this.innerObject = serviceManager.serviceClient() + .getBuilders() + .getByResourceGroupWithResponse(resourceGroupName, builderName, context) + .getValue(); return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java index 237e1e0d2aa2..7f84f8f2426b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java @@ -87,7 +87,8 @@ public CertificateImpl withExistingConnectedEnvironment(String resourceGroupName } public Certificate create() { - this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsCertificates() + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsCertificates() .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, this.innerModel(), Context.NONE) .getValue(); @@ -95,9 +96,11 @@ public Certificate create() { } public Certificate create(Context context) { - this.innerObject - = serviceManager.serviceClient().getConnectedEnvironmentsCertificates().createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, certificateName, this.innerModel(), context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsCertificates() + .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, this.innerModel(), + context) + .getValue(); return this; } @@ -113,7 +116,8 @@ public CertificateImpl update() { } public Certificate apply() { - this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsCertificates() + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsCertificates() .updateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, updateCertificateEnvelope, Context.NONE) .getValue(); @@ -121,7 +125,8 @@ public Certificate apply() { } public Certificate apply(Context context) { - this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsCertificates() + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsCertificates() .updateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, updateCertificateEnvelope, context) .getValue(); @@ -139,14 +144,18 @@ public Certificate apply(Context context) { } public Certificate refresh() { - this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsCertificates() - .getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsCertificates() + .getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, Context.NONE) + .getValue(); return this; } public Certificate refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsCertificates() - .getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsCertificates() + .getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context) + .getValue(); return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java index 3a3b7b71bd48..8981b8c50a9c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java @@ -61,8 +61,8 @@ public final class CertificatesClientImpl implements CertificatesClient { } /** - * The interface defining all the services for ContainerAppsApiClientCertificates to be used by the proxy service - * to perform REST calls. + * The interface defining all the services for ContainerAppsApiClientCertificates to be used by the proxy service to + * perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java index bb48fdd2cdf8..8d014c732e36 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java @@ -61,8 +61,9 @@ public Certificate get(String resourceGroupName, String environmentName, String public Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, String certificateName, CertificateInner certificateEnvelope, Context context) { - Response inner = this.serviceClient().createOrUpdateWithResponse(resourceGroupName, - environmentName, certificateName, certificateEnvelope, context); + Response inner = this.serviceClient() + .createOrUpdateWithResponse(resourceGroupName, environmentName, certificateName, certificateEnvelope, + context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CertificateImpl(inner.getValue(), this.manager())); @@ -92,8 +93,8 @@ public void delete(String resourceGroupName, String environmentName, String cert public Response updateWithResponse(String resourceGroupName, String environmentName, String certificateName, CertificatePatch certificateEnvelope, Context context) { - Response inner = this.serviceClient().updateWithResponse(resourceGroupName, environmentName, - certificateName, certificateEnvelope, context); + Response inner = this.serviceClient() + .updateWithResponse(resourceGroupName, environmentName, certificateName, certificateEnvelope, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CertificateImpl(inner.getValue(), this.manager())); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentImpl.java index a733c450c07e..47db3449f3da 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentImpl.java @@ -111,14 +111,16 @@ public ConnectedEnvironmentImpl withExistingResourceGroup(String resourceGroupNa } public ConnectedEnvironment create() { - this.innerObject = serviceManager.serviceClient().getConnectedEnvironments().createOrUpdate(resourceGroupName, - connectedEnvironmentName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironments() + .createOrUpdate(resourceGroupName, connectedEnvironmentName, this.innerModel(), Context.NONE); return this; } public ConnectedEnvironment create(Context context) { - this.innerObject = serviceManager.serviceClient().getConnectedEnvironments().createOrUpdate(resourceGroupName, - connectedEnvironmentName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironments() + .createOrUpdate(resourceGroupName, connectedEnvironmentName, this.innerModel(), context); return this; } @@ -134,14 +136,16 @@ public ConnectedEnvironmentImpl update() { } public ConnectedEnvironment apply() { - this.innerObject = serviceManager.serviceClient().getConnectedEnvironments().createOrUpdate(resourceGroupName, - connectedEnvironmentName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironments() + .createOrUpdate(resourceGroupName, connectedEnvironmentName, this.innerModel(), Context.NONE); return this; } public ConnectedEnvironment apply(Context context) { - this.innerObject = serviceManager.serviceClient().getConnectedEnvironments().createOrUpdate(resourceGroupName, - connectedEnvironmentName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironments() + .createOrUpdate(resourceGroupName, connectedEnvironmentName, this.innerModel(), context); return this; } @@ -155,27 +159,32 @@ public ConnectedEnvironment apply(Context context) { } public ConnectedEnvironment refresh() { - this.innerObject = serviceManager.serviceClient().getConnectedEnvironments() - .getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironments() + .getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, Context.NONE) + .getValue(); return this; } public ConnectedEnvironment refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getConnectedEnvironments() - .getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironments() + .getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, context) + .getValue(); return this; } public Response checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context) { - return serviceManager.connectedEnvironments().checkNameAvailabilityWithResponse(resourceGroupName, - connectedEnvironmentName, checkNameAvailabilityRequest, context); + return serviceManager.connectedEnvironments() + .checkNameAvailabilityWithResponse(resourceGroupName, connectedEnvironmentName, + checkNameAvailabilityRequest, context); } public CheckNameAvailabilityResponse checkNameAvailability(CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - return serviceManager.connectedEnvironments().checkNameAvailability(resourceGroupName, connectedEnvironmentName, - checkNameAvailabilityRequest); + return serviceManager.connectedEnvironments() + .checkNameAvailability(resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest); } public ConnectedEnvironmentImpl withRegion(Region location) { 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 1dfa1dde464c..9b485850e274 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 @@ -62,14 +62,20 @@ public ConnectedEnvironmentStorageImpl withExistingConnectedEnvironment(String r } public ConnectedEnvironmentStorage create() { - this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsStorages().createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsStorages() + .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), + Context.NONE) + .getValue(); return this; } public ConnectedEnvironmentStorage create(Context context) { - this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsStorages().createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsStorages() + .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), + context) + .getValue(); return this; } @@ -85,14 +91,20 @@ public ConnectedEnvironmentStorageImpl update() { } public ConnectedEnvironmentStorage apply() { - this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsStorages().createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsStorages() + .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), + Context.NONE) + .getValue(); return this; } public ConnectedEnvironmentStorage apply(Context context) { - this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsStorages().createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsStorages() + .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), + context) + .getValue(); return this; } @@ -107,14 +119,18 @@ public ConnectedEnvironmentStorage apply(Context context) { } public ConnectedEnvironmentStorage refresh() { - this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsStorages() - .getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsStorages() + .getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE) + .getValue(); return this; } public ConnectedEnvironmentStorage refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsStorages() - .getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsStorages() + .getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context) + .getValue(); return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStoragesCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStoragesCollectionImpl.java index 98958a7e2466..c5aaf65dce2f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStoragesCollectionImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStoragesCollectionImpl.java @@ -26,9 +26,9 @@ public final class ConnectedEnvironmentStoragesCollectionImpl implements Connect public List value() { List inner = this.innerModel().value(); if (inner != null) { - return Collections.unmodifiableList( - inner.stream().map(inner1 -> new ConnectedEnvironmentStorageImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new ConnectedEnvironmentStorageImpl(inner1, this.manager())) + .collect(Collectors.toList())); } else { return Collections.emptyList(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java index be1c333d2d80..e3cc79529305 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java @@ -61,8 +61,8 @@ public final class ConnectedEnvironmentsCertificatesClientImpl implements Connec } /** - * The interface defining all the services for ContainerAppsApiClientConnectedEnvironmentsCertificates to be used - * by the proxy service to perform REST calls. + * The interface defining all the services for ContainerAppsApiClientConnectedEnvironmentsCertificates to be used by + * the proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java index 599b752b8e5b..bbe34b1865dd 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java @@ -40,8 +40,8 @@ public PagedIterable list(String resourceGroupName, String connecte public Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context) { - Response inner = this.serviceClient().getWithResponse(resourceGroupName, - connectedEnvironmentName, certificateName, context); + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CertificateImpl(inner.getValue(), this.manager())); @@ -61,8 +61,8 @@ public Certificate get(String resourceGroupName, String connectedEnvironmentName public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, - context); + return this.serviceClient() + .deleteWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context); } public void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java index ab3ab2053e3f..2dbf6eec8621 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java @@ -736,7 +736,8 @@ private Mono createOrUpdateAsync(String resourceGroup private Mono createOrUpdateAsync(String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope, context) - .last().flatMap(this.client::getLroFinalResultOrError); + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java index bc4defccdabf..4b813bd2ab73 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java @@ -36,8 +36,7 @@ import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in - * ConnectedEnvironmentsDaprComponentsClient. + * An instance of this class provides access to all the operations defined in ConnectedEnvironmentsDaprComponentsClient. */ public final class ConnectedEnvironmentsDaprComponentsClientImpl implements ConnectedEnvironmentsDaprComponentsClient { /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java index eacdeaebf3bb..81cb2b05c3e1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java @@ -65,8 +65,8 @@ public DaprComponent get(String resourceGroupName, String connectedEnvironmentNa public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, connectedEnvironmentName, componentName, - context); + return this.serviceClient() + .deleteWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); } public void delete(String resourceGroupName, String connectedEnvironmentName, String componentName) { @@ -75,8 +75,8 @@ public void delete(String resourceGroupName, String connectedEnvironmentName, St public Response listSecretsWithResponse(String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { - Response inner = this.serviceClient().listSecretsWithResponse(resourceGroupName, - connectedEnvironmentName, componentName, context); + Response inner = this.serviceClient() + .listSecretsWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DaprSecretsCollectionImpl(inner.getValue(), this.manager())); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsImpl.java index 2919f62d27be..65670a635404 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsImpl.java @@ -104,8 +104,9 @@ public ConnectedEnvironment update(String resourceGroupName, String connectedEnv public Response checkNameAvailabilityWithResponse(String resourceGroupName, String connectedEnvironmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context) { - Response inner = this.serviceClient().checkNameAvailabilityWithResponse( - resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest, context); + Response inner = this.serviceClient() + .checkNameAvailabilityWithResponse(resourceGroupName, connectedEnvironmentName, + checkNameAvailabilityRequest, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CheckNameAvailabilityResponseImpl(inner.getValue(), this.manager())); @@ -116,8 +117,8 @@ public Response checkNameAvailabilityWithResponse public CheckNameAvailabilityResponse checkNameAvailability(String resourceGroupName, String connectedEnvironmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - CheckNameAvailabilityResponseInner inner = this.serviceClient().checkNameAvailability(resourceGroupName, - connectedEnvironmentName, checkNameAvailabilityRequest); + CheckNameAvailabilityResponseInner inner = this.serviceClient() + .checkNameAvailability(resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest); if (inner != null) { return new CheckNameAvailabilityResponseImpl(inner, this.manager()); } else { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java index c44b673d9562..313d8933511a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java @@ -55,8 +55,8 @@ public final class ConnectedEnvironmentsStoragesClientImpl implements ConnectedE } /** - * The interface defining all the services for ContainerAppsApiClientConnectedEnvironmentsStorages to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for ContainerAppsApiClientConnectedEnvironmentsStorages to be used by the + * proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesImpl.java index 3c5f66271c3b..06e1afd1673a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesImpl.java @@ -11,9 +11,9 @@ import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsStoragesClient; import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsStorages; import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorage; import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStoragesCollection; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsStorages; public final class ConnectedEnvironmentsStoragesImpl implements ConnectedEnvironmentsStorages { private static final ClientLogger LOGGER = new ClientLogger(ConnectedEnvironmentsStoragesImpl.class); @@ -75,8 +75,8 @@ public ConnectedEnvironmentStorage get(String resourceGroupName, String connecte public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String storageName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, - context); + return this.serviceClient() + .deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context); } public void delete(String resourceGroupName, String connectedEnvironmentName, String storageName) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java index 1325dc07837e..b3f91ceb38da 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java @@ -12,9 +12,11 @@ import com.azure.resourcemanager.appcontainers.models.Configuration; import com.azure.resourcemanager.appcontainers.models.ContainerApp; import com.azure.resourcemanager.appcontainers.models.ContainerAppAuthToken; +import com.azure.resourcemanager.appcontainers.models.ContainerAppPropertiesPatchingConfiguration; import com.azure.resourcemanager.appcontainers.models.ContainerAppProvisioningState; import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResult; import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; +import com.azure.resourcemanager.appcontainers.models.Kind; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.SecretsCollection; import com.azure.resourcemanager.appcontainers.models.Template; @@ -64,6 +66,10 @@ public String managedBy() { return this.innerModel().managedBy(); } + public Kind kind() { + return this.innerModel().kind(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -84,6 +90,10 @@ public String workloadProfileName() { return this.innerModel().workloadProfileName(); } + public ContainerAppPropertiesPatchingConfiguration patchingConfiguration() { + return this.innerModel().patchingConfiguration(); + } + public String latestRevisionName() { return this.innerModel().latestRevisionName(); } @@ -151,14 +161,16 @@ public ContainerAppImpl withExistingResourceGroup(String resourceGroupName) { } public ContainerApp create() { - this.innerObject = serviceManager.serviceClient().getContainerApps().createOrUpdate(resourceGroupName, - containerAppName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getContainerApps() + .createOrUpdate(resourceGroupName, containerAppName, this.innerModel(), Context.NONE); return this; } public ContainerApp create(Context context) { - this.innerObject = serviceManager.serviceClient().getContainerApps().createOrUpdate(resourceGroupName, - containerAppName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getContainerApps() + .createOrUpdate(resourceGroupName, containerAppName, this.innerModel(), context); return this; } @@ -173,14 +185,16 @@ public ContainerAppImpl update() { } public ContainerApp apply() { - this.innerObject = serviceManager.serviceClient().getContainerApps().update(resourceGroupName, containerAppName, - this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getContainerApps() + .update(resourceGroupName, containerAppName, this.innerModel(), Context.NONE); return this; } public ContainerApp apply(Context context) { - this.innerObject = serviceManager.serviceClient().getContainerApps().update(resourceGroupName, containerAppName, - this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getContainerApps() + .update(resourceGroupName, containerAppName, this.innerModel(), context); return this; } @@ -193,21 +207,25 @@ public ContainerApp apply(Context context) { } public ContainerApp refresh() { - this.innerObject = serviceManager.serviceClient().getContainerApps() - .getByResourceGroupWithResponse(resourceGroupName, containerAppName, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getContainerApps() + .getByResourceGroupWithResponse(resourceGroupName, containerAppName, Context.NONE) + .getValue(); return this; } public ContainerApp refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getContainerApps() - .getByResourceGroupWithResponse(resourceGroupName, containerAppName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getContainerApps() + .getByResourceGroupWithResponse(resourceGroupName, containerAppName, context) + .getValue(); return this; } public Response listCustomHostnameAnalysisWithResponse(String customHostname, Context context) { - return serviceManager.containerApps().listCustomHostnameAnalysisWithResponse(resourceGroupName, - containerAppName, customHostname, context); + return serviceManager.containerApps() + .listCustomHostnameAnalysisWithResponse(resourceGroupName, containerAppName, customHostname, context); } public CustomHostnameAnalysisResult listCustomHostnameAnalysis() { @@ -276,6 +294,11 @@ public ContainerAppImpl withManagedBy(String managedBy) { return this; } + public ContainerAppImpl withKind(Kind kind) { + this.innerModel().withKind(kind); + return this; + } + public ContainerAppImpl withManagedEnvironmentId(String managedEnvironmentId) { this.innerModel().withManagedEnvironmentId(managedEnvironmentId); return this; @@ -291,6 +314,12 @@ public ContainerAppImpl withWorkloadProfileName(String workloadProfileName) { return this; } + public ContainerAppImpl + withPatchingConfiguration(ContainerAppPropertiesPatchingConfiguration patchingConfiguration) { + this.innerModel().withPatchingConfiguration(patchingConfiguration); + return this; + } + public ContainerAppImpl withConfiguration(Configuration configuration) { this.innerModel().withConfiguration(configuration); return this; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppJobExecutionsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppJobExecutionsImpl.java index 6f7c1e0d91d3..6dfa8160d1f7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppJobExecutionsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppJobExecutionsImpl.java @@ -27,7 +27,8 @@ public List value() { List inner = this.innerModel().value(); if (inner != null) { return Collections.unmodifiableList(inner.stream() - .map(inner1 -> new JobExecutionImpl(inner1, this.manager())).collect(Collectors.toList())); + .map(inner1 -> new JobExecutionImpl(inner1, this.manager())) + .collect(Collectors.toList())); } else { return Collections.emptyList(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java index 49c7d2ab750a..d2fa8d7fd0f7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java @@ -123,11 +123,13 @@ public ContainerAppsApiClientBuilder serializerAdapter(SerializerAdapter seriali public ContainerAppsApiClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = (pipeline != null) ? pipeline + HttpPipeline localPipeline = (pipeline != null) + ? pipeline : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); Duration localDefaultPollInterval = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) + ? serializerAdapter : SerializerFactory.createDefaultManagementSerializerAdapter(); ContainerAppsApiClientImpl client = new ContainerAppsApiClientImpl(localPipeline, localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); 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 1253a9deec72..0d65b5179c7c 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.appcontainers.implementation; import com.azure.core.annotation.ServiceClient; +import com.azure.core.http.HttpHeaderName; import com.azure.core.http.HttpHeaders; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpResponse; @@ -12,8 +13,8 @@ import com.azure.core.management.AzureEnvironment; import com.azure.core.management.exception.ManagementError; import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; +import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; @@ -36,24 +37,31 @@ import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsStoragesClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsApiClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsAuthConfigsClient; +import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsBuildsByContainerAppsClient; +import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsBuildsClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsDiagnosticsClient; +import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsPatchesClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsRevisionReplicasClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsRevisionsClient; +import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsSessionPoolsClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsSourceControlsClient; import com.azure.resourcemanager.appcontainers.fluent.DaprComponentResiliencyPoliciesClient; import com.azure.resourcemanager.appcontainers.fluent.DaprComponentsClient; import com.azure.resourcemanager.appcontainers.fluent.DaprSubscriptionsClient; import com.azure.resourcemanager.appcontainers.fluent.DotNetComponentsClient; +import com.azure.resourcemanager.appcontainers.fluent.FunctionsExtensionsClient; import com.azure.resourcemanager.appcontainers.fluent.JavaComponentsClient; import com.azure.resourcemanager.appcontainers.fluent.JobsClient; 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.ManagedEnvironmentPrivateEndpointConnectionsClient; +import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentPrivateLinkResourcesClient; 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.ManagedEnvironmentUsagesClient; import com.azure.resourcemanager.appcontainers.fluent.NamespacesClient; import com.azure.resourcemanager.appcontainers.fluent.OperationsClient; import com.azure.resourcemanager.appcontainers.fluent.ResourceProvidersClient; @@ -366,6 +374,48 @@ public ContainerAppsRevisionReplicasClient getContainerAppsRevisionReplicas() { return this.containerAppsRevisionReplicas; } + /** + * The ContainerAppsBuildsByContainerAppsClient object to access its operations. + */ + private final ContainerAppsBuildsByContainerAppsClient containerAppsBuildsByContainerApps; + + /** + * Gets the ContainerAppsBuildsByContainerAppsClient object to access its operations. + * + * @return the ContainerAppsBuildsByContainerAppsClient object. + */ + public ContainerAppsBuildsByContainerAppsClient getContainerAppsBuildsByContainerApps() { + return this.containerAppsBuildsByContainerApps; + } + + /** + * The ContainerAppsBuildsClient object to access its operations. + */ + private final ContainerAppsBuildsClient containerAppsBuilds; + + /** + * Gets the ContainerAppsBuildsClient object to access its operations. + * + * @return the ContainerAppsBuildsClient object. + */ + public ContainerAppsBuildsClient getContainerAppsBuilds() { + return this.containerAppsBuilds; + } + + /** + * The ContainerAppsPatchesClient object to access its operations. + */ + private final ContainerAppsPatchesClient containerAppsPatches; + + /** + * Gets the ContainerAppsPatchesClient object to access its operations. + * + * @return the ContainerAppsPatchesClient object. + */ + public ContainerAppsPatchesClient getContainerAppsPatches() { + return this.containerAppsPatches; + } + /** * The ContainerAppsDiagnosticsClient object to access its operations. */ @@ -422,6 +472,20 @@ public JobsClient getJobs() { return this.jobs; } + /** + * The DotNetComponentsClient object to access its operations. + */ + private final DotNetComponentsClient dotNetComponents; + + /** + * Gets the DotNetComponentsClient object to access its operations. + * + * @return the DotNetComponentsClient object. + */ + public DotNetComponentsClient getDotNetComponents() { + return this.dotNetComponents; + } + /** * The OperationsClient object to access its operations. */ @@ -436,6 +500,20 @@ public OperationsClient getOperations() { return this.operations; } + /** + * The JavaComponentsClient object to access its operations. + */ + private final JavaComponentsClient javaComponents; + + /** + * Gets the JavaComponentsClient object to access its operations. + * + * @return the JavaComponentsClient object. + */ + public JavaComponentsClient getJavaComponents() { + return this.javaComponents; + } + /** * The JobsExecutionsClient object to access its operations. */ @@ -520,6 +598,34 @@ public NamespacesClient getNamespaces() { return this.namespaces; } + /** + * The ManagedEnvironmentPrivateEndpointConnectionsClient object to access its operations. + */ + private final ManagedEnvironmentPrivateEndpointConnectionsClient managedEnvironmentPrivateEndpointConnections; + + /** + * Gets the ManagedEnvironmentPrivateEndpointConnectionsClient object to access its operations. + * + * @return the ManagedEnvironmentPrivateEndpointConnectionsClient object. + */ + public ManagedEnvironmentPrivateEndpointConnectionsClient getManagedEnvironmentPrivateEndpointConnections() { + return this.managedEnvironmentPrivateEndpointConnections; + } + + /** + * The ManagedEnvironmentPrivateLinkResourcesClient object to access its operations. + */ + private final ManagedEnvironmentPrivateLinkResourcesClient managedEnvironmentPrivateLinkResources; + + /** + * Gets the ManagedEnvironmentPrivateLinkResourcesClient object to access its operations. + * + * @return the ManagedEnvironmentPrivateLinkResourcesClient object. + */ + public ManagedEnvironmentPrivateLinkResourcesClient getManagedEnvironmentPrivateLinkResources() { + return this.managedEnvironmentPrivateLinkResources; + } + /** * The DaprComponentResiliencyPoliciesClient object to access its operations. */ @@ -619,31 +725,31 @@ public ManagedEnvironmentUsagesClient getManagedEnvironmentUsages() { } /** - * The JavaComponentsClient object to access its operations. + * The FunctionsExtensionsClient object to access its operations. */ - private final JavaComponentsClient javaComponents; + private final FunctionsExtensionsClient functionsExtensions; /** - * Gets the JavaComponentsClient object to access its operations. + * Gets the FunctionsExtensionsClient object to access its operations. * - * @return the JavaComponentsClient object. + * @return the FunctionsExtensionsClient object. */ - public JavaComponentsClient getJavaComponents() { - return this.javaComponents; + public FunctionsExtensionsClient getFunctionsExtensions() { + return this.functionsExtensions; } /** - * The DotNetComponentsClient object to access its operations. + * The ContainerAppsSessionPoolsClient object to access its operations. */ - private final DotNetComponentsClient dotNetComponents; + private final ContainerAppsSessionPoolsClient containerAppsSessionPools; /** - * Gets the DotNetComponentsClient object to access its operations. + * Gets the ContainerAppsSessionPoolsClient object to access its operations. * - * @return the DotNetComponentsClient object. + * @return the ContainerAppsSessionPoolsClient object. */ - public DotNetComponentsClient getDotNetComponents() { - return this.dotNetComponents; + public ContainerAppsSessionPoolsClient getContainerAppsSessionPools() { + return this.containerAppsSessionPools; } /** @@ -663,7 +769,7 @@ public DotNetComponentsClient getDotNetComponents() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-11-02-preview"; + this.apiVersion = "2024-02-02-preview"; this.appResiliencies = new AppResilienciesClientImpl(this); this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsClientImpl(this); this.availableWorkloadProfiles = new AvailableWorkloadProfilesClientImpl(this); @@ -679,17 +785,25 @@ public DotNetComponentsClient getDotNetComponents() { this.containerApps = new ContainerAppsClientImpl(this); this.containerAppsRevisions = new ContainerAppsRevisionsClientImpl(this); this.containerAppsRevisionReplicas = new ContainerAppsRevisionReplicasClientImpl(this); + this.containerAppsBuildsByContainerApps = new ContainerAppsBuildsByContainerAppsClientImpl(this); + this.containerAppsBuilds = new ContainerAppsBuildsClientImpl(this); + this.containerAppsPatches = new ContainerAppsPatchesClientImpl(this); this.containerAppsDiagnostics = new ContainerAppsDiagnosticsClientImpl(this); this.managedEnvironmentDiagnostics = new ManagedEnvironmentDiagnosticsClientImpl(this); this.managedEnvironmentsDiagnostics = new ManagedEnvironmentsDiagnosticsClientImpl(this); this.jobs = new JobsClientImpl(this); + this.dotNetComponents = new DotNetComponentsClientImpl(this); this.operations = new OperationsClientImpl(this); + this.javaComponents = new JavaComponentsClientImpl(this); this.jobsExecutions = new JobsExecutionsClientImpl(this); this.resourceProviders = new ResourceProvidersClientImpl(this); this.managedEnvironments = new ManagedEnvironmentsClientImpl(this); this.certificates = new CertificatesClientImpl(this); this.managedCertificates = new ManagedCertificatesClientImpl(this); this.namespaces = new NamespacesClientImpl(this); + this.managedEnvironmentPrivateEndpointConnections + = new ManagedEnvironmentPrivateEndpointConnectionsClientImpl(this); + this.managedEnvironmentPrivateLinkResources = new ManagedEnvironmentPrivateLinkResourcesClientImpl(this); this.daprComponentResiliencyPolicies = new DaprComponentResiliencyPoliciesClientImpl(this); this.daprComponents = new DaprComponentsClientImpl(this); this.daprSubscriptions = new DaprSubscriptionsClientImpl(this); @@ -697,8 +811,8 @@ public DotNetComponentsClient getDotNetComponents() { this.containerAppsSourceControls = new ContainerAppsSourceControlsClientImpl(this); this.usages = new UsagesClientImpl(this); this.managedEnvironmentUsages = new ManagedEnvironmentUsagesClientImpl(this); - this.javaComponents = new JavaComponentsClientImpl(this); - this.dotNetComponents = new DotNetComponentsClientImpl(this); + this.functionsExtensions = new FunctionsExtensionsClientImpl(this); + this.containerAppsSessionPools = new ContainerAppsSessionPoolsClientImpl(this); } /** @@ -761,8 +875,8 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class, - SerializerEncoding.JSON); + managementError = this.getSerializerAdapter() + .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } @@ -803,7 +917,7 @@ public int getStatusCode() { } public String getHeaderValue(String s) { - return httpHeaders.getValue(s); + return httpHeaders.getValue(HttpHeaderName.fromString(s)); } public HttpHeaders getHeaders() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildResourceImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildResourceImpl.java new file mode 100644 index 000000000000..0140fcd8e536 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildResourceImpl.java @@ -0,0 +1,69 @@ +// 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.ContainerAppsBuildResourceInner; +import com.azure.resourcemanager.appcontainers.models.BuildProvisioningState; +import com.azure.resourcemanager.appcontainers.models.BuildStatus; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildConfiguration; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildResource; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; + +public final class ContainerAppsBuildResourceImpl implements ContainerAppsBuildResource { + private ContainerAppsBuildResourceInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + ContainerAppsBuildResourceImpl(ContainerAppsBuildResourceInner 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 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 ContainerAppsBuildConfiguration configuration() { + return this.innerModel().configuration(); + } + + public String logStreamEndpoint() { + return this.innerModel().logStreamEndpoint(); + } + + public ContainerAppsBuildResourceInner 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/ContainerAppsBuildsByContainerAppsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsClientImpl.java new file mode 100644 index 000000000000..23ac3a84b9f5 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsClientImpl.java @@ -0,0 +1,290 @@ +// 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.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsBuildsByContainerAppsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildCollection; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ContainerAppsBuildsByContainerAppsClient. + */ +public final class ContainerAppsBuildsByContainerAppsClientImpl implements ContainerAppsBuildsByContainerAppsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ContainerAppsBuildsByContainerAppsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of ContainerAppsBuildsByContainerAppsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ContainerAppsBuildsByContainerAppsClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(ContainerAppsBuildsByContainerAppsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientContainerAppsBuildsByContainerApps to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface ContainerAppsBuildsByContainerAppsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List Container Apps Build resources by Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Container Apps Build Resource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String containerAppName) { + 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 (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, containerAppName, 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 Container Apps Build resources by Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Container Apps Build Resource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String containerAppName, 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 (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List Container Apps Build resources by Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Container Apps Build Resource list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String containerAppName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, containerAppName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Container Apps Build resources by Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Container Apps Build Resource list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String containerAppName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, containerAppName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List Container Apps Build resources by Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Container Apps Build Resource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String containerAppName) { + return new PagedIterable<>(listAsync(resourceGroupName, containerAppName)); + } + + /** + * List Container Apps Build resources by Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Container Apps Build Resource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String containerAppName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, containerAppName, 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 ManagementException 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 Container Apps Build Resource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Container Apps Build Resource list operation 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/ContainerAppsBuildsByContainerAppsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsImpl.java new file mode 100644 index 000000000000..f5ff5268f874 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsImpl.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.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.ContainerAppsBuildsByContainerAppsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildResource; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildsByContainerApps; + +public final class ContainerAppsBuildsByContainerAppsImpl implements ContainerAppsBuildsByContainerApps { + private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsBuildsByContainerAppsImpl.class); + + private final ContainerAppsBuildsByContainerAppsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public ContainerAppsBuildsByContainerAppsImpl(ContainerAppsBuildsByContainerAppsClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String containerAppName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, containerAppName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ContainerAppsBuildResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String containerAppName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, containerAppName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ContainerAppsBuildResourceImpl(inner1, this.manager())); + } + + private ContainerAppsBuildsByContainerAppsClient 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/ContainerAppsBuildsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsClientImpl.java new file mode 100644 index 000000000000..0a9b6a1c7932 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsClientImpl.java @@ -0,0 +1,441 @@ +// 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.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.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.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsBuildsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; +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 ContainerAppsBuildsClient. + */ +public final class ContainerAppsBuildsClientImpl implements ContainerAppsBuildsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ContainerAppsBuildsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of ContainerAppsBuildsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ContainerAppsBuildsClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(ContainerAppsBuildsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientContainerAppsBuilds to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface ContainerAppsBuildsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @PathParam("buildName") String buildName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @PathParam("buildName") String buildName, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Container Apps Build resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String containerAppName, 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 (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName 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, containerAppName, buildName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Container Apps Build resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String containerAppName, 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 (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName 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, containerAppName, buildName, accept, context); + } + + /** + * Get a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Container Apps Build resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String containerAppName, + String buildName) { + return getWithResponseAsync(resourceGroupName, containerAppName, buildName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Container Apps Build resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String containerAppName, + String buildName, Context context) { + return getWithResponseAsync(resourceGroupName, containerAppName, buildName, context).block(); + } + + /** + * Get a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Container Apps Build resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerAppsBuildResourceInner get(String resourceGroupName, String containerAppName, String buildName) { + return getWithResponse(resourceGroupName, containerAppName, buildName, Context.NONE).getValue(); + } + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 containerAppName, + 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 (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName 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, containerAppName, buildName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @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 ManagementException thrown 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 containerAppName, + 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 (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName 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, containerAppName, buildName, accept, context); + } + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 containerAppName, + String buildName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerAppName, buildName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @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 ManagementException thrown 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 containerAppName, + String buildName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, containerAppName, buildName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 containerAppName, + String buildName) { + return this.beginDeleteAsync(resourceGroupName, containerAppName, buildName).getSyncPoller(); + } + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @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 ManagementException thrown if the request is 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 containerAppName, + String buildName, Context context) { + return this.beginDeleteAsync(resourceGroupName, containerAppName, buildName, context).getSyncPoller(); + } + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String containerAppName, String buildName) { + return beginDeleteAsync(resourceGroupName, containerAppName, buildName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String containerAppName, String buildName, + Context context) { + return beginDeleteAsync(resourceGroupName, containerAppName, buildName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String containerAppName, String buildName) { + deleteAsync(resourceGroupName, containerAppName, buildName).block(); + } + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String containerAppName, String buildName, Context context) { + deleteAsync(resourceGroupName, containerAppName, buildName, context).block(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsImpl.java new file mode 100644 index 000000000000..2e9fdac76510 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsImpl.java @@ -0,0 +1,66 @@ +// 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.ContainerAppsBuildsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildResource; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuilds; + +public final class ContainerAppsBuildsImpl implements ContainerAppsBuilds { + private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsBuildsImpl.class); + + private final ContainerAppsBuildsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public ContainerAppsBuildsImpl(ContainerAppsBuildsClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String containerAppName, + String buildName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, containerAppName, buildName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ContainerAppsBuildResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ContainerAppsBuildResource get(String resourceGroupName, String containerAppName, String buildName) { + ContainerAppsBuildResourceInner inner + = this.serviceClient().get(resourceGroupName, containerAppName, buildName); + if (inner != null) { + return new ContainerAppsBuildResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String containerAppName, String buildName) { + this.serviceClient().delete(resourceGroupName, containerAppName, buildName); + } + + public void delete(String resourceGroupName, String containerAppName, String buildName, Context context) { + this.serviceClient().delete(resourceGroupName, containerAppName, buildName, context); + } + + private ContainerAppsBuildsClient 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/ContainerAppsPatchResourceImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchResourceImpl.java new file mode 100644 index 000000000000..da5d66fd22e1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchResourceImpl.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.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatchResource; +import com.azure.resourcemanager.appcontainers.models.PatchProperties; + +public final class ContainerAppsPatchResourceImpl implements ContainerAppsPatchResource { + private ContainerAppsPatchResourceInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + ContainerAppsPatchResourceImpl(ContainerAppsPatchResourceInner 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 ContainerAppsPatchResourceInner 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/ContainerAppsPatchesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesClientImpl.java new file mode 100644 index 000000000000..f0651329280e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesClientImpl.java @@ -0,0 +1,1206 @@ +// 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.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsPatchesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner; +import com.azure.resourcemanager.appcontainers.models.PatchCollection; +import com.azure.resourcemanager.appcontainers.models.PatchSkipConfig; +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 ContainerAppsPatchesClient. + */ +public final class ContainerAppsPatchesClientImpl implements ContainerAppsPatchesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ContainerAppsPatchesService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of ContainerAppsPatchesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ContainerAppsPatchesClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(ContainerAppsPatchesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientContainerAppsPatches to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface ContainerAppsPatchesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByContainerApp(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @QueryParam("$filter") String filter, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @PathParam("patchName") String patchName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @PathParam("patchName") String patchName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}/skipConfig") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> skipConfigure(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @PathParam("patchName") String patchName, + @BodyParam("application/json") PatchSkipConfig patchSkipConfig, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}/apply") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> apply(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @PathParam("patchName") String patchName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByContainerAppNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq + * 'Succeeded'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 collection along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByContainerAppSinglePageAsync(String resourceGroupName, String containerAppName, 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 (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByContainerApp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, containerAppName, filter, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq + * 'Succeeded'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 collection along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByContainerAppSinglePageAsync( + String resourceGroupName, String containerAppName, 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 (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByContainerApp(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, filter, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq + * 'Succeeded'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 collection as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByContainerAppAsync(String resourceGroupName, + String containerAppName, String filter) { + return new PagedFlux<>(() -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName, filter), + nextLink -> listByContainerAppNextSinglePageAsync(nextLink)); + } + + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 collection as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByContainerAppAsync(String resourceGroupName, + String containerAppName) { + final String filter = null; + return new PagedFlux<>(() -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName, filter), + nextLink -> listByContainerAppNextSinglePageAsync(nextLink)); + } + + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq + * 'Succeeded'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 collection as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByContainerAppAsync(String resourceGroupName, + String containerAppName, String filter, Context context) { + return new PagedFlux<>( + () -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName, filter, context), + nextLink -> listByContainerAppNextSinglePageAsync(nextLink, context)); + } + + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 collection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByContainerApp(String resourceGroupName, + String containerAppName) { + final String filter = null; + return new PagedIterable<>(listByContainerAppAsync(resourceGroupName, containerAppName, filter)); + } + + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq + * 'Succeeded'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 collection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByContainerApp(String resourceGroupName, + String containerAppName, String filter, Context context) { + return new PagedIterable<>(listByContainerAppAsync(resourceGroupName, containerAppName, filter, context)); + } + + /** + * Get details for specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Container Apps Patch by patch name along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String containerAppName, 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 (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName 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, containerAppName, patchName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get details for specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException 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 Container Apps Patch by patch name along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String containerAppName, 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 (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName 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, containerAppName, patchName, accept, context); + } + + /** + * Get details for specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Container Apps Patch by patch name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String containerAppName, + String patchName) { + return getWithResponseAsync(resourceGroupName, containerAppName, patchName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get details for specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException 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 Container Apps Patch by patch name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String containerAppName, + String patchName, Context context) { + return getWithResponseAsync(resourceGroupName, containerAppName, patchName, context).block(); + } + + /** + * Get details for specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 Container Apps Patch by patch name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerAppsPatchResourceInner get(String resourceGroupName, String containerAppName, String patchName) { + return getWithResponse(resourceGroupName, containerAppName, patchName, Context.NONE).getValue(); + } + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 containerAppName, + 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 (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName 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, containerAppName, patchName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException thrown 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 containerAppName, + 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 (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName 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, containerAppName, patchName, accept, context); + } + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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 containerAppName, + String patchName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerAppName, patchName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException thrown 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 containerAppName, + String patchName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, containerAppName, patchName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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 containerAppName, + String patchName) { + return this.beginDeleteAsync(resourceGroupName, containerAppName, patchName).getSyncPoller(); + } + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException thrown if the request is 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 containerAppName, + String patchName, Context context) { + return this.beginDeleteAsync(resourceGroupName, containerAppName, patchName, context).getSyncPoller(); + } + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String containerAppName, String patchName) { + return beginDeleteAsync(resourceGroupName, containerAppName, patchName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String containerAppName, String patchName, + Context context) { + return beginDeleteAsync(resourceGroupName, containerAppName, patchName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String containerAppName, String patchName) { + deleteAsync(resourceGroupName, containerAppName, patchName).block(); + } + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String containerAppName, String patchName, Context context) { + deleteAsync(resourceGroupName, containerAppName, patchName, context).block(); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException thrown 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 containerAppName, String patchName, PatchSkipConfig 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 (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (patchName == null) { + return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); + } + if (patchSkipConfig == null) { + return Mono + .error(new IllegalArgumentException("Parameter patchSkipConfig is required and cannot be null.")); + } else { + patchSkipConfig.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.skipConfigure(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, containerAppName, patchName, patchSkipConfig, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException thrown 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 containerAppName, String patchName, PatchSkipConfig 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 (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (patchName == null) { + return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); + } + if (patchSkipConfig == null) { + return Mono + .error(new IllegalArgumentException("Parameter patchSkipConfig is required and cannot be null.")); + } else { + patchSkipConfig.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.skipConfigure(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, containerAppName, patchName, patchSkipConfig, accept, + context); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException thrown 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 containerAppName, String patchName, PatchSkipConfig patchSkipConfig) { + Mono>> mono + = skipConfigureWithResponseAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException thrown 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 containerAppName, String patchName, PatchSkipConfig patchSkipConfig, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = skipConfigureWithResponseAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException thrown if the request is 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 containerAppName, + String patchName, PatchSkipConfig patchSkipConfig) { + return this.beginSkipConfigureAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig) + .getSyncPoller(); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException thrown if the request is 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 containerAppName, + String patchName, PatchSkipConfig patchSkipConfig, Context context) { + return this.beginSkipConfigureAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig, context) + .getSyncPoller(); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono skipConfigureAsync(String resourceGroupName, String containerAppName, String patchName, + PatchSkipConfig patchSkipConfig) { + return beginSkipConfigureAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono skipConfigureAsync(String resourceGroupName, String containerAppName, String patchName, + PatchSkipConfig patchSkipConfig, Context context) { + return beginSkipConfigureAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void skipConfigure(String resourceGroupName, String containerAppName, String patchName, + PatchSkipConfig patchSkipConfig) { + skipConfigureAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig).block(); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void skipConfigure(String resourceGroupName, String containerAppName, String patchName, + PatchSkipConfig patchSkipConfig, Context context) { + skipConfigureAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig, context).block(); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 containerAppName, + 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 (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName 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, containerAppName, patchName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException 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 containerAppName, + 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 (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName 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, containerAppName, patchName, accept, context); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown 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, ContainerAppsPatchResourceInner> + beginApplyAsync(String resourceGroupName, String containerAppName, String patchName) { + Mono>> mono = applyWithResponseAsync(resourceGroupName, containerAppName, patchName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ContainerAppsPatchResourceInner.class, ContainerAppsPatchResourceInner.class, + this.client.getContext()); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException thrown 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, ContainerAppsPatchResourceInner> + beginApplyAsync(String resourceGroupName, String containerAppName, String patchName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = applyWithResponseAsync(resourceGroupName, containerAppName, patchName, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ContainerAppsPatchResourceInner.class, ContainerAppsPatchResourceInner.class, + context); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is 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, ContainerAppsPatchResourceInner> + beginApply(String resourceGroupName, String containerAppName, String patchName) { + return this.beginApplyAsync(resourceGroupName, containerAppName, patchName).getSyncPoller(); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException thrown if the request is 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, ContainerAppsPatchResourceInner> + beginApply(String resourceGroupName, String containerAppName, String patchName, Context context) { + return this.beginApplyAsync(resourceGroupName, containerAppName, patchName, context).getSyncPoller(); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 containerAppName, + String patchName) { + return beginApplyAsync(resourceGroupName, containerAppName, patchName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException 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 containerAppName, + String patchName, Context context) { + return beginApplyAsync(resourceGroupName, containerAppName, patchName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 ContainerAppsPatchResourceInner apply(String resourceGroupName, String containerAppName, String patchName) { + return applyAsync(resourceGroupName, containerAppName, patchName).block(); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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 ManagementException 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 ContainerAppsPatchResourceInner apply(String resourceGroupName, String containerAppName, String patchName, + Context context) { + return applyAsync(resourceGroupName, containerAppName, patchName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App patch collection along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByContainerAppNextSinglePageAsync(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.listByContainerAppNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App patch collection along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByContainerAppNextSinglePageAsync(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.listByContainerAppNext(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/ContainerAppsPatchesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesImpl.java new file mode 100644 index 000000000000..e37f354e487c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesImpl.java @@ -0,0 +1,115 @@ +// 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.ContainerAppsPatchesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatches; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatchResource; +import com.azure.resourcemanager.appcontainers.models.PatchSkipConfig; + +public final class ContainerAppsPatchesImpl implements ContainerAppsPatches { + private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsPatchesImpl.class); + + private final ContainerAppsPatchesClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public ContainerAppsPatchesImpl(ContainerAppsPatchesClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByContainerApp(String resourceGroupName, + String containerAppName) { + PagedIterable inner + = this.serviceClient().listByContainerApp(resourceGroupName, containerAppName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ContainerAppsPatchResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByContainerApp(String resourceGroupName, + String containerAppName, String filter, Context context) { + PagedIterable inner + = this.serviceClient().listByContainerApp(resourceGroupName, containerAppName, filter, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ContainerAppsPatchResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String containerAppName, + String patchName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, containerAppName, patchName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ContainerAppsPatchResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ContainerAppsPatchResource get(String resourceGroupName, String containerAppName, String patchName) { + ContainerAppsPatchResourceInner inner + = this.serviceClient().get(resourceGroupName, containerAppName, patchName); + if (inner != null) { + return new ContainerAppsPatchResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String containerAppName, String patchName) { + this.serviceClient().delete(resourceGroupName, containerAppName, patchName); + } + + public void delete(String resourceGroupName, String containerAppName, String patchName, Context context) { + this.serviceClient().delete(resourceGroupName, containerAppName, patchName, context); + } + + public void skipConfigure(String resourceGroupName, String containerAppName, String patchName, + PatchSkipConfig patchSkipConfig) { + this.serviceClient().skipConfigure(resourceGroupName, containerAppName, patchName, patchSkipConfig); + } + + public void skipConfigure(String resourceGroupName, String containerAppName, String patchName, + PatchSkipConfig patchSkipConfig, Context context) { + this.serviceClient().skipConfigure(resourceGroupName, containerAppName, patchName, patchSkipConfig, context); + } + + public ContainerAppsPatchResource apply(String resourceGroupName, String containerAppName, String patchName) { + ContainerAppsPatchResourceInner inner + = this.serviceClient().apply(resourceGroupName, containerAppName, patchName); + if (inner != null) { + return new ContainerAppsPatchResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public ContainerAppsPatchResource apply(String resourceGroupName, String containerAppName, String patchName, + Context context) { + ContainerAppsPatchResourceInner inner + = this.serviceClient().apply(resourceGroupName, containerAppName, patchName, context); + if (inner != null) { + return new ContainerAppsPatchResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + private ContainerAppsPatchesClient 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/ContainerAppsRevisionReplicasClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasClientImpl.java index 1e8b67b9cbfa..c61df0a2fa31 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasClientImpl.java @@ -52,8 +52,8 @@ public final class ContainerAppsRevisionReplicasClientImpl implements ContainerA } /** - * The interface defining all the services for ContainerAppsApiClientContainerAppsRevisionReplicas to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for ContainerAppsApiClientContainerAppsRevisionReplicas to be used by the + * proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasImpl.java index d4af3bac90f6..78840c5e4e64 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasImpl.java @@ -30,8 +30,8 @@ public ContainerAppsRevisionReplicasImpl(ContainerAppsRevisionReplicasClient inn public Response getReplicaWithResponse(String resourceGroupName, String containerAppName, String revisionName, String replicaName, Context context) { - Response inner = this.serviceClient().getReplicaWithResponse(resourceGroupName, containerAppName, - revisionName, replicaName, context); + Response inner = this.serviceClient() + .getReplicaWithResponse(resourceGroupName, containerAppName, revisionName, replicaName, context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ReplicaImpl(inner.getValue(), this.manager())); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsImpl.java index 2f77c0175db5..c882280ca305 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsImpl.java @@ -62,8 +62,8 @@ public Revision getRevision(String resourceGroupName, String containerAppName, S public Response activateRevisionWithResponse(String resourceGroupName, String containerAppName, String revisionName, Context context) { - return this.serviceClient().activateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, - context); + return this.serviceClient() + .activateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); } public void activateRevision(String resourceGroupName, String containerAppName, String revisionName) { @@ -72,8 +72,8 @@ public void activateRevision(String resourceGroupName, String containerAppName, public Response deactivateRevisionWithResponse(String resourceGroupName, String containerAppName, String revisionName, Context context) { - return this.serviceClient().deactivateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, - context); + return this.serviceClient() + .deactivateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); } public void deactivateRevision(String resourceGroupName, String containerAppName, String revisionName) { @@ -82,8 +82,8 @@ public void deactivateRevision(String resourceGroupName, String containerAppName public Response restartRevisionWithResponse(String resourceGroupName, String containerAppName, String revisionName, Context context) { - return this.serviceClient().restartRevisionWithResponse(resourceGroupName, containerAppName, revisionName, - context); + return this.serviceClient() + .restartRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); } public void restartRevision(String resourceGroupName, String containerAppName, String revisionName) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSessionPoolsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSessionPoolsClientImpl.java new file mode 100644 index 000000000000..5cff18f84112 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSessionPoolsClientImpl.java @@ -0,0 +1,1366 @@ +// 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.ContainerAppsSessionPoolsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.SessionPoolInner; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appcontainers.models.SessionPoolCollection; +import com.azure.resourcemanager.appcontainers.models.SessionPoolUpdatableProperties; +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 ContainerAppsSessionPoolsClient. + */ +public final class ContainerAppsSessionPoolsClientImpl implements ContainerAppsSessionPoolsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ContainerAppsSessionPoolsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of ContainerAppsSessionPoolsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ContainerAppsSessionPoolsClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(ContainerAppsSessionPoolsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientContainerAppsSessionPools to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface ContainerAppsSessionPoolsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/sessionPools") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("sessionPoolName") String sessionPoolName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("sessionPoolName") String sessionPoolName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SessionPoolInner sessionPoolEnvelope, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("sessionPoolName") String sessionPoolName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") SessionPoolUpdatableProperties sessionPoolEnvelope, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/sessionPools/{sessionPoolName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("sessionPoolName") String sessionPoolName, @QueryParam("api-version") String apiVersion, + @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); + } + + /** + * Get the session pools in a given subscription. + * + * @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 session pools in a given subscription 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.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())); + } + + /** + * Get the session pools in a given subscription. + * + * @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 session pools in a given subscription 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.getSubscriptionId(), this.client.getApiVersion(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the session pools in a given subscription. + * + * @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 session pools in a given subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * Get the session pools in a given subscription. + * + * @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 session pools in a given subscription as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * Get the session pools in a given subscription. + * + * @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 session pools in a given subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * Get the session pools in a given subscription. + * + * @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 session pools in a given subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * Get the session pools in a given resource group of a subscription. + * + * @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 session pools in a given resource group of a subscription 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.getSubscriptionId(), resourceGroupName, 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())); + } + + /** + * Get the session pools in a given resource group of a subscription. + * + * @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 session pools in a given resource group of a subscription 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.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the session pools in a given resource group of a subscription. + * + * @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 session pools in a given resource group of a subscription as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * Get the session pools in a given resource group of a subscription. + * + * @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 session pools in a given resource group of a subscription 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)); + } + + /** + * Get the session pools in a given resource group of a subscription. + * + * @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 session pools in a given resource group of a subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * Get the session pools in a given resource group of a subscription. + * + * @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 session pools in a given resource group of a subscription as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Get the properties of a session pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 properties of a session pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String sessionPoolName) { + 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 (sessionPoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter sessionPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, sessionPoolName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the properties of a session pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 properties of a session pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String sessionPoolName, 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 (sessionPoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter sessionPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + sessionPoolName, this.client.getApiVersion(), accept, context); + } + + /** + * Get the properties of a session pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 properties of a session pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String sessionPoolName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, sessionPoolName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the properties of a session pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 properties of a session pool along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String sessionPoolName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, sessionPoolName, context).block(); + } + + /** + * Get the properties of a session pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 properties of a session pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SessionPoolInner getByResourceGroup(String resourceGroupName, String sessionPoolName) { + return getByResourceGroupWithResponse(resourceGroupName, sessionPoolName, Context.NONE).getValue(); + } + + /** + * Create or update a session pool. + * + * Create or update a session pool with the given properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String sessionPoolName, SessionPoolInner sessionPoolEnvelope) { + 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 (sessionPoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter sessionPoolName is required and cannot be null.")); + } + if (sessionPoolEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter sessionPoolEnvelope is required and cannot be null.")); + } else { + sessionPoolEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, sessionPoolName, this.client.getApiVersion(), sessionPoolEnvelope, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a session pool. + * + * Create or update a session pool with the given properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String sessionPoolName, SessionPoolInner sessionPoolEnvelope, 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 (sessionPoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter sessionPoolName is required and cannot be null.")); + } + if (sessionPoolEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter sessionPoolEnvelope is required and cannot be null.")); + } else { + sessionPoolEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + sessionPoolName, this.client.getApiVersion(), sessionPoolEnvelope, accept, context); + } + + /** + * Create or update a session pool. + * + * Create or update a session pool with the given properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SessionPoolInner> beginCreateOrUpdateAsync( + String resourceGroupName, String sessionPoolName, SessionPoolInner sessionPoolEnvelope) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, sessionPoolName, sessionPoolEnvelope); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SessionPoolInner.class, SessionPoolInner.class, this.client.getContext()); + } + + /** + * Create or update a session pool. + * + * Create or update a session pool with the given properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SessionPoolInner> beginCreateOrUpdateAsync( + String resourceGroupName, String sessionPoolName, SessionPoolInner sessionPoolEnvelope, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, sessionPoolName, sessionPoolEnvelope, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SessionPoolInner.class, SessionPoolInner.class, context); + } + + /** + * Create or update a session pool. + * + * Create or update a session pool with the given properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SessionPoolInner> beginCreateOrUpdate(String resourceGroupName, + String sessionPoolName, SessionPoolInner sessionPoolEnvelope) { + return this.beginCreateOrUpdateAsync(resourceGroupName, sessionPoolName, sessionPoolEnvelope).getSyncPoller(); + } + + /** + * Create or update a session pool. + * + * Create or update a session pool with the given properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SessionPoolInner> beginCreateOrUpdate(String resourceGroupName, + String sessionPoolName, SessionPoolInner sessionPoolEnvelope, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, sessionPoolName, sessionPoolEnvelope, context) + .getSyncPoller(); + } + + /** + * Create or update a session pool. + * + * Create or update a session pool with the given properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String sessionPoolName, + SessionPoolInner sessionPoolEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, sessionPoolName, sessionPoolEnvelope).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a session pool. + * + * Create or update a session pool with the given properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String sessionPoolName, + SessionPoolInner sessionPoolEnvelope, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, sessionPoolName, sessionPoolEnvelope, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a session pool. + * + * Create or update a session pool with the given properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SessionPoolInner createOrUpdate(String resourceGroupName, String sessionPoolName, + SessionPoolInner sessionPoolEnvelope) { + return createOrUpdateAsync(resourceGroupName, sessionPoolName, sessionPoolEnvelope).block(); + } + + /** + * Create or update a session pool. + * + * Create or update a session pool with the given properties. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SessionPoolInner createOrUpdate(String resourceGroupName, String sessionPoolName, + SessionPoolInner sessionPoolEnvelope, Context context) { + return createOrUpdateAsync(resourceGroupName, sessionPoolName, sessionPoolEnvelope, context).block(); + } + + /** + * Update properties of a session pool + * + * Patches a session pool using JSON merge patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String sessionPoolName, + SessionPoolUpdatableProperties sessionPoolEnvelope) { + 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 (sessionPoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter sessionPoolName is required and cannot be null.")); + } + if (sessionPoolEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter sessionPoolEnvelope is required and cannot be null.")); + } else { + sessionPoolEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, sessionPoolName, this.client.getApiVersion(), sessionPoolEnvelope, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update properties of a session pool + * + * Patches a session pool using JSON merge patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String sessionPoolName, + SessionPoolUpdatableProperties sessionPoolEnvelope, 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 (sessionPoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter sessionPoolName is required and cannot be null.")); + } + if (sessionPoolEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter sessionPoolEnvelope is required and cannot be null.")); + } else { + sessionPoolEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + sessionPoolName, this.client.getApiVersion(), sessionPoolEnvelope, accept, context); + } + + /** + * Update properties of a session pool + * + * Patches a session pool using JSON merge patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SessionPoolInner> beginUpdateAsync(String resourceGroupName, + String sessionPoolName, SessionPoolUpdatableProperties sessionPoolEnvelope) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, sessionPoolName, sessionPoolEnvelope); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SessionPoolInner.class, SessionPoolInner.class, this.client.getContext()); + } + + /** + * Update properties of a session pool + * + * Patches a session pool using JSON merge patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, SessionPoolInner> beginUpdateAsync(String resourceGroupName, + String sessionPoolName, SessionPoolUpdatableProperties sessionPoolEnvelope, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, sessionPoolName, sessionPoolEnvelope, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SessionPoolInner.class, SessionPoolInner.class, context); + } + + /** + * Update properties of a session pool + * + * Patches a session pool using JSON merge patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SessionPoolInner> beginUpdate(String resourceGroupName, + String sessionPoolName, SessionPoolUpdatableProperties sessionPoolEnvelope) { + return this.beginUpdateAsync(resourceGroupName, sessionPoolName, sessionPoolEnvelope).getSyncPoller(); + } + + /** + * Update properties of a session pool + * + * Patches a session pool using JSON merge patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, SessionPoolInner> beginUpdate(String resourceGroupName, + String sessionPoolName, SessionPoolUpdatableProperties sessionPoolEnvelope, Context context) { + return this.beginUpdateAsync(resourceGroupName, sessionPoolName, sessionPoolEnvelope, context).getSyncPoller(); + } + + /** + * Update properties of a session pool + * + * Patches a session pool using JSON merge patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String sessionPoolName, + SessionPoolUpdatableProperties sessionPoolEnvelope) { + return beginUpdateAsync(resourceGroupName, sessionPoolName, sessionPoolEnvelope).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update properties of a session pool + * + * Patches a session pool using JSON merge patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String sessionPoolName, + SessionPoolUpdatableProperties sessionPoolEnvelope, Context context) { + return beginUpdateAsync(resourceGroupName, sessionPoolName, sessionPoolEnvelope, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update properties of a session pool + * + * Patches a session pool using JSON merge patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SessionPoolInner update(String resourceGroupName, String sessionPoolName, + SessionPoolUpdatableProperties sessionPoolEnvelope) { + return updateAsync(resourceGroupName, sessionPoolName, sessionPoolEnvelope).block(); + } + + /** + * Update properties of a session pool + * + * Patches a session pool using JSON merge patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @param sessionPoolEnvelope Properties used to create a session pool. + * @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 session pool. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public SessionPoolInner update(String resourceGroupName, String sessionPoolName, + SessionPoolUpdatableProperties sessionPoolEnvelope, Context context) { + return updateAsync(resourceGroupName, sessionPoolName, sessionPoolEnvelope, context).block(); + } + + /** + * Delete a session pool. + * + * Delete the session pool with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 sessionPoolName) { + 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 (sessionPoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter sessionPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, sessionPoolName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a session pool. + * + * Delete the session pool with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 sessionPoolName, + 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 (sessionPoolName == null) { + return Mono + .error(new IllegalArgumentException("Parameter sessionPoolName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + sessionPoolName, this.client.getApiVersion(), accept, context); + } + + /** + * Delete a session pool. + * + * Delete the session pool with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 sessionPoolName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, sessionPoolName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a session pool. + * + * Delete the session pool with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 sessionPoolName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, sessionPoolName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a session pool. + * + * Delete the session pool with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 sessionPoolName) { + return this.beginDeleteAsync(resourceGroupName, sessionPoolName).getSyncPoller(); + } + + /** + * Delete a session pool. + * + * Delete the session pool with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 sessionPoolName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, sessionPoolName, context).getSyncPoller(); + } + + /** + * Delete a session pool. + * + * Delete the session pool with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 sessionPoolName) { + return beginDeleteAsync(resourceGroupName, sessionPoolName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a session pool. + * + * Delete the session pool with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 sessionPoolName, Context context) { + return beginDeleteAsync(resourceGroupName, sessionPoolName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a session pool. + * + * Delete the session pool with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 sessionPoolName) { + deleteAsync(resourceGroupName, sessionPoolName).block(); + } + + /** + * Delete a session pool. + * + * Delete the session pool with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 sessionPoolName, Context context) { + deleteAsync(resourceGroupName, sessionPoolName, 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 session pool collection Azure resource 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 session pool collection Azure resource 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 session pool collection Azure resource 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 session pool collection Azure resource 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/ContainerAppsSessionPoolsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSessionPoolsImpl.java new file mode 100644 index 000000000000..d2d3a49315af --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSessionPoolsImpl.java @@ -0,0 +1,146 @@ +// 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.ContainerAppsSessionPoolsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.SessionPoolInner; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsSessionPools; +import com.azure.resourcemanager.appcontainers.models.SessionPool; + +public final class ContainerAppsSessionPoolsImpl implements ContainerAppsSessionPools { + private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsSessionPoolsImpl.class); + + private final ContainerAppsSessionPoolsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public ContainerAppsSessionPoolsImpl(ContainerAppsSessionPoolsClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SessionPoolImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SessionPoolImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SessionPoolImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SessionPoolImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String sessionPoolName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, sessionPoolName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new SessionPoolImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public SessionPool getByResourceGroup(String resourceGroupName, String sessionPoolName) { + SessionPoolInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, sessionPoolName); + if (inner != null) { + return new SessionPoolImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String sessionPoolName) { + this.serviceClient().delete(resourceGroupName, sessionPoolName); + } + + public void delete(String resourceGroupName, String sessionPoolName, Context context) { + this.serviceClient().delete(resourceGroupName, sessionPoolName, context); + } + + public SessionPool getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String sessionPoolName = ResourceManagerUtils.getValueFromIdByName(id, "sessionPools"); + if (sessionPoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sessionPools'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, sessionPoolName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String sessionPoolName = ResourceManagerUtils.getValueFromIdByName(id, "sessionPools"); + if (sessionPoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sessionPools'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, sessionPoolName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String sessionPoolName = ResourceManagerUtils.getValueFromIdByName(id, "sessionPools"); + if (sessionPoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sessionPools'.", id))); + } + this.delete(resourceGroupName, sessionPoolName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String sessionPoolName = ResourceManagerUtils.getValueFromIdByName(id, "sessionPools"); + if (sessionPoolName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sessionPools'.", id))); + } + this.delete(resourceGroupName, sessionPoolName, context); + } + + private ContainerAppsSessionPoolsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + public SessionPoolImpl define(String name) { + return new SessionPoolImpl(name, this.manager()); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java index f2afb95f6217..0191dffceb46 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java @@ -584,8 +584,10 @@ public SyncPoller, SourceControlInner> beginCreat @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, SourceControlInner> beginCreateOrUpdate(String resourceGroupName, String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, - sourceControlEnvelope, context).getSyncPoller(); + return this + .beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, + context) + .getSyncPoller(); } /** @@ -604,7 +606,8 @@ public SyncPoller, SourceControlInner> beginCreat private Mono createOrUpdateAsync(String resourceGroupName, String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope) { return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope) - .last().flatMap(this.client::getLroFinalResultOrError); + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** 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 d460f9e1331a..011522485f37 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 @@ -119,16 +119,20 @@ public DaprComponentImpl withExistingConnectedEnvironment(String resourceGroupNa } public DaprComponent create() { - this.innerObject - = serviceManager.serviceClient().getConnectedEnvironmentsDaprComponents().createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsDaprComponents() + .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), + Context.NONE) + .getValue(); return this; } public DaprComponent create(Context context) { - this.innerObject - = serviceManager.serviceClient().getConnectedEnvironmentsDaprComponents().createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsDaprComponents() + .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), + context) + .getValue(); return this; } @@ -143,16 +147,20 @@ public DaprComponentImpl update() { } public DaprComponent apply() { - this.innerObject - = serviceManager.serviceClient().getConnectedEnvironmentsDaprComponents().createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsDaprComponents() + .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), + Context.NONE) + .getValue(); return this; } public DaprComponent apply(Context context) { - this.innerObject - = serviceManager.serviceClient().getConnectedEnvironmentsDaprComponents().createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsDaprComponents() + .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), + context) + .getValue(); return this; } @@ -167,25 +175,29 @@ public DaprComponent apply(Context context) { } public DaprComponent refresh() { - this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsDaprComponents() - .getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsDaprComponents() + .getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE) + .getValue(); return this; } public DaprComponent refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsDaprComponents() - .getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getConnectedEnvironmentsDaprComponents() + .getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context) + .getValue(); return this; } public Response listSecretsWithResponse(Context context) { - return serviceManager.connectedEnvironmentsDaprComponents().listSecretsWithResponse(resourceGroupName, - connectedEnvironmentName, componentName, context); + return serviceManager.connectedEnvironmentsDaprComponents() + .listSecretsWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); } public DaprSecretsCollection listSecrets() { - return serviceManager.connectedEnvironmentsDaprComponents().listSecrets(resourceGroupName, - connectedEnvironmentName, componentName); + return serviceManager.connectedEnvironmentsDaprComponents() + .listSecrets(resourceGroupName, connectedEnvironmentName, componentName); } public DaprComponentImpl withComponentType(String componentType) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesImpl.java index 03620b7c4656..112e635dd578 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesImpl.java @@ -68,8 +68,8 @@ public DaprComponentResiliencyPolicy get(String resourceGroupName, String enviro public Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, String name, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, componentName, name, - context); + return this.serviceClient() + .deleteWithResponse(resourceGroupName, environmentName, componentName, name, context); } public void delete(String resourceGroupName, String environmentName, String componentName, String name) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPolicyImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPolicyImpl.java index cbf400cbf242..0e62331b7cff 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPolicyImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPolicyImpl.java @@ -69,16 +69,20 @@ public DaprComponentResiliencyPolicyImpl withExistingDaprComponent(String resour } public DaprComponentResiliencyPolicy create() { - this.innerObject - = serviceManager.serviceClient().getDaprComponentResiliencyPolicies().createOrUpdateWithResponse( - resourceGroupName, environmentName, componentName, name, this.innerModel(), Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getDaprComponentResiliencyPolicies() + .createOrUpdateWithResponse(resourceGroupName, environmentName, componentName, name, this.innerModel(), + Context.NONE) + .getValue(); return this; } public DaprComponentResiliencyPolicy create(Context context) { - this.innerObject - = serviceManager.serviceClient().getDaprComponentResiliencyPolicies().createOrUpdateWithResponse( - resourceGroupName, environmentName, componentName, name, this.innerModel(), context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getDaprComponentResiliencyPolicies() + .createOrUpdateWithResponse(resourceGroupName, environmentName, componentName, name, this.innerModel(), + context) + .getValue(); return this; } @@ -94,16 +98,20 @@ public DaprComponentResiliencyPolicyImpl update() { } public DaprComponentResiliencyPolicy apply() { - this.innerObject - = serviceManager.serviceClient().getDaprComponentResiliencyPolicies().createOrUpdateWithResponse( - resourceGroupName, environmentName, componentName, name, this.innerModel(), Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getDaprComponentResiliencyPolicies() + .createOrUpdateWithResponse(resourceGroupName, environmentName, componentName, name, this.innerModel(), + Context.NONE) + .getValue(); return this; } public DaprComponentResiliencyPolicy apply(Context context) { - this.innerObject - = serviceManager.serviceClient().getDaprComponentResiliencyPolicies().createOrUpdateWithResponse( - resourceGroupName, environmentName, componentName, name, this.innerModel(), context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getDaprComponentResiliencyPolicies() + .createOrUpdateWithResponse(resourceGroupName, environmentName, componentName, name, this.innerModel(), + context) + .getValue(); return this; } @@ -118,14 +126,18 @@ public DaprComponentResiliencyPolicy apply(Context context) { } public DaprComponentResiliencyPolicy refresh() { - this.innerObject = serviceManager.serviceClient().getDaprComponentResiliencyPolicies() - .getWithResponse(resourceGroupName, environmentName, componentName, name, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getDaprComponentResiliencyPolicies() + .getWithResponse(resourceGroupName, environmentName, componentName, name, Context.NONE) + .getValue(); return this; } public DaprComponentResiliencyPolicy refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getDaprComponentResiliencyPolicies() - .getWithResponse(resourceGroupName, environmentName, componentName, name, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getDaprComponentResiliencyPolicies() + .getWithResponse(resourceGroupName, environmentName, componentName, name, context) + .getValue(); return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java index 1e94a6c8e32f..e08035e86f85 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java @@ -63,8 +63,9 @@ public DaprComponent get(String resourceGroupName, String environmentName, Strin public Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, String componentName, DaprComponentInner daprComponentEnvelope, Context context) { - Response inner = this.serviceClient().createOrUpdateWithResponse(resourceGroupName, - environmentName, componentName, daprComponentEnvelope, context); + Response inner = this.serviceClient() + .createOrUpdateWithResponse(resourceGroupName, environmentName, componentName, daprComponentEnvelope, + context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DaprComponentImpl(inner.getValue(), this.manager())); @@ -75,8 +76,8 @@ public Response createOrUpdateWithResponse(String resourceGroupNa public DaprComponent createOrUpdate(String resourceGroupName, String environmentName, String componentName, DaprComponentInner daprComponentEnvelope) { - DaprComponentInner inner = this.serviceClient().createOrUpdate(resourceGroupName, environmentName, - componentName, daprComponentEnvelope); + DaprComponentInner inner = this.serviceClient() + .createOrUpdate(resourceGroupName, environmentName, componentName, daprComponentEnvelope); if (inner != null) { return new DaprComponentImpl(inner, this.manager()); } else { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionImpl.java index b503f52d86b1..daee523a614a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionImpl.java @@ -99,14 +99,16 @@ public DaprSubscriptionImpl withExistingManagedEnvironment(String resourceGroupN } public DaprSubscription create() { - this.innerObject = serviceManager.serviceClient().getDaprSubscriptions() + this.innerObject = serviceManager.serviceClient() + .getDaprSubscriptions() .createOrUpdateWithResponse(resourceGroupName, environmentName, name, this.innerModel(), Context.NONE) .getValue(); return this; } public DaprSubscription create(Context context) { - this.innerObject = serviceManager.serviceClient().getDaprSubscriptions() + this.innerObject = serviceManager.serviceClient() + .getDaprSubscriptions() .createOrUpdateWithResponse(resourceGroupName, environmentName, name, this.innerModel(), context) .getValue(); return this; @@ -123,14 +125,16 @@ public DaprSubscriptionImpl update() { } public DaprSubscription apply() { - this.innerObject = serviceManager.serviceClient().getDaprSubscriptions() + this.innerObject = serviceManager.serviceClient() + .getDaprSubscriptions() .createOrUpdateWithResponse(resourceGroupName, environmentName, name, this.innerModel(), Context.NONE) .getValue(); return this; } public DaprSubscription apply(Context context) { - this.innerObject = serviceManager.serviceClient().getDaprSubscriptions() + this.innerObject = serviceManager.serviceClient() + .getDaprSubscriptions() .createOrUpdateWithResponse(resourceGroupName, environmentName, name, this.innerModel(), context) .getValue(); return this; @@ -146,14 +150,18 @@ public DaprSubscription apply(Context context) { } public DaprSubscription refresh() { - this.innerObject = serviceManager.serviceClient().getDaprSubscriptions() - .getWithResponse(resourceGroupName, environmentName, name, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getDaprSubscriptions() + .getWithResponse(resourceGroupName, environmentName, name, Context.NONE) + .getValue(); return this; } public DaprSubscription refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getDaprSubscriptions() - .getWithResponse(resourceGroupName, environmentName, name, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getDaprSubscriptions() + .getWithResponse(resourceGroupName, environmentName, name, context) + .getValue(); return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentImpl.java index c575a5b205e3..f6049ff1496b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentImpl.java @@ -87,14 +87,16 @@ public DotNetComponentImpl withExistingManagedEnvironment(String resourceGroupNa } public DotNetComponent create() { - this.innerObject = serviceManager.serviceClient().getDotNetComponents().createOrUpdate(resourceGroupName, - environmentName, name, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getDotNetComponents() + .createOrUpdate(resourceGroupName, environmentName, name, this.innerModel(), Context.NONE); return this; } public DotNetComponent create(Context context) { - this.innerObject = serviceManager.serviceClient().getDotNetComponents().createOrUpdate(resourceGroupName, - environmentName, name, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getDotNetComponents() + .createOrUpdate(resourceGroupName, environmentName, name, this.innerModel(), context); return this; } @@ -109,14 +111,16 @@ public DotNetComponentImpl update() { } public DotNetComponent apply() { - this.innerObject = serviceManager.serviceClient().getDotNetComponents().update(resourceGroupName, - environmentName, name, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getDotNetComponents() + .update(resourceGroupName, environmentName, name, this.innerModel(), Context.NONE); return this; } public DotNetComponent apply(Context context) { - this.innerObject = serviceManager.serviceClient().getDotNetComponents().update(resourceGroupName, - environmentName, name, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getDotNetComponents() + .update(resourceGroupName, environmentName, name, this.innerModel(), context); return this; } @@ -130,14 +134,18 @@ public DotNetComponent apply(Context context) { } public DotNetComponent refresh() { - this.innerObject = serviceManager.serviceClient().getDotNetComponents() - .getWithResponse(resourceGroupName, environmentName, name, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getDotNetComponents() + .getWithResponse(resourceGroupName, environmentName, name, Context.NONE) + .getValue(); return this; } public DotNetComponent refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getDotNetComponents() - .getWithResponse(resourceGroupName, environmentName, name, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getDotNetComponents() + .getWithResponse(resourceGroupName, environmentName, name, context) + .getValue(); return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsClientImpl.java index 33b02f2c79cf..6276a3df5b05 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsClientImpl.java @@ -641,7 +641,8 @@ private Mono createOrUpdateAsync(String resourceGroupName, private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context) - .last().flatMap(this.client::getLroFinalResultOrError); + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsClientImpl.java new file mode 100644 index 000000000000..5843c01b5c77 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsClientImpl.java @@ -0,0 +1,220 @@ +// 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.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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.FunctionsExtensionsClient; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in FunctionsExtensionsClient. + */ +public final class FunctionsExtensionsClientImpl implements FunctionsExtensionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final FunctionsExtensionsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of FunctionsExtensionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FunctionsExtensionsClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(FunctionsExtensionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientFunctionsExtensions to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface FunctionsExtensionsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/providers/Microsoft.App/functions/{functionAppName}/invoke") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> invokeFunctionsHost(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @PathParam("revisionName") String revisionName, + @PathParam("functionAppName") String functionAppName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> invokeFunctionsHostWithResponseAsync(String resourceGroupName, + String containerAppName, String revisionName, String functionAppName) { + 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 (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (revisionName == null) { + return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); + } + if (functionAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionAppName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.invokeFunctionsHost(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, containerAppName, revisionName, functionAppName, + this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @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 Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> invokeFunctionsHostWithResponseAsync(String resourceGroupName, + String containerAppName, String revisionName, String functionAppName, 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 (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (revisionName == null) { + return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); + } + if (functionAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionAppName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.invokeFunctionsHost(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, revisionName, functionAppName, this.client.getApiVersion(), accept, + context); + } + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono invokeFunctionsHostAsync(String resourceGroupName, String containerAppName, + String revisionName, String functionAppName) { + return invokeFunctionsHostWithResponseAsync(resourceGroupName, containerAppName, revisionName, functionAppName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @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 Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response invokeFunctionsHostWithResponse(String resourceGroupName, String containerAppName, + String revisionName, String functionAppName, Context context) { + return invokeFunctionsHostWithResponseAsync(resourceGroupName, containerAppName, revisionName, functionAppName, + context).block(); + } + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public String invokeFunctionsHost(String resourceGroupName, String containerAppName, String revisionName, + String functionAppName) { + return invokeFunctionsHostWithResponse(resourceGroupName, containerAppName, revisionName, functionAppName, + Context.NONE).getValue(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsImpl.java new file mode 100644 index 000000000000..8db782ad9313 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsImpl.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.Response; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.FunctionsExtensionsClient; +import com.azure.resourcemanager.appcontainers.models.FunctionsExtensions; + +public final class FunctionsExtensionsImpl implements FunctionsExtensions { + private static final ClientLogger LOGGER = new ClientLogger(FunctionsExtensionsImpl.class); + + private final FunctionsExtensionsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public FunctionsExtensionsImpl(FunctionsExtensionsClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response invokeFunctionsHostWithResponse(String resourceGroupName, String containerAppName, + String revisionName, String functionAppName, Context context) { + return this.serviceClient() + .invokeFunctionsHostWithResponse(resourceGroupName, containerAppName, revisionName, functionAppName, + context); + } + + public String invokeFunctionsHost(String resourceGroupName, String containerAppName, String revisionName, + String functionAppName) { + return this.serviceClient() + .invokeFunctionsHost(resourceGroupName, containerAppName, revisionName, functionAppName); + } + + private FunctionsExtensionsClient 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/JavaComponentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentImpl.java index 66398fe94215..e061b5f4d088 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentImpl.java @@ -8,12 +8,7 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner; import com.azure.resourcemanager.appcontainers.models.JavaComponent; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; -import java.util.Collections; -import java.util.List; +import com.azure.resourcemanager.appcontainers.models.JavaComponentProperties; public final class JavaComponentImpl implements JavaComponent, JavaComponent.Definition, JavaComponent.Update { private JavaComponentInner innerObject; @@ -32,34 +27,12 @@ public String type() { return this.innerModel().type(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public JavaComponentType componentType() { - return this.innerModel().componentType(); - } - - public JavaComponentProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public List configurations() { - List inner = this.innerModel().configurations(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public JavaComponentProperties properties() { + return this.innerModel().properties(); } - public List serviceBinds() { - List inner = this.innerModel().serviceBinds(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public SystemData systemData() { + return this.innerModel().systemData(); } public String resourceGroupName() { @@ -87,14 +60,16 @@ public JavaComponentImpl withExistingManagedEnvironment(String resourceGroupName } public JavaComponent create() { - this.innerObject = serviceManager.serviceClient().getJavaComponents().createOrUpdate(resourceGroupName, - environmentName, name, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getJavaComponents() + .createOrUpdate(resourceGroupName, environmentName, name, this.innerModel(), Context.NONE); return this; } public JavaComponent create(Context context) { - this.innerObject = serviceManager.serviceClient().getJavaComponents().createOrUpdate(resourceGroupName, - environmentName, name, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getJavaComponents() + .createOrUpdate(resourceGroupName, environmentName, name, this.innerModel(), context); return this; } @@ -109,14 +84,16 @@ public JavaComponentImpl update() { } public JavaComponent apply() { - this.innerObject = serviceManager.serviceClient().getJavaComponents().update(resourceGroupName, environmentName, - name, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getJavaComponents() + .update(resourceGroupName, environmentName, name, this.innerModel(), Context.NONE); return this; } public JavaComponent apply(Context context) { - this.innerObject = serviceManager.serviceClient().getJavaComponents().update(resourceGroupName, environmentName, - name, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getJavaComponents() + .update(resourceGroupName, environmentName, name, this.innerModel(), context); return this; } @@ -130,29 +107,23 @@ public JavaComponent apply(Context context) { } public JavaComponent refresh() { - this.innerObject = serviceManager.serviceClient().getJavaComponents() - .getWithResponse(resourceGroupName, environmentName, name, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getJavaComponents() + .getWithResponse(resourceGroupName, environmentName, name, Context.NONE) + .getValue(); return this; } public JavaComponent refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getJavaComponents() - .getWithResponse(resourceGroupName, environmentName, name, context).getValue(); - return this; - } - - public JavaComponentImpl withComponentType(JavaComponentType componentType) { - this.innerModel().withComponentType(componentType); - return this; - } - - public JavaComponentImpl withConfigurations(List configurations) { - this.innerModel().withConfigurations(configurations); + this.innerObject = serviceManager.serviceClient() + .getJavaComponents() + .getWithResponse(resourceGroupName, environmentName, name, context) + .getValue(); return this; } - public JavaComponentImpl withServiceBinds(List serviceBinds) { - this.innerModel().withServiceBinds(serviceBinds); + public JavaComponentImpl withProperties(JavaComponentProperties properties) { + this.innerModel().withProperties(properties); return this; } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionImpl.java index a763cde3740e..48488c9bbf21 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionImpl.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.appcontainers.implementation; import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; +import com.azure.resourcemanager.appcontainers.models.ExecutionStatus; import com.azure.resourcemanager.appcontainers.models.JobExecution; import com.azure.resourcemanager.appcontainers.models.JobExecutionRunningState; import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; @@ -49,6 +50,10 @@ public JobExecutionTemplate template() { return this.innerModel().template(); } + public ExecutionStatus detailedStatus() { + return this.innerModel().detailedStatus(); + } + public JobExecutionInner innerModel() { return this.innerObject; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobImpl.java index 73af308a860d..7cca6a2825b9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobImpl.java @@ -132,14 +132,16 @@ public JobImpl withExistingResourceGroup(String resourceGroupName) { } public Job create() { - this.innerObject = serviceManager.serviceClient().getJobs().createOrUpdate(resourceGroupName, jobName, - this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getJobs() + .createOrUpdate(resourceGroupName, jobName, this.innerModel(), Context.NONE); return this; } public Job create(Context context) { - this.innerObject = serviceManager.serviceClient().getJobs().createOrUpdate(resourceGroupName, jobName, - this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getJobs() + .createOrUpdate(resourceGroupName, jobName, this.innerModel(), context); return this; } @@ -155,8 +157,9 @@ public JobImpl update() { } public Job apply() { - this.innerObject = serviceManager.serviceClient().getJobs().update(resourceGroupName, jobName, - updateJobEnvelope, Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getJobs() + .update(resourceGroupName, jobName, updateJobEnvelope, Context.NONE); return this; } @@ -174,14 +177,18 @@ public Job apply(Context context) { } public Job refresh() { - this.innerObject = serviceManager.serviceClient().getJobs() - .getByResourceGroupWithResponse(resourceGroupName, jobName, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getJobs() + .getByResourceGroupWithResponse(resourceGroupName, jobName, Context.NONE) + .getValue(); return this; } public Job refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getJobs() - .getByResourceGroupWithResponse(resourceGroupName, jobName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getJobs() + .getByResourceGroupWithResponse(resourceGroupName, jobName, context) + .getValue(); return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsClientImpl.java index e8a3e69f1368..a890d29e819c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsClientImpl.java @@ -72,8 +72,8 @@ public final class JobsClientImpl implements JobsClient { } /** - * The interface defining all the services for ContainerAppsApiClientJobs to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for ContainerAppsApiClientJobs to be used by the proxy service to perform + * REST calls. */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsImpl.java index 2ec3b5f9e57f..77e5026644ff 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsImpl.java @@ -22,8 +22,8 @@ import com.azure.resourcemanager.appcontainers.models.Job; import com.azure.resourcemanager.appcontainers.models.JobExecutionBase; import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; -import com.azure.resourcemanager.appcontainers.models.JobSecretsCollection; import com.azure.resourcemanager.appcontainers.models.Jobs; +import com.azure.resourcemanager.appcontainers.models.JobSecretsCollection; public final class JobsImpl implements Jobs { private static final ClientLogger LOGGER = new ClientLogger(JobsImpl.class); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificateImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificateImpl.java index 56dda0044379..4c9c56e75a7f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificateImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificateImpl.java @@ -88,14 +88,17 @@ public ManagedCertificateImpl withExistingManagedEnvironment(String resourceGrou } public ManagedCertificate create() { - this.innerObject = serviceManager.serviceClient().getManagedCertificates().createOrUpdate(resourceGroupName, - environmentName, managedCertificateName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getManagedCertificates() + .createOrUpdate(resourceGroupName, environmentName, managedCertificateName, this.innerModel(), + Context.NONE); return this; } public ManagedCertificate create(Context context) { - this.innerObject = serviceManager.serviceClient().getManagedCertificates().createOrUpdate(resourceGroupName, - environmentName, managedCertificateName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getManagedCertificates() + .createOrUpdate(resourceGroupName, environmentName, managedCertificateName, this.innerModel(), context); return this; } @@ -112,14 +115,20 @@ public ManagedCertificateImpl update() { } public ManagedCertificate apply() { - this.innerObject = serviceManager.serviceClient().getManagedCertificates().updateWithResponse(resourceGroupName, - environmentName, managedCertificateName, updateManagedCertificateEnvelope, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getManagedCertificates() + .updateWithResponse(resourceGroupName, environmentName, managedCertificateName, + updateManagedCertificateEnvelope, Context.NONE) + .getValue(); return this; } public ManagedCertificate apply(Context context) { - this.innerObject = serviceManager.serviceClient().getManagedCertificates().updateWithResponse(resourceGroupName, - environmentName, managedCertificateName, updateManagedCertificateEnvelope, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getManagedCertificates() + .updateWithResponse(resourceGroupName, environmentName, managedCertificateName, + updateManagedCertificateEnvelope, context) + .getValue(); return this; } @@ -134,14 +143,18 @@ public ManagedCertificate apply(Context context) { } public ManagedCertificate refresh() { - this.innerObject = serviceManager.serviceClient().getManagedCertificates() - .getWithResponse(resourceGroupName, environmentName, managedCertificateName, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getManagedCertificates() + .getWithResponse(resourceGroupName, environmentName, managedCertificateName, Context.NONE) + .getValue(); return this; } public ManagedCertificate refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getManagedCertificates() - .getWithResponse(resourceGroupName, environmentName, managedCertificateName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getManagedCertificates() + .getWithResponse(resourceGroupName, environmentName, managedCertificateName, context) + .getValue(); return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesClientImpl.java index 2f82424fccd4..61f625bbd154 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesClientImpl.java @@ -466,8 +466,10 @@ private PollerFlux, ManagedCertificateInner> public SyncPoller, ManagedCertificateInner> beginCreateOrUpdate(String resourceGroupName, String environmentName, String managedCertificateName) { final ManagedCertificateInner managedCertificateEnvelope = null; - return this.beginCreateOrUpdateAsync(resourceGroupName, environmentName, managedCertificateName, - managedCertificateEnvelope).getSyncPoller(); + return this + .beginCreateOrUpdateAsync(resourceGroupName, environmentName, managedCertificateName, + managedCertificateEnvelope) + .getSyncPoller(); } /** @@ -489,8 +491,10 @@ private PollerFlux, ManagedCertificateInner> public SyncPoller, ManagedCertificateInner> beginCreateOrUpdate( String resourceGroupName, String environmentName, String managedCertificateName, ManagedCertificateInner managedCertificateEnvelope, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, environmentName, managedCertificateName, - managedCertificateEnvelope, context).getSyncPoller(); + return this + .beginCreateOrUpdateAsync(resourceGroupName, environmentName, managedCertificateName, + managedCertificateEnvelope, context) + .getSyncPoller(); } /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesImpl.java index cfdb8c2361cc..3f5344d87c4d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesImpl.java @@ -51,8 +51,8 @@ public ManagedCertificate get(String resourceGroupName, String environmentName, public Response deleteWithResponse(String resourceGroupName, String environmentName, String managedCertificateName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, managedCertificateName, - context); + return this.serviceClient() + .deleteWithResponse(resourceGroupName, environmentName, managedCertificateName, context); } public void delete(String resourceGroupName, String environmentName, String managedCertificateName) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java index f0b8491e223a..5205db636ec4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java @@ -52,8 +52,8 @@ public final class ManagedEnvironmentDiagnosticsClientImpl implements ManagedEnv } /** - * The interface defining all the services for ContainerAppsApiClientManagedEnvironmentDiagnostics to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for ContainerAppsApiClientManagedEnvironmentDiagnostics to be used by the + * proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") 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 9a5213f6b0bf..b99c502d0c85 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.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; @@ -18,13 +19,16 @@ 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.ManagedEnvironmentPropertiesPeerTrafficConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; +import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnection; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import java.util.Collections; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; public final class ManagedEnvironmentImpl implements ManagedEnvironment, ManagedEnvironment.Definition, ManagedEnvironment.Update { @@ -146,6 +150,21 @@ public ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication() { return this.innerModel().peerAuthentication(); } + public ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration() { + return this.innerModel().peerTrafficConfiguration(); + } + + public List privateEndpointConnections() { + List inner = this.innerModel().privateEndpointConnections(); + if (inner != null) { + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + public Region region() { return Region.fromName(this.regionName()); } @@ -176,14 +195,16 @@ public ManagedEnvironmentImpl withExistingResourceGroup(String resourceGroupName } public ManagedEnvironment create() { - this.innerObject = serviceManager.serviceClient().getManagedEnvironments().createOrUpdate(resourceGroupName, - environmentName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getManagedEnvironments() + .createOrUpdate(resourceGroupName, environmentName, this.innerModel(), Context.NONE); return this; } public ManagedEnvironment create(Context context) { - this.innerObject = serviceManager.serviceClient().getManagedEnvironments().createOrUpdate(resourceGroupName, - environmentName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getManagedEnvironments() + .createOrUpdate(resourceGroupName, environmentName, this.innerModel(), context); return this; } @@ -199,14 +220,16 @@ public ManagedEnvironmentImpl update() { } public ManagedEnvironment apply() { - this.innerObject = serviceManager.serviceClient().getManagedEnvironments().update(resourceGroupName, - environmentName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient() + .getManagedEnvironments() + .update(resourceGroupName, environmentName, this.innerModel(), Context.NONE); return this; } public ManagedEnvironment apply(Context context) { - this.innerObject = serviceManager.serviceClient().getManagedEnvironments().update(resourceGroupName, - environmentName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient() + .getManagedEnvironments() + .update(resourceGroupName, environmentName, this.innerModel(), context); return this; } @@ -219,20 +242,24 @@ public ManagedEnvironment apply(Context context) { } public ManagedEnvironment refresh() { - this.innerObject = serviceManager.serviceClient().getManagedEnvironments() - .getByResourceGroupWithResponse(resourceGroupName, environmentName, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getManagedEnvironments() + .getByResourceGroupWithResponse(resourceGroupName, environmentName, Context.NONE) + .getValue(); return this; } public ManagedEnvironment refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getManagedEnvironments() - .getByResourceGroupWithResponse(resourceGroupName, environmentName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getManagedEnvironments() + .getByResourceGroupWithResponse(resourceGroupName, environmentName, context) + .getValue(); return this; } public Response getAuthTokenWithResponse(Context context) { - return serviceManager.managedEnvironments().getAuthTokenWithResponse(resourceGroupName, environmentName, - context); + return serviceManager.managedEnvironments() + .getAuthTokenWithResponse(resourceGroupName, environmentName, context); } public EnvironmentAuthToken getAuthToken() { @@ -330,4 +357,10 @@ public ManagedEnvironmentImpl withInfrastructureResourceGroup(String infrastruct this.innerModel().withPeerAuthentication(peerAuthentication); return this; } + + public ManagedEnvironmentImpl + withPeerTrafficConfiguration(ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration) { + this.innerModel().withPeerTrafficConfiguration(peerTrafficConfiguration); + return this; + } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateEndpointConnectionsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateEndpointConnectionsClientImpl.java new file mode 100644 index 000000000000..e4b4ff0a1113 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateEndpointConnectionsClientImpl.java @@ -0,0 +1,1004 @@ +// 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.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentPrivateEndpointConnectionsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnectionListResult; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in + * ManagedEnvironmentPrivateEndpointConnectionsClient. + */ +public final class ManagedEnvironmentPrivateEndpointConnectionsClientImpl + implements ManagedEnvironmentPrivateEndpointConnectionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ManagedEnvironmentPrivateEndpointConnectionsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of ManagedEnvironmentPrivateEndpointConnectionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ManagedEnvironmentPrivateEndpointConnectionsClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(ManagedEnvironmentPrivateEndpointConnectionsService.class, + client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientManagedEnvironmentPrivateEndpointConnections to + * be used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface ManagedEnvironmentPrivateEndpointConnectionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/privateEndpointConnections") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.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("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") PrivateEndpointConnectionInner privateEndpointConnectionEnvelope, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/privateEndpointConnections/{privateEndpointConnectionName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, + @PathParam("privateEndpointConnectionName") String privateEndpointConnectionName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List private endpoint connections for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified resource 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())); + } + + /** + * List private endpoint connections for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified resource 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)); + } + + /** + * List private endpoint connections for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified resource 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)); + } + + /** + * List private endpoint connections for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified resource 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)); + } + + /** + * List private endpoint connections for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified resource as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String environmentName) { + return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); + } + + /** + * List private endpoint connections for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified resource 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 a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection for a given managed environment along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String environmentName, String privateEndpointConnectionName) { + 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.")); + } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection for a given managed environment along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String environmentName, String privateEndpointConnectionName, 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.")); + } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context); + } + + /** + * Get a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection for a given managed environment on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String environmentName, + String privateEndpointConnectionName) { + return getWithResponseAsync(resourceGroupName, environmentName, privateEndpointConnectionName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection for a given managed environment along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String environmentName, + String privateEndpointConnectionName, Context context) { + return getWithResponseAsync(resourceGroupName, environmentName, privateEndpointConnectionName, context).block(); + } + + /** + * Get a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection for a given managed environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner get(String resourceGroupName, String environmentName, + String privateEndpointConnectionName) { + return getWithResponse(resourceGroupName, environmentName, privateEndpointConnectionName, Context.NONE) + .getValue(); + } + + /** + * Update the state of a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner privateEndpointConnectionEnvelope) { + 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.")); + } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (privateEndpointConnectionEnvelope == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionEnvelope is required and cannot be null.")); + } else { + privateEndpointConnectionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, privateEndpointConnectionName, this.client.getApiVersion(), + privateEndpointConnectionEnvelope, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update the state of a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner privateEndpointConnectionEnvelope, 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.")); + } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + if (privateEndpointConnectionEnvelope == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionEnvelope is required and cannot be null.")); + } else { + privateEndpointConnectionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, privateEndpointConnectionName, this.client.getApiVersion(), + privateEndpointConnectionEnvelope, accept, context); + } + + /** + * Update the state of a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PrivateEndpointConnectionInner> + beginCreateOrUpdateAsync(String resourceGroupName, String environmentName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner privateEndpointConnectionEnvelope) { + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, + privateEndpointConnectionName, privateEndpointConnectionEnvelope); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, + this.client.getContext()); + } + + /** + * Update the state of a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, PrivateEndpointConnectionInner> + beginCreateOrUpdateAsync(String resourceGroupName, String environmentName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner privateEndpointConnectionEnvelope, Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, + privateEndpointConnectionName, privateEndpointConnectionEnvelope, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), PrivateEndpointConnectionInner.class, PrivateEndpointConnectionInner.class, + context); + } + + /** + * Update the state of a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( + String resourceGroupName, String environmentName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner privateEndpointConnectionEnvelope) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, environmentName, privateEndpointConnectionName, + privateEndpointConnectionEnvelope) + .getSyncPoller(); + } + + /** + * Update the state of a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, PrivateEndpointConnectionInner> beginCreateOrUpdate( + String resourceGroupName, String environmentName, String privateEndpointConnectionName, + PrivateEndpointConnectionInner privateEndpointConnectionEnvelope, Context context) { + return this + .beginCreateOrUpdateAsync(resourceGroupName, environmentName, privateEndpointConnectionName, + privateEndpointConnectionEnvelope, context) + .getSyncPoller(); + } + + /** + * Update the state of a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnectionEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, environmentName, privateEndpointConnectionName, + privateEndpointConnectionEnvelope).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the state of a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnectionEnvelope, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, environmentName, privateEndpointConnectionName, + privateEndpointConnectionEnvelope, context).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update the state of a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String environmentName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnectionEnvelope) { + return createOrUpdateAsync(resourceGroupName, environmentName, privateEndpointConnectionName, + privateEndpointConnectionEnvelope).block(); + } + + /** + * Update the state of a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param privateEndpointConnectionEnvelope The resource of private endpoint and its properties. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Private Endpoint Connection resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String environmentName, + String privateEndpointConnectionName, PrivateEndpointConnectionInner privateEndpointConnectionEnvelope, + Context context) { + return createOrUpdateAsync(resourceGroupName, environmentName, privateEndpointConnectionName, + privateEndpointConnectionEnvelope, context).block(); + } + + /** + * Delete a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String environmentName, + String privateEndpointConnectionName) { + 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.")); + } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String environmentName, + String privateEndpointConnectionName, 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.")); + } + if (privateEndpointConnectionName == null) { + return Mono.error(new IllegalArgumentException( + "Parameter privateEndpointConnectionName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, privateEndpointConnectionName, this.client.getApiVersion(), accept, context); + } + + /** + * Delete a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String environmentName, + String privateEndpointConnectionName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, environmentName, privateEndpointConnectionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String environmentName, + String privateEndpointConnectionName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, environmentName, privateEndpointConnectionName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName, + String privateEndpointConnectionName) { + return this.beginDeleteAsync(resourceGroupName, environmentName, privateEndpointConnectionName).getSyncPoller(); + } + + /** + * Delete a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName, + String privateEndpointConnectionName, Context context) { + return this.beginDeleteAsync(resourceGroupName, environmentName, privateEndpointConnectionName, context) + .getSyncPoller(); + } + + /** + * Delete a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String environmentName, + String privateEndpointConnectionName) { + return beginDeleteAsync(resourceGroupName, environmentName, privateEndpointConnectionName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String environmentName, + String privateEndpointConnectionName, Context context) { + return beginDeleteAsync(resourceGroupName, environmentName, privateEndpointConnectionName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String environmentName, String privateEndpointConnectionName) { + deleteAsync(resourceGroupName, environmentName, privateEndpointConnectionName).block(); + } + + /** + * Delete a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String environmentName, String privateEndpointConnectionName, + Context context) { + deleteAsync(resourceGroupName, environmentName, privateEndpointConnectionName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified resource along with + * {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified resource 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/ManagedEnvironmentPrivateEndpointConnectionsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateEndpointConnectionsImpl.java new file mode 100644 index 000000000000..225993918b6c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateEndpointConnectionsImpl.java @@ -0,0 +1,169 @@ +// 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.ManagedEnvironmentPrivateEndpointConnectionsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPrivateEndpointConnections; +import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnection; + +public final class ManagedEnvironmentPrivateEndpointConnectionsImpl + implements ManagedEnvironmentPrivateEndpointConnections { + private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentPrivateEndpointConnectionsImpl.class); + + private final ManagedEnvironmentPrivateEndpointConnectionsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public ManagedEnvironmentPrivateEndpointConnectionsImpl( + ManagedEnvironmentPrivateEndpointConnectionsClient 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 ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String environmentName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, environmentName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateEndpointConnectionImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String environmentName, + String privateEndpointConnectionName, Context context) { + Response inner = this.serviceClient() + .getWithResponse(resourceGroupName, environmentName, privateEndpointConnectionName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new PrivateEndpointConnectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PrivateEndpointConnection get(String resourceGroupName, String environmentName, + String privateEndpointConnectionName) { + PrivateEndpointConnectionInner inner + = this.serviceClient().get(resourceGroupName, environmentName, privateEndpointConnectionName); + if (inner != null) { + return new PrivateEndpointConnectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String environmentName, String privateEndpointConnectionName) { + this.serviceClient().delete(resourceGroupName, environmentName, privateEndpointConnectionName); + } + + public void delete(String resourceGroupName, String environmentName, String privateEndpointConnectionName, + Context context) { + this.serviceClient().delete(resourceGroupName, environmentName, privateEndpointConnectionName, context); + } + + public PrivateEndpointConnection getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); + } + return this.getWithResponse(resourceGroupName, environmentName, privateEndpointConnectionName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); + } + return this.getWithResponse(resourceGroupName, environmentName, privateEndpointConnectionName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); + } + this.delete(resourceGroupName, environmentName, privateEndpointConnectionName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(id, "privateEndpointConnections"); + if (privateEndpointConnectionName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException(String + .format("The resource ID '%s' is not valid. Missing path segment 'privateEndpointConnections'.", id))); + } + this.delete(resourceGroupName, environmentName, privateEndpointConnectionName, context); + } + + private ManagedEnvironmentPrivateEndpointConnectionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + public PrivateEndpointConnectionImpl define(String name) { + return new PrivateEndpointConnectionImpl(name, this.manager()); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateLinkResourcesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateLinkResourcesClientImpl.java new file mode 100644 index 000000000000..49a5690ac13c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateLinkResourcesClientImpl.java @@ -0,0 +1,287 @@ +// 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.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentPrivateLinkResourcesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.appcontainers.models.PrivateLinkResourceListResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in + * ManagedEnvironmentPrivateLinkResourcesClient. + */ +public final class ManagedEnvironmentPrivateLinkResourcesClientImpl + implements ManagedEnvironmentPrivateLinkResourcesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ManagedEnvironmentPrivateLinkResourcesService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of ManagedEnvironmentPrivateLinkResourcesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ManagedEnvironmentPrivateLinkResourcesClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(ManagedEnvironmentPrivateLinkResourcesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientManagedEnvironmentPrivateLinkResources to be + * used by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface ManagedEnvironmentPrivateLinkResourcesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/privateLinkResources") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.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(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List private link resources for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources 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())); + } + + /** + * List private link resources for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources 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)); + } + + /** + * List private link resources for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources 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)); + } + + /** + * List private link resources for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources 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)); + } + + /** + * List private link resources for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String environmentName) { + return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); + } + + /** + * List private link resources for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources 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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources 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/ManagedEnvironmentPrivateLinkResourcesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateLinkResourcesImpl.java new file mode 100644 index 000000000000..34a753a0e7d7 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateLinkResourcesImpl.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.ManagedEnvironmentPrivateLinkResourcesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.PrivateLinkResourceInner; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPrivateLinkResources; +import com.azure.resourcemanager.appcontainers.models.PrivateLinkResource; + +public final class ManagedEnvironmentPrivateLinkResourcesImpl implements ManagedEnvironmentPrivateLinkResources { + private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentPrivateLinkResourcesImpl.class); + + private final ManagedEnvironmentPrivateLinkResourcesClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public ManagedEnvironmentPrivateLinkResourcesImpl(ManagedEnvironmentPrivateLinkResourcesClient 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 ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String environmentName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, environmentName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new PrivateLinkResourceImpl(inner1, this.manager())); + } + + private ManagedEnvironmentPrivateLinkResourcesClient 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/ManagedEnvironmentStorageImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStorageImpl.java index fb765ed16d53..79142fceb10b 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 @@ -62,13 +62,17 @@ public ManagedEnvironmentStorageImpl withExistingManagedEnvironment(String resou } public ManagedEnvironmentStorage create() { - this.innerObject = serviceManager.serviceClient().getManagedEnvironmentsStorages().createOrUpdateWithResponse( - resourceGroupName, environmentName, storageName, this.innerModel(), Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getManagedEnvironmentsStorages() + .createOrUpdateWithResponse(resourceGroupName, environmentName, storageName, this.innerModel(), + Context.NONE) + .getValue(); return this; } public ManagedEnvironmentStorage create(Context context) { - this.innerObject = serviceManager.serviceClient().getManagedEnvironmentsStorages() + this.innerObject = serviceManager.serviceClient() + .getManagedEnvironmentsStorages() .createOrUpdateWithResponse(resourceGroupName, environmentName, storageName, this.innerModel(), context) .getValue(); return this; @@ -86,13 +90,17 @@ public ManagedEnvironmentStorageImpl update() { } public ManagedEnvironmentStorage apply() { - this.innerObject = serviceManager.serviceClient().getManagedEnvironmentsStorages().createOrUpdateWithResponse( - resourceGroupName, environmentName, storageName, this.innerModel(), Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getManagedEnvironmentsStorages() + .createOrUpdateWithResponse(resourceGroupName, environmentName, storageName, this.innerModel(), + Context.NONE) + .getValue(); return this; } public ManagedEnvironmentStorage apply(Context context) { - this.innerObject = serviceManager.serviceClient().getManagedEnvironmentsStorages() + this.innerObject = serviceManager.serviceClient() + .getManagedEnvironmentsStorages() .createOrUpdateWithResponse(resourceGroupName, environmentName, storageName, this.innerModel(), context) .getValue(); return this; @@ -108,14 +116,18 @@ public ManagedEnvironmentStorage apply(Context context) { } public ManagedEnvironmentStorage refresh() { - this.innerObject = serviceManager.serviceClient().getManagedEnvironmentsStorages() - .getWithResponse(resourceGroupName, environmentName, storageName, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getManagedEnvironmentsStorages() + .getWithResponse(resourceGroupName, environmentName, storageName, Context.NONE) + .getValue(); return this; } public ManagedEnvironmentStorage refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getManagedEnvironmentsStorages() - .getWithResponse(resourceGroupName, environmentName, storageName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getManagedEnvironmentsStorages() + .getWithResponse(resourceGroupName, environmentName, storageName, context) + .getValue(); return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStoragesCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStoragesCollectionImpl.java index 4a37a11ebfed..b277fae73421 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStoragesCollectionImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStoragesCollectionImpl.java @@ -27,7 +27,8 @@ public List value() { List inner = this.innerModel().value(); if (inner != null) { return Collections.unmodifiableList(inner.stream() - .map(inner1 -> new ManagedEnvironmentStorageImpl(inner1, this.manager())).collect(Collectors.toList())); + .map(inner1 -> new ManagedEnvironmentStorageImpl(inner1, this.manager())) + .collect(Collectors.toList())); } else { return Collections.emptyList(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesImpl.java index 0912a5938a1b..94436fc275f4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesImpl.java @@ -11,9 +11,9 @@ import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsStoragesClient; import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner; import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsStorages; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorage; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStoragesCollection; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsStorages; public final class ManagedEnvironmentsStoragesImpl implements ManagedEnvironmentsStorages { private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentsStoragesImpl.class); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesImpl.java index 91183b68a218..46629bb05737 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesImpl.java @@ -29,8 +29,9 @@ public NamespacesImpl(NamespacesClient innerClient, public Response checkNameAvailabilityWithResponse(String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context) { - Response inner = this.serviceClient().checkNameAvailabilityWithResponse( - resourceGroupName, environmentName, checkNameAvailabilityRequest, context); + Response inner = this.serviceClient() + .checkNameAvailabilityWithResponse(resourceGroupName, environmentName, checkNameAvailabilityRequest, + context); if (inner != null) { return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CheckNameAvailabilityResponseImpl(inner.getValue(), this.manager())); @@ -41,8 +42,8 @@ public Response checkNameAvailabilityWithResponse public CheckNameAvailabilityResponse checkNameAvailability(String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - CheckNameAvailabilityResponseInner inner = this.serviceClient().checkNameAvailability(resourceGroupName, - environmentName, checkNameAvailabilityRequest); + CheckNameAvailabilityResponseInner inner = this.serviceClient() + .checkNameAvailability(resourceGroupName, environmentName, checkNameAvailabilityRequest); if (inner != null) { return new CheckNameAvailabilityResponseImpl(inner, this.manager()); } else { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PrivateEndpointConnectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PrivateEndpointConnectionImpl.java new file mode 100644 index 000000000000..0f307d007854 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PrivateEndpointConnectionImpl.java @@ -0,0 +1,164 @@ +// 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.PrivateEndpointConnectionInner; +import com.azure.resourcemanager.appcontainers.models.PrivateEndpoint; +import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnection; +import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnectionProvisioningState; +import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; +import java.util.Collections; +import java.util.List; + +public final class PrivateEndpointConnectionImpl + implements PrivateEndpointConnection, PrivateEndpointConnection.Definition, PrivateEndpointConnection.Update { + private PrivateEndpointConnectionInner 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 List groupIds() { + List inner = this.innerModel().groupIds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PrivateEndpoint privateEndpoint() { + return this.innerModel().privateEndpoint(); + } + + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.innerModel().privateLinkServiceConnectionState(); + } + + public PrivateEndpointConnectionProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public PrivateEndpointConnectionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String environmentName; + + private String privateEndpointConnectionName; + + public PrivateEndpointConnectionImpl withExistingManagedEnvironment(String resourceGroupName, + String environmentName) { + this.resourceGroupName = resourceGroupName; + this.environmentName = environmentName; + return this; + } + + public PrivateEndpointConnection create() { + this.innerObject = serviceManager.serviceClient() + .getManagedEnvironmentPrivateEndpointConnections() + .createOrUpdate(resourceGroupName, environmentName, privateEndpointConnectionName, this.innerModel(), + Context.NONE); + return this; + } + + public PrivateEndpointConnection create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getManagedEnvironmentPrivateEndpointConnections() + .createOrUpdate(resourceGroupName, environmentName, privateEndpointConnectionName, this.innerModel(), + context); + return this; + } + + PrivateEndpointConnectionImpl(String name, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = new PrivateEndpointConnectionInner(); + this.serviceManager = serviceManager; + this.privateEndpointConnectionName = name; + } + + public PrivateEndpointConnectionImpl update() { + return this; + } + + public PrivateEndpointConnection apply() { + this.innerObject = serviceManager.serviceClient() + .getManagedEnvironmentPrivateEndpointConnections() + .createOrUpdate(resourceGroupName, environmentName, privateEndpointConnectionName, this.innerModel(), + Context.NONE); + return this; + } + + public PrivateEndpointConnection apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getManagedEnvironmentPrivateEndpointConnections() + .createOrUpdate(resourceGroupName, environmentName, privateEndpointConnectionName, this.innerModel(), + context); + return this; + } + + PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.environmentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); + this.privateEndpointConnectionName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "privateEndpointConnections"); + } + + public PrivateEndpointConnection refresh() { + this.innerObject = serviceManager.serviceClient() + .getManagedEnvironmentPrivateEndpointConnections() + .getWithResponse(resourceGroupName, environmentName, privateEndpointConnectionName, Context.NONE) + .getValue(); + return this; + } + + public PrivateEndpointConnection refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getManagedEnvironmentPrivateEndpointConnections() + .getWithResponse(resourceGroupName, environmentName, privateEndpointConnectionName, context) + .getValue(); + return this; + } + + public PrivateEndpointConnectionImpl withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.innerModel().withPrivateEndpoint(privateEndpoint); + return this; + } + + public PrivateEndpointConnectionImpl + withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.innerModel().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + return this; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PrivateLinkResourceImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PrivateLinkResourceImpl.java new file mode 100644 index 000000000000..29bb3c4ededb --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PrivateLinkResourceImpl.java @@ -0,0 +1,69 @@ +// 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.PrivateLinkResourceInner; +import com.azure.resourcemanager.appcontainers.models.PrivateLinkResource; +import java.util.Collections; +import java.util.List; + +public final class PrivateLinkResourceImpl implements PrivateLinkResource { + private PrivateLinkResourceInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + PrivateLinkResourceImpl(PrivateLinkResourceInner 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 SystemData systemData() { + return this.innerModel().systemData(); + } + + public String groupId() { + return this.innerModel().groupId(); + } + + public List requiredMembers() { + List inner = this.innerModel().requiredMembers(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List requiredZoneNames() { + List inner = this.innerModel().requiredZoneNames(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public PrivateLinkResourceInner 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/ResourceManagerUtils.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceManagerUtils.java index 94a651ce19fa..0a2ed7b73eef 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceManagerUtils.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceManagerUtils.java @@ -41,7 +41,6 @@ static String getValueFromIdByName(String id, String name) { } } return null; - } static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { @@ -75,7 +74,6 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } } return null; - } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SessionPoolImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SessionPoolImpl.java new file mode 100644 index 000000000000..785324b4c9f8 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SessionPoolImpl.java @@ -0,0 +1,285 @@ +// 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.SessionPoolInner; +import com.azure.resourcemanager.appcontainers.models.ContainerType; +import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; +import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; +import com.azure.resourcemanager.appcontainers.models.PoolManagementType; +import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; +import com.azure.resourcemanager.appcontainers.models.SecretAutoGenerated; +import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; +import com.azure.resourcemanager.appcontainers.models.SessionPool; +import com.azure.resourcemanager.appcontainers.models.SessionPoolProvisioningState; +import com.azure.resourcemanager.appcontainers.models.SessionPoolUpdatableProperties; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class SessionPoolImpl implements SessionPool, SessionPool.Definition, SessionPool.Update { + private SessionPoolInner 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 SystemData systemData() { + return this.innerModel().systemData(); + } + + public String environmentId() { + return this.innerModel().environmentId(); + } + + public ContainerType containerType() { + return this.innerModel().containerType(); + } + + public PoolManagementType poolManagementType() { + return this.innerModel().poolManagementType(); + } + + public Integer nodeCount() { + return this.innerModel().nodeCount(); + } + + public ScaleConfiguration scaleConfiguration() { + return this.innerModel().scaleConfiguration(); + } + + public List secrets() { + List inner = this.innerModel().secrets(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public DynamicPoolConfiguration dynamicPoolConfiguration() { + return this.innerModel().dynamicPoolConfiguration(); + } + + public CustomContainerTemplate customContainerTemplate() { + return this.innerModel().customContainerTemplate(); + } + + public SessionNetworkConfiguration sessionNetworkConfiguration() { + return this.innerModel().sessionNetworkConfiguration(); + } + + public String poolManagementEndpoint() { + return this.innerModel().poolManagementEndpoint(); + } + + public SessionPoolProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public SessionPoolInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String sessionPoolName; + + private SessionPoolUpdatableProperties updateSessionPoolEnvelope; + + public SessionPoolImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public SessionPool create() { + this.innerObject = serviceManager.serviceClient() + .getContainerAppsSessionPools() + .createOrUpdate(resourceGroupName, sessionPoolName, this.innerModel(), Context.NONE); + return this; + } + + public SessionPool create(Context context) { + this.innerObject = serviceManager.serviceClient() + .getContainerAppsSessionPools() + .createOrUpdate(resourceGroupName, sessionPoolName, this.innerModel(), context); + return this; + } + + SessionPoolImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = new SessionPoolInner(); + this.serviceManager = serviceManager; + this.sessionPoolName = name; + } + + public SessionPoolImpl update() { + this.updateSessionPoolEnvelope = new SessionPoolUpdatableProperties(); + return this; + } + + public SessionPool apply() { + this.innerObject = serviceManager.serviceClient() + .getContainerAppsSessionPools() + .update(resourceGroupName, sessionPoolName, updateSessionPoolEnvelope, Context.NONE); + return this; + } + + public SessionPool apply(Context context) { + this.innerObject = serviceManager.serviceClient() + .getContainerAppsSessionPools() + .update(resourceGroupName, sessionPoolName, updateSessionPoolEnvelope, context); + return this; + } + + SessionPoolImpl(SessionPoolInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.sessionPoolName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "sessionPools"); + } + + public SessionPool refresh() { + this.innerObject = serviceManager.serviceClient() + .getContainerAppsSessionPools() + .getByResourceGroupWithResponse(resourceGroupName, sessionPoolName, Context.NONE) + .getValue(); + return this; + } + + public SessionPool refresh(Context context) { + this.innerObject = serviceManager.serviceClient() + .getContainerAppsSessionPools() + .getByResourceGroupWithResponse(resourceGroupName, sessionPoolName, context) + .getValue(); + return this; + } + + public SessionPoolImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public SessionPoolImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public SessionPoolImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public SessionPoolImpl withEnvironmentId(String environmentId) { + this.innerModel().withEnvironmentId(environmentId); + return this; + } + + public SessionPoolImpl withContainerType(ContainerType containerType) { + this.innerModel().withContainerType(containerType); + return this; + } + + public SessionPoolImpl withPoolManagementType(PoolManagementType poolManagementType) { + this.innerModel().withPoolManagementType(poolManagementType); + return this; + } + + public SessionPoolImpl withScaleConfiguration(ScaleConfiguration scaleConfiguration) { + if (isInCreateMode()) { + this.innerModel().withScaleConfiguration(scaleConfiguration); + return this; + } else { + this.updateSessionPoolEnvelope.withScaleConfiguration(scaleConfiguration); + return this; + } + } + + public SessionPoolImpl withSecrets(List secrets) { + if (isInCreateMode()) { + this.innerModel().withSecrets(secrets); + return this; + } else { + this.updateSessionPoolEnvelope.withSecrets(secrets); + return this; + } + } + + public SessionPoolImpl withDynamicPoolConfiguration(DynamicPoolConfiguration dynamicPoolConfiguration) { + if (isInCreateMode()) { + this.innerModel().withDynamicPoolConfiguration(dynamicPoolConfiguration); + return this; + } else { + this.updateSessionPoolEnvelope.withDynamicPoolConfiguration(dynamicPoolConfiguration); + return this; + } + } + + public SessionPoolImpl withCustomContainerTemplate(CustomContainerTemplate customContainerTemplate) { + if (isInCreateMode()) { + this.innerModel().withCustomContainerTemplate(customContainerTemplate); + return this; + } else { + this.updateSessionPoolEnvelope.withCustomContainerTemplate(customContainerTemplate); + return this; + } + } + + public SessionPoolImpl withSessionNetworkConfiguration(SessionNetworkConfiguration sessionNetworkConfiguration) { + if (isInCreateMode()) { + this.innerModel().withSessionNetworkConfiguration(sessionNetworkConfiguration); + return this; + } else { + this.updateSessionPoolEnvelope.withSessionNetworkConfiguration(sessionNetworkConfiguration); + 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/SourceControlImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SourceControlImpl.java index 432fbc9bdb43..49070a189996 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 @@ -73,13 +73,15 @@ public SourceControlImpl withExistingContainerApp(String resourceGroupName, Stri } public SourceControl create() { - this.innerObject = serviceManager.serviceClient().getContainerAppsSourceControls() + this.innerObject = serviceManager.serviceClient() + .getContainerAppsSourceControls() .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), Context.NONE); return this; } public SourceControl create(Context context) { - this.innerObject = serviceManager.serviceClient().getContainerAppsSourceControls() + this.innerObject = serviceManager.serviceClient() + .getContainerAppsSourceControls() .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), context); return this; } @@ -95,13 +97,15 @@ public SourceControlImpl update() { } public SourceControl apply() { - this.innerObject = serviceManager.serviceClient().getContainerAppsSourceControls() + this.innerObject = serviceManager.serviceClient() + .getContainerAppsSourceControls() .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), Context.NONE); return this; } public SourceControl apply(Context context) { - this.innerObject = serviceManager.serviceClient().getContainerAppsSourceControls() + this.innerObject = serviceManager.serviceClient() + .getContainerAppsSourceControls() .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), context); return this; } @@ -116,14 +120,18 @@ public SourceControl apply(Context context) { } public SourceControl refresh() { - this.innerObject = serviceManager.serviceClient().getContainerAppsSourceControls() - .getWithResponse(resourceGroupName, containerAppName, sourceControlName, Context.NONE).getValue(); + this.innerObject = serviceManager.serviceClient() + .getContainerAppsSourceControls() + .getWithResponse(resourceGroupName, containerAppName, sourceControlName, Context.NONE) + .getValue(); return this; } public SourceControl refresh(Context context) { - this.innerObject = serviceManager.serviceClient().getContainerAppsSourceControls() - .getWithResponse(resourceGroupName, containerAppName, sourceControlName, context).getValue(); + this.innerObject = serviceManager.serviceClient() + .getContainerAppsSourceControls() + .getWithResponse(resourceGroupName, containerAppName, sourceControlName, context) + .getValue(); return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java index 4afb39fb5652..d5c81f00f20c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java @@ -4,6 +4,8 @@ /** * Package containing the implementations for ContainerAppsApiClient. - * null. + * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the + * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions + * extension resource. */ package com.azure.resourcemanager.appcontainers.implementation; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencyCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencyCollection.java index 89441a8d33bb..c7f67dbfbe31 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencyCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencyCollection.java @@ -69,8 +69,8 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model AppResiliencyCollection")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model AppResiliencyCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Apple.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Apple.java index 9d31e6c18518..a373794bebeb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Apple.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Apple.java @@ -13,8 +13,7 @@ @Fluent public final class Apple { /* - * false if the Apple provider should not be enabled despite the set registration; otherwise, - * true. + * false if the Apple provider should not be enabled despite the set registration; otherwise, true. */ @JsonProperty(value = "enabled") private Boolean enabled; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfigCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfigCollection.java index cb6e133045e8..889353010d7b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfigCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfigCollection.java @@ -69,8 +69,8 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model AuthConfigCollection")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model AuthConfigCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthPlatform.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthPlatform.java index 0c477b52f3a7..886068d269f2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthPlatform.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthPlatform.java @@ -13,16 +13,14 @@ @Fluent public final class AuthPlatform { /* - * true if the Authentication / Authorization feature is enabled for the current app; otherwise, - * false. + * true if the Authentication / Authorization feature is enabled for the current app; otherwise, false. */ @JsonProperty(value = "enabled") private Boolean enabled; /* * The RuntimeVersion of the Authentication / Authorization feature in use for the current app. - * The setting in this value can control the behavior of certain features in the Authentication / Authorization - * module. + * The setting in this value can control the behavior of certain features in the Authentication / Authorization module. */ @JsonProperty(value = "runtimeVersion") private String runtimeVersion; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfilesCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfilesCollection.java index 78d73b05d570..523bfef981a8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfilesCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfilesCollection.java @@ -69,8 +69,9 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property value in model AvailableWorkloadProfilesCollection")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model AvailableWorkloadProfilesCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectory.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectory.java index 4f9eaadb5f71..7ecc8645ef66 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectory.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectory.java @@ -13,8 +13,7 @@ @Fluent public final class AzureActiveDirectory { /* - * false if the Azure Active Directory provider should not be enabled despite the set registration; - * otherwise, true. + * false if the Azure Active Directory provider should not be enabled despite the set registration; otherwise, true. */ @JsonProperty(value = "enabled") private Boolean enabled; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryLogin.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryLogin.java index 89bc07ad1216..4805aa0c717d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryLogin.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryLogin.java @@ -21,8 +21,7 @@ public final class AzureActiveDirectoryLogin { private List loginParameters; /* - * true if the www-authenticate provider should be omitted from the request; otherwise, - * false. + * true if the www-authenticate provider should be omitted from the request; otherwise, false. */ @JsonProperty(value = "disableWWWAuthenticate") private Boolean disableWwwAuthenticate; @@ -56,8 +55,8 @@ public AzureActiveDirectoryLogin withLoginParameters(List loginParameter } /** - * Get the disableWwwAuthenticate property: <code>true</code> if the www-authenticate provider should - * be omitted from the request; otherwise, <code>false</code>. + * Get the disableWwwAuthenticate property: <code>true</code> if the www-authenticate provider should be + * omitted from the request; otherwise, <code>false</code>. * * @return the disableWwwAuthenticate value. */ @@ -66,8 +65,8 @@ public Boolean disableWwwAuthenticate() { } /** - * Set the disableWwwAuthenticate property: <code>true</code> if the www-authenticate provider should - * be omitted from the request; otherwise, <code>false</code>. + * Set the disableWwwAuthenticate property: <code>true</code> if the www-authenticate provider should be + * omitted from the request; otherwise, <code>false</code>. * * @param disableWwwAuthenticate the disableWwwAuthenticate value to set. * @return the AzureActiveDirectoryLogin object itself. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryRegistration.java index 12c0102dc6d8..41d046097e58 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryRegistration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryRegistration.java @@ -14,8 +14,7 @@ public final class AzureActiveDirectoryRegistration { /* * The OpenID Connect Issuer URI that represents the entity which issues access tokens for this application. - * When using Azure Active Directory, this value is the URI of the directory tenant, e.g. - * https://login.microsoftonline.com/v2.0/{tenant-guid}/. + * When using Azure Active Directory, this value is the URI of the directory tenant, e.g. https://login.microsoftonline.com/v2.0/{tenant-guid}/. * This URI is a case-sensitive identifier for the token issuer. * More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html */ @@ -24,7 +23,7 @@ public final class AzureActiveDirectoryRegistration { /* * The Client ID of this relying party application, known as the client_id. - * This setting is required for enabling OpenID Connection authentication with Azure Active Directory or + * This setting is required for enabling OpenID Connection authentication with Azure Active Directory or * other 3rd party OpenID Connect providers. * More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html */ @@ -38,24 +37,21 @@ public final class AzureActiveDirectoryRegistration { private String clientSecretSettingName; /* - * An alternative to the client secret, that is the thumbprint of a certificate used for signing purposes. This - * property acts as + * An alternative to the client secret, that is the thumbprint of a certificate used for signing purposes. This property acts as * a replacement for the Client Secret. It is also optional. */ @JsonProperty(value = "clientSecretCertificateThumbprint") private String clientSecretCertificateThumbprint; /* - * An alternative to the client secret thumbprint, that is the subject alternative name of a certificate used for - * signing purposes. This property acts as + * An alternative to the client secret thumbprint, that is the subject alternative name of a certificate used for signing purposes. This property acts as * a replacement for the Client Secret Certificate Thumbprint. It is also optional. */ @JsonProperty(value = "clientSecretCertificateSubjectAlternativeName") private String clientSecretCertificateSubjectAlternativeName; /* - * An alternative to the client secret thumbprint, that is the issuer of a certificate used for signing purposes. - * This property acts as + * An alternative to the client secret thumbprint, that is the issuer of a certificate used for signing purposes. This property acts as * a replacement for the Client Secret Certificate Thumbprint. It is also optional. */ @JsonProperty(value = "clientSecretCertificateIssuer") diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebApps.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebApps.java index 42132f4fac68..79491e1e8287 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebApps.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebApps.java @@ -13,8 +13,7 @@ @Fluent public final class AzureStaticWebApps { /* - * false if the Azure Static Web Apps provider should not be enabled despite the set registration; - * otherwise, true. + * false if the Azure Static Web Apps provider should not be enabled despite the set registration; otherwise, true. */ @JsonProperty(value = "enabled") private Boolean enabled; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java index 541432d9b2af..3a6dde4fa18f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java @@ -19,6 +19,12 @@ public class BaseContainer { @JsonProperty(value = "image") private String image; + /* + * The type of the image. Set to CloudBuild to let the system manages the image, where user will not be able to update image through image field. Set to ContainerImage for user provided image. + */ + @JsonProperty(value = "imageType") + private ImageType imageType; + /* * Custom container name. */ @@ -81,6 +87,28 @@ public BaseContainer withImage(String image) { return this; } + /** + * Get the imageType property: The type of the image. Set to CloudBuild to let the system manages the image, where + * user will not be able to update image through image field. Set to ContainerImage for user provided image. + * + * @return the imageType value. + */ + public ImageType imageType() { + return this.imageType; + } + + /** + * Set the imageType property: The type of the image. Set to CloudBuild to let the system manages the image, where + * user will not be able to update image through image field. Set to ContainerImage for user provided image. + * + * @param imageType the imageType value to set. + * @return the BaseContainer object itself. + */ + public BaseContainer withImageType(ImageType imageType) { + this.imageType = imageType; + return this; + } + /** * Get the name property: Custom container name. * 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 index ff9b6b4d46bc..974ded6ff74d 100644 --- 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 @@ -54,8 +54,9 @@ public BlobStorageTokenStore withSasUrlSettingName(String sasUrlSettingName) { */ public void validate() { if (sasUrlSettingName() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property sasUrlSettingName in model BlobStorageTokenStore")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property sasUrlSettingName in model BlobStorageTokenStore")); } } 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 index bb7e4f45c623..ede62fd64c53 100644 --- 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 @@ -80,8 +80,8 @@ public BuildCollection withNextLink(String nextLink) { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model BuildCollection")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model BuildCollection")); } else { value().forEach(e -> e.validate()); } 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 index f82e7ac7e8b6..c1a2e7209a76 100644 --- 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 @@ -80,8 +80,8 @@ public BuilderCollection withNextLink(String nextLink) { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model BuilderCollection")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model BuilderCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateCollection.java index 4b2427f101cc..d11844282f81 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateCollection.java @@ -69,8 +69,8 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model CertificateCollection")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model CertificateCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateKeyVaultProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateKeyVaultProperties.java index 77c3a421c24d..eb1fd6232069 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateKeyVaultProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateKeyVaultProperties.java @@ -13,8 +13,7 @@ @Fluent public final class CertificateKeyVaultProperties { /* - * Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned - * identity. + * Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned identity. */ @JsonProperty(value = "identity") private String identity; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CircuitBreakerPolicy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CircuitBreakerPolicy.java index 15fa7600e32b..d2f1e2194343 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CircuitBreakerPolicy.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CircuitBreakerPolicy.java @@ -19,8 +19,7 @@ public final class CircuitBreakerPolicy { private Integer consecutiveErrors; /* - * The time interval, in seconds, between endpoint checks. This can result in opening the circuit breaker if the - * check fails as well as closing the circuit breaker if the check succeeds. Defaults to 10s. + * The time interval, in seconds, between endpoint checks. This can result in opening the circuit breaker if the check fails as well as closing the circuit breaker if the check succeeds. Defaults to 10s. */ @JsonProperty(value = "intervalInSeconds") private Integer intervalInSeconds; @@ -82,8 +81,8 @@ public CircuitBreakerPolicy withIntervalInSeconds(Integer intervalInSeconds) { } /** - * Get the maxEjectionPercent property: Maximum percentage of hosts that will be ejected after failure threshold - * has been met. + * Get the maxEjectionPercent property: Maximum percentage of hosts that will be ejected after failure threshold has + * been met. * * @return the maxEjectionPercent value. */ @@ -92,8 +91,8 @@ public Integer maxEjectionPercent() { } /** - * Set the maxEjectionPercent property: Maximum percentage of hosts that will be ejected after failure threshold - * has been met. + * Set the maxEjectionPercent property: Maximum percentage of hosts that will be ejected after failure threshold has + * been met. * * @param maxEjectionPercent the maxEjectionPercent value to set. * @return the CircuitBreakerPolicy object itself. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Configuration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Configuration.java index 82755893d112..3f274fefeb5c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Configuration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Configuration.java @@ -21,8 +21,7 @@ public final class Configuration { /* * ActiveRevisionsMode controls how active revisions are handled for the Container app: - * Multiple: multiple revisions can be active.Single: Only one revision can be active at a - * time. Revision weights can not be used in this mode. If no value if provided, this is the default. + * Multiple: multiple revisions can be active.Single: Only one revision can be active at a time. Revision weights can not be used in this mode. If no value if provided, this is the default. */ @JsonProperty(value = "activeRevisionsMode") private ActiveRevisionsMode activeRevisionsMode; @@ -45,6 +44,12 @@ public final class Configuration { @JsonProperty(value = "dapr") private Dapr dapr; + /* + * App runtime configuration for the Container App. + */ + @JsonProperty(value = "runtime") + private Runtime runtime; + /* * Optional. Max inactive revisions a Container App can have. */ @@ -57,6 +62,12 @@ public final class Configuration { @JsonProperty(value = "service") private Service service; + /* + * Optional settings for Managed Identities that are assigned to the Container App. If a Managed Identity is not specified here, default settings will be used. + */ + @JsonProperty(value = "identitySettings") + private List identitySettings; + /** * Creates an instance of Configuration class. */ @@ -87,8 +98,8 @@ public Configuration withSecrets(List secrets) { * Get the activeRevisionsMode property: ActiveRevisionsMode controls how active revisions are handled for the * Container app: * <list><item>Multiple: multiple revisions can be active.</item><item>Single: Only one - * revision can be active at a time. Revision weights can not be used in this mode. If no value if provided, this - * is the default.</item></list>. + * revision can be active at a time. Revision weights can not be used in this mode. If no value if provided, this is + * the default.</item></list>. * * @return the activeRevisionsMode value. */ @@ -100,8 +111,8 @@ public ActiveRevisionsMode activeRevisionsMode() { * Set the activeRevisionsMode property: ActiveRevisionsMode controls how active revisions are handled for the * Container app: * <list><item>Multiple: multiple revisions can be active.</item><item>Single: Only one - * revision can be active at a time. Revision weights can not be used in this mode. If no value if provided, this - * is the default.</item></list>. + * revision can be active at a time. Revision weights can not be used in this mode. If no value if provided, this is + * the default.</item></list>. * * @param activeRevisionsMode the activeRevisionsMode value to set. * @return the Configuration object itself. @@ -173,6 +184,26 @@ public Configuration withDapr(Dapr dapr) { return this; } + /** + * Get the runtime property: App runtime configuration for the Container App. + * + * @return the runtime value. + */ + public Runtime runtime() { + return this.runtime; + } + + /** + * Set the runtime property: App runtime configuration for the Container App. + * + * @param runtime the runtime value to set. + * @return the Configuration object itself. + */ + public Configuration withRuntime(Runtime runtime) { + this.runtime = runtime; + return this; + } + /** * Get the maxInactiveRevisions property: Optional. Max inactive revisions a Container App can have. * @@ -213,6 +244,28 @@ public Configuration withService(Service service) { return this; } + /** + * Get the identitySettings property: Optional settings for Managed Identities that are assigned to the Container + * App. If a Managed Identity is not specified here, default settings will be used. + * + * @return the identitySettings value. + */ + public List identitySettings() { + return this.identitySettings; + } + + /** + * Set the identitySettings property: Optional settings for Managed Identities that are assigned to the Container + * App. If a Managed Identity is not specified here, default settings will be used. + * + * @param identitySettings the identitySettings value to set. + * @return the Configuration object itself. + */ + public Configuration withIdentitySettings(List identitySettings) { + this.identitySettings = identitySettings; + return this; + } + /** * Validates the instance. * @@ -231,8 +284,14 @@ public void validate() { if (dapr() != null) { dapr().validate(); } + if (runtime() != null) { + runtime().validate(); + } if (service() != null) { service().validate(); } + if (identitySettings() != null) { + identitySettings().forEach(e -> e.validate()); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java index b1f4d676514c..d358415039ae 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java @@ -54,6 +54,15 @@ public Container withImage(String image) { return this; } + /** + * {@inheritDoc} + */ + @Override + public Container withImageType(ImageType imageType) { + super.withImageType(imageType); + return this; + } + /** * {@inheritDoc} */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java index 45488a9f26c9..66b389c0a112 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java @@ -75,6 +75,15 @@ public interface ContainerApp { */ String managedBy(); + /** + * Gets the kind property: Metadata used to render different experiences for resources of the same type; e.g. + * WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider must validate and + * persist this value. + * + * @return the kind value. + */ + Kind kind(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -110,6 +119,13 @@ public interface ContainerApp { */ String workloadProfileName(); + /** + * Gets the patchingConfiguration property: Container App auto patch configuration. + * + * @return the patchingConfiguration value. + */ + ContainerAppPropertiesPatchingConfiguration patchingConfiguration(); + /** * Gets the latestRevisionName property: Name of the latest revision of the Container App. * @@ -250,8 +266,9 @@ interface WithResourceGroup { * to be created, but also allows for any other optional properties to be specified. */ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithExtendedLocation, - DefinitionStages.WithIdentity, DefinitionStages.WithManagedBy, DefinitionStages.WithManagedEnvironmentId, - DefinitionStages.WithEnvironmentId, DefinitionStages.WithWorkloadProfileName, + DefinitionStages.WithIdentity, DefinitionStages.WithManagedBy, DefinitionStages.WithKind, + DefinitionStages.WithManagedEnvironmentId, DefinitionStages.WithEnvironmentId, + DefinitionStages.WithWorkloadProfileName, DefinitionStages.WithPatchingConfiguration, DefinitionStages.WithConfiguration, DefinitionStages.WithTemplate { /** * Executes the create request. @@ -328,6 +345,23 @@ interface WithManagedBy { WithCreate withManagedBy(String managedBy); } + /** + * The stage of the ContainerApp definition allowing to specify kind. + */ + interface WithKind { + /** + * Specifies the kind property: Metadata used to render different experiences for resources of the same + * type; e.g. WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider + * must validate and persist this value.. + * + * @param kind Metadata used to render different experiences for resources of the same type; e.g. + * WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider must + * validate and persist this value. + * @return the next definition stage. + */ + WithCreate withKind(Kind kind); + } + /** * The stage of the ContainerApp definition allowing to specify managedEnvironmentId. */ @@ -367,6 +401,19 @@ interface WithWorkloadProfileName { WithCreate withWorkloadProfileName(String workloadProfileName); } + /** + * The stage of the ContainerApp definition allowing to specify patchingConfiguration. + */ + interface WithPatchingConfiguration { + /** + * Specifies the patchingConfiguration property: Container App auto patch configuration.. + * + * @param patchingConfiguration Container App auto patch configuration. + * @return the next definition stage. + */ + WithCreate withPatchingConfiguration(ContainerAppPropertiesPatchingConfiguration patchingConfiguration); + } + /** * The stage of the ContainerApp definition allowing to specify configuration. */ @@ -405,8 +452,8 @@ interface WithTemplate { * The template for ContainerApp update. */ interface Update extends UpdateStages.WithTags, UpdateStages.WithExtendedLocation, UpdateStages.WithIdentity, - UpdateStages.WithManagedBy, UpdateStages.WithWorkloadProfileName, UpdateStages.WithConfiguration, - UpdateStages.WithTemplate { + UpdateStages.WithManagedBy, UpdateStages.WithWorkloadProfileName, UpdateStages.WithPatchingConfiguration, + UpdateStages.WithConfiguration, UpdateStages.WithTemplate { /** * Executes the update request. * @@ -499,6 +546,19 @@ interface WithWorkloadProfileName { Update withWorkloadProfileName(String workloadProfileName); } + /** + * The stage of the ContainerApp update allowing to specify patchingConfiguration. + */ + interface WithPatchingConfiguration { + /** + * Specifies the patchingConfiguration property: Container App auto patch configuration.. + * + * @param patchingConfiguration Container App auto patch configuration. + * @return the next definition stage. + */ + Update withPatchingConfiguration(ContainerAppPropertiesPatchingConfiguration patchingConfiguration); + } + /** * The stage of the ContainerApp update allowing to specify configuration. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppCollection.java index 5a225b40667c..c8f675f4174a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppCollection.java @@ -69,8 +69,8 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model ContainerAppCollection")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model ContainerAppCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbe.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbe.java index 907cf9dd9aae..cfc378d96533 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbe.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbe.java @@ -14,8 +14,7 @@ @Fluent public final class ContainerAppProbe { /* - * Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. - * Minimum value is 1. Maximum value is 10. + * Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. Maximum value is 10. */ @JsonProperty(value = "failureThreshold") private Integer failureThreshold; @@ -27,8 +26,7 @@ public final class ContainerAppProbe { private ContainerAppProbeHttpGet httpGet; /* - * Number of seconds after the container has started before liveness probes are initiated. Minimum value is 1. - * Maximum value is 60. + * Number of seconds after the container has started before liveness probes are initiated. Minimum value is 1. Maximum value is 60. */ @JsonProperty(value = "initialDelaySeconds") private Integer initialDelaySeconds; @@ -40,8 +38,7 @@ public final class ContainerAppProbe { private Integer periodSeconds; /* - * Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must - * be 1 for liveness and startup. Minimum value is 1. Maximum value is 10. + * Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. Maximum value is 10. */ @JsonProperty(value = "successThreshold") private Integer successThreshold; @@ -53,20 +50,13 @@ public final class ContainerAppProbe { private ContainerAppProbeTcpSocket tcpSocket; /* - * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the - * duration in seconds after the processes running in the pod are sent a termination signal and the time when the - * processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your - * process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value - * overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop - * immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling - * ProbeTerminationGracePeriod feature gate. Maximum value is 3600 seconds (1 hour) + * Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. Maximum value is 3600 seconds (1 hour) */ @JsonProperty(value = "terminationGracePeriodSeconds") private Long terminationGracePeriodSeconds; /* - * Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is - * 240. + * Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 240. */ @JsonProperty(value = "timeoutSeconds") private Integer timeoutSeconds; @@ -148,8 +138,8 @@ public ContainerAppProbe withInitialDelaySeconds(Integer initialDelaySeconds) { } /** - * Get the periodSeconds property: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum - * value is 1. Maximum value is 240. + * Get the periodSeconds property: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value + * is 1. Maximum value is 240. * * @return the periodSeconds value. */ @@ -158,8 +148,8 @@ public Integer periodSeconds() { } /** - * Set the periodSeconds property: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum - * value is 1. Maximum value is 240. + * Set the periodSeconds property: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value + * is 1. Maximum value is 240. * * @param periodSeconds the periodSeconds value to set. * @return the ContainerAppProbe object itself. @@ -213,13 +203,13 @@ public ContainerAppProbe withTcpSocket(ContainerAppProbeTcpSocket tcpSocket) { /** * Get the terminationGracePeriodSeconds property: Optional duration in seconds the pod needs to terminate - * gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the - * pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set - * this value longer than the expected cleanup time for your process. If this value is nil, the pod's + * gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod + * are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this + * value longer than the expected cleanup time for your process. If this value is nil, the pod's * terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. - * Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no - * opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature - * gate. Maximum value is 3600 seconds (1 hour). + * Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity + * to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. Maximum + * value is 3600 seconds (1 hour). * * @return the terminationGracePeriodSeconds value. */ @@ -229,13 +219,13 @@ public Long terminationGracePeriodSeconds() { /** * Set the terminationGracePeriodSeconds property: Optional duration in seconds the pod needs to terminate - * gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the - * pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set - * this value longer than the expected cleanup time for your process. If this value is nil, the pod's + * gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod + * are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this + * value longer than the expected cleanup time for your process. If this value is nil, the pod's * terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. - * Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no - * opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature - * gate. Maximum value is 3600 seconds (1 hour). + * Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity + * to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. Maximum + * value is 3600 seconds (1 hour). * * @param terminationGracePeriodSeconds the terminationGracePeriodSeconds value to set. * @return the ContainerAppProbe object itself. @@ -246,8 +236,8 @@ public ContainerAppProbe withTerminationGracePeriodSeconds(Long terminationGrace } /** - * Get the timeoutSeconds property: Number of seconds after which the probe times out. Defaults to 1 second. - * Minimum value is 1. Maximum value is 240. + * Get the timeoutSeconds property: Number of seconds after which the probe times out. Defaults to 1 second. Minimum + * value is 1. Maximum value is 240. * * @return the timeoutSeconds value. */ @@ -256,8 +246,8 @@ public Integer timeoutSeconds() { } /** - * Set the timeoutSeconds property: Number of seconds after which the probe times out. Defaults to 1 second. - * Minimum value is 1. Maximum value is 240. + * Set the timeoutSeconds property: Number of seconds after which the probe times out. Defaults to 1 second. Minimum + * value is 1. Maximum value is 240. * * @param timeoutSeconds the timeoutSeconds value to set. * @return the ContainerAppProbe object itself. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGet.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGet.java index 1de99cf72dbb..d4ebad7010b5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGet.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGet.java @@ -32,8 +32,7 @@ public final class ContainerAppProbeHttpGet { private String path; /* - * Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an - * IANA_SVC_NAME. + * Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. */ @JsonProperty(value = "port", required = true) private int port; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGetHttpHeadersItem.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGetHttpHeadersItem.java index 2c9e5d980c59..4bc2bd030835 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGetHttpHeadersItem.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGetHttpHeadersItem.java @@ -78,12 +78,14 @@ public ContainerAppProbeHttpGetHttpHeadersItem withValue(String value) { */ public void validate() { if (name() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property name in model ContainerAppProbeHttpGetHttpHeadersItem")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property name in model ContainerAppProbeHttpGetHttpHeadersItem")); } if (value() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property value in model ContainerAppProbeHttpGetHttpHeadersItem")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ContainerAppProbeHttpGetHttpHeadersItem")); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeTcpSocket.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeTcpSocket.java index 271d066feefb..48494d6c74a4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeTcpSocket.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeTcpSocket.java @@ -19,8 +19,7 @@ public final class ContainerAppProbeTcpSocket { private String host; /* - * Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an - * IANA_SVC_NAME. + * Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. */ @JsonProperty(value = "port", required = true) private int port; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppPropertiesPatchingConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppPropertiesPatchingConfiguration.java new file mode 100644 index 000000000000..47f73b3e5c62 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppPropertiesPatchingConfiguration.java @@ -0,0 +1,58 @@ +// 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; + +/** + * Container App auto patch configuration. + */ +@Fluent +public final class ContainerAppPropertiesPatchingConfiguration { + /* + * Patching mode for the container app. Null or default in this field will be interpreted as Automatic by RP. Automatic mode will automatically apply available patches. Manual mode will require the user to manually apply patches. Disabled mode will stop patch detection and auto patching. + */ + @JsonProperty(value = "patchingMode") + private PatchingMode patchingMode; + + /** + * Creates an instance of ContainerAppPropertiesPatchingConfiguration class. + */ + public ContainerAppPropertiesPatchingConfiguration() { + } + + /** + * Get the patchingMode property: Patching mode for the container app. Null or default in this field will be + * interpreted as Automatic by RP. Automatic mode will automatically apply available patches. Manual mode will + * require the user to manually apply patches. Disabled mode will stop patch detection and auto patching. + * + * @return the patchingMode value. + */ + public PatchingMode patchingMode() { + return this.patchingMode; + } + + /** + * Set the patchingMode property: Patching mode for the container app. Null or default in this field will be + * interpreted as Automatic by RP. Automatic mode will automatically apply available patches. Manual mode will + * require the user to manually apply patches. Disabled mode will stop patch detection and auto patching. + * + * @param patchingMode the patchingMode value to set. + * @return the ContainerAppPropertiesPatchingConfiguration object itself. + */ + public ContainerAppPropertiesPatchingConfiguration withPatchingMode(PatchingMode patchingMode) { + this.patchingMode = patchingMode; + 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/ContainerAppSecret.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppSecret.java index 023aaea23ec4..ba467e6b51f1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppSecret.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppSecret.java @@ -25,8 +25,7 @@ public final class ContainerAppSecret { private String value; /* - * Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned - * identity. + * Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned identity. */ @JsonProperty(value = "identity", access = JsonProperty.Access.WRITE_ONLY) private String identity; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildCollection.java new file mode 100644 index 000000000000..2db122514af5 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildCollection.java @@ -0,0 +1,92 @@ +// 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.ContainerAppsBuildResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a Container Apps Build Resource list operation. + */ +@Fluent +public final class ContainerAppsBuildCollection { + /* + * The Container Apps Build Resource 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 ContainerAppsBuildCollection class. + */ + public ContainerAppsBuildCollection() { + } + + /** + * Get the value property: The Container Apps Build Resource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The Container Apps Build Resource items on this page. + * + * @param value the value value to set. + * @return the ContainerAppsBuildCollection object itself. + */ + public ContainerAppsBuildCollection 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 ContainerAppsBuildCollection object itself. + */ + public ContainerAppsBuildCollection 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.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ContainerAppsBuildCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsBuildCollection.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildConfiguration.java new file mode 100644 index 000000000000..21f1164f6dde --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildConfiguration.java @@ -0,0 +1,111 @@ +// 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.util.List; + +/** + * Configuration of the build. + */ +@Immutable +public final class ContainerAppsBuildConfiguration { + /* + * Base OS used to build and run the app. + */ + @JsonProperty(value = "baseOs", access = JsonProperty.Access.WRITE_ONLY) + private String baseOs; + + /* + * Platform to be used to build and run the app. + */ + @JsonProperty(value = "platform", access = JsonProperty.Access.WRITE_ONLY) + private String platform; + + /* + * Platform version to be used to build and run the app. + */ + @JsonProperty(value = "platformVersion", access = JsonProperty.Access.WRITE_ONLY) + private String platformVersion; + + /* + * List of environment variables to be passed to the build, secrets should not be used in environment variable. + */ + @JsonProperty(value = "environmentVariables", access = JsonProperty.Access.WRITE_ONLY) + private List environmentVariables; + + /* + * List of steps to perform before the build. + */ + @JsonProperty(value = "preBuildSteps", access = JsonProperty.Access.WRITE_ONLY) + private List preBuildSteps; + + /** + * Creates an instance of ContainerAppsBuildConfiguration class. + */ + public ContainerAppsBuildConfiguration() { + } + + /** + * Get the baseOs property: Base OS used to build and run the app. + * + * @return the baseOs value. + */ + public String baseOs() { + return this.baseOs; + } + + /** + * Get the platform property: Platform to be used to build and run the app. + * + * @return the platform value. + */ + public String platform() { + return this.platform; + } + + /** + * 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; + } + + /** + * Get the environmentVariables property: List of environment variables to be passed to the build, secrets should + * not be used in environment variable. + * + * @return the environmentVariables value. + */ + public List environmentVariables() { + return this.environmentVariables; + } + + /** + * Get the preBuildSteps property: List of steps to perform before the build. + * + * @return the preBuildSteps value. + */ + public List preBuildSteps() { + return this.preBuildSteps; + } + + /** + * 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/ContainerAppsBuildResource.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildResource.java new file mode 100644 index 000000000000..e0a93c5e4895 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildResource.java @@ -0,0 +1,83 @@ +// 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.ContainerAppsBuildResourceInner; + +/** + * An immutable client-side representation of ContainerAppsBuildResource. + */ +public interface ContainerAppsBuildResource { + /** + * 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. + */ + ContainerAppsBuildConfiguration configuration(); + + /** + * Gets the logStreamEndpoint property: Endpoint from which the build logs can be streamed. + * + * @return the logStreamEndpoint value. + */ + String logStreamEndpoint(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner object. + * + * @return the inner object. + */ + ContainerAppsBuildResourceInner innerModel(); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuilds.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuilds.java new file mode 100644 index 000000000000..293579325fa1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuilds.java @@ -0,0 +1,66 @@ +// 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 ContainerAppsBuilds. + */ +public interface ContainerAppsBuilds { + /** + * Get a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @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.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Container Apps Build resource along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String containerAppName, + String buildName, Context context); + + /** + * Get a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Container Apps Build resource. + */ + ContainerAppsBuildResource get(String resourceGroupName, String containerAppName, String buildName); + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String containerAppName, String buildName); + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @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.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String containerAppName, String buildName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildsByContainerApps.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildsByContainerApps.java new file mode 100644 index 000000000000..bb61f0cf9013 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildsByContainerApps.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 ContainerAppsBuildsByContainerApps. + */ +public interface ContainerAppsBuildsByContainerApps { + /** + * List Container Apps Build resources by Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Container Apps Build Resource list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String containerAppName); + + /** + * List Container Apps Build resources by Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Container Apps Build Resource list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String containerAppName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatchResource.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatchResource.java new file mode 100644 index 000000000000..0a032a7e86e3 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatchResource.java @@ -0,0 +1,55 @@ +// 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.ContainerAppsPatchResourceInner; + +/** + * An immutable client-side representation of ContainerAppsPatchResource. + */ +public interface ContainerAppsPatchResource { + /** + * 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.ContainerAppsPatchResourceInner object. + * + * @return the inner object. + */ + ContainerAppsPatchResourceInner innerModel(); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatches.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatches.java new file mode 100644 index 000000000000..04509a19a50e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatches.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 ContainerAppsPatches. + */ +public interface ContainerAppsPatches { + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 collection as paginated response with {@link PagedIterable}. + */ + PagedIterable listByContainerApp(String resourceGroupName, String containerAppName); + + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq + * 'Succeeded'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 collection as paginated response with {@link PagedIterable}. + */ + PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, + String filter, Context context); + + /** + * Get details for specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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.core.management.exception.ManagementException 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 Container Apps Patch by patch name along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String containerAppName, + String patchName, Context context); + + /** + * Get details for specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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 Container Apps Patch by patch name. + */ + ContainerAppsPatchResource get(String resourceGroupName, String containerAppName, String patchName); + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String containerAppName, String patchName); + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String containerAppName, String patchName, Context context); + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void skipConfigure(String resourceGroupName, String containerAppName, String patchName, + PatchSkipConfig patchSkipConfig); + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void skipConfigure(String resourceGroupName, String containerAppName, String patchName, + PatchSkipConfig patchSkipConfig, Context context); + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException 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. + */ + ContainerAppsPatchResource apply(String resourceGroupName, String containerAppName, String patchName); + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @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.core.management.exception.ManagementException 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. + */ + ContainerAppsPatchResource apply(String resourceGroupName, String containerAppName, String patchName, + Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSessionPools.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSessionPools.java new file mode 100644 index 000000000000..7e2d6e365e21 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSessionPools.java @@ -0,0 +1,180 @@ +// 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 ContainerAppsSessionPools. + */ +public interface ContainerAppsSessionPools { + /** + * Get the session pools in a given subscription. + * + * @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 session pools in a given subscription as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * Get the session pools in a given subscription. + * + * @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 session pools in a given subscription as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * Get the session pools in a given resource group of a subscription. + * + * @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 session pools in a given resource group of a subscription as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * Get the session pools in a given resource group of a subscription. + * + * @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 session pools in a given resource group of a subscription as paginated response with + * {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get the properties of a session pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 properties of a session pool along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String sessionPoolName, + Context context); + + /** + * Get the properties of a session pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 properties of a session pool. + */ + SessionPool getByResourceGroup(String resourceGroupName, String sessionPoolName); + + /** + * Delete a session pool. + * + * Delete the session pool with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 sessionPoolName); + + /** + * Delete a session pool. + * + * Delete the session pool with the given name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param sessionPoolName Name of the session pool. + * @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 sessionPoolName, Context context); + + /** + * Get the properties of a session pool. + * + * @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 the properties of a session pool along with {@link Response}. + */ + SessionPool getById(String id); + + /** + * Get the properties of a session pool. + * + * @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 the properties of a session pool along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a session pool. + * + * Delete the session pool with the given name. + * + * @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 session pool. + * + * Delete the session pool with the given name. + * + * @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 SessionPool resource. + * + * @param name resource name. + * @return the first stage of the new SessionPool definition. + */ + SessionPool.DefinitionStages.Blank define(String name); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerExecutionStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerExecutionStatus.java new file mode 100644 index 000000000000..3318c713cb9b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerExecutionStatus.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.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Container Apps Job execution container status. Contains status code and reason. + */ +@Fluent +public final class ContainerExecutionStatus { + /* + * Container Name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Exit code + */ + @JsonProperty(value = "code") + private Integer code; + + /* + * Additional information for the container status + */ + @JsonProperty(value = "additionalInformation") + private String additionalInformation; + + /* + * Status of the container + */ + @JsonProperty(value = "status") + private String status; + + /** + * Creates an instance of ContainerExecutionStatus class. + */ + public ContainerExecutionStatus() { + } + + /** + * Get the name property: Container Name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Container Name. + * + * @param name the name value to set. + * @return the ContainerExecutionStatus object itself. + */ + public ContainerExecutionStatus withName(String name) { + this.name = name; + return this; + } + + /** + * Get the code property: Exit code. + * + * @return the code value. + */ + public Integer code() { + return this.code; + } + + /** + * Set the code property: Exit code. + * + * @param code the code value to set. + * @return the ContainerExecutionStatus object itself. + */ + public ContainerExecutionStatus withCode(Integer code) { + this.code = code; + return this; + } + + /** + * Get the additionalInformation property: Additional information for the container status. + * + * @return the additionalInformation value. + */ + public String additionalInformation() { + return this.additionalInformation; + } + + /** + * Set the additionalInformation property: Additional information for the container status. + * + * @param additionalInformation the additionalInformation value to set. + * @return the ContainerExecutionStatus object itself. + */ + public ContainerExecutionStatus withAdditionalInformation(String additionalInformation) { + this.additionalInformation = additionalInformation; + return this; + } + + /** + * Get the status property: Status of the container. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Set the status property: Status of the container. + * + * @param status the status value to set. + * @return the ContainerExecutionStatus object itself. + */ + public ContainerExecutionStatus withStatus(String status) { + this.status = status; + 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/ContainerRegistry.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistry.java index 8c1b99939147..1801dc517faf 100644 --- 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 @@ -78,12 +78,14 @@ public ContainerRegistry withIdentityResourceId(String identityResourceId) { */ public void validate() { if (containerRegistryServer() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property containerRegistryServer in model ContainerRegistry")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property containerRegistryServer in model ContainerRegistry")); } if (identityResourceId() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property identityResourceId in model ContainerRegistry")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property identityResourceId in model ContainerRegistry")); } } 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 index 2682fc52cb1f..09d1ca107e25 100644 --- 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 @@ -14,8 +14,7 @@ @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. + * 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; @@ -81,8 +80,9 @@ public ContainerRegistryWithCustomImage withImage(String image) { */ public void validate() { if (server() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property server in model ContainerRegistryWithCustomImage")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property server in model ContainerRegistryWithCustomImage")); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerType.java new file mode 100644 index 000000000000..ea180a3da99b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerType.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 container type of the sessions. + */ +public final class ContainerType extends ExpandableStringEnum { + /** + * Static value CustomContainer for ContainerType. + */ + public static final ContainerType CUSTOM_CONTAINER = fromString("CustomContainer"); + + /** + * Static value PythonLTS for ContainerType. + */ + public static final ContainerType PYTHON_LTS = fromString("PythonLTS"); + + /** + * Creates a new instance of ContainerType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ContainerType() { + } + + /** + * Creates or finds a ContainerType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ContainerType. + */ + @JsonCreator + public static ContainerType fromString(String name) { + return fromString(name, ContainerType.class); + } + + /** + * Gets known ContainerType values. + * + * @return known ContainerType values. + */ + public static Collection values() { + return values(ContainerType.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CorsPolicy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CorsPolicy.java index 9c0a944196c1..a979865b3ff7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CorsPolicy.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CorsPolicy.java @@ -33,7 +33,7 @@ public final class CorsPolicy { private List allowedHeaders; /* - * Specifies the content for the access-control-expose-headers header + * Specifies the content for the access-control-expose-headers header */ @JsonProperty(value = "exposeHeaders") private List exposeHeaders; @@ -183,8 +183,8 @@ public CorsPolicy withAllowCredentials(Boolean allowCredentials) { */ public void validate() { if (allowedOrigins() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property allowedOrigins in model CorsPolicy")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property allowedOrigins in model CorsPolicy")); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomContainerTemplate.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomContainerTemplate.java new file mode 100644 index 000000000000..8a7386c09b25 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomContainerTemplate.java @@ -0,0 +1,118 @@ +// 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; + +/** + * Custom container configuration. + */ +@Fluent +public final class CustomContainerTemplate { + /* + * Private container registry credentials for containers used by the sessions of the session pool. + */ + @JsonProperty(value = "registryCredentials") + private SessionRegistryCredentials registryCredentials; + + /* + * List of container definitions for the sessions of the session pool. + */ + @JsonProperty(value = "containers") + private List containers; + + /* + * Session pool ingress configuration. + */ + @JsonProperty(value = "ingress") + private SessionIngress ingress; + + /** + * Creates an instance of CustomContainerTemplate class. + */ + public CustomContainerTemplate() { + } + + /** + * Get the registryCredentials property: Private container registry credentials for containers used by the sessions + * of the session pool. + * + * @return the registryCredentials value. + */ + public SessionRegistryCredentials registryCredentials() { + return this.registryCredentials; + } + + /** + * Set the registryCredentials property: Private container registry credentials for containers used by the sessions + * of the session pool. + * + * @param registryCredentials the registryCredentials value to set. + * @return the CustomContainerTemplate object itself. + */ + public CustomContainerTemplate withRegistryCredentials(SessionRegistryCredentials registryCredentials) { + this.registryCredentials = registryCredentials; + return this; + } + + /** + * Get the containers property: List of container definitions for the sessions of the session pool. + * + * @return the containers value. + */ + public List containers() { + return this.containers; + } + + /** + * Set the containers property: List of container definitions for the sessions of the session pool. + * + * @param containers the containers value to set. + * @return the CustomContainerTemplate object itself. + */ + public CustomContainerTemplate withContainers(List containers) { + this.containers = containers; + return this; + } + + /** + * Get the ingress property: Session pool ingress configuration. + * + * @return the ingress value. + */ + public SessionIngress ingress() { + return this.ingress; + } + + /** + * Set the ingress property: Session pool ingress configuration. + * + * @param ingress the ingress value to set. + * @return the CustomContainerTemplate object itself. + */ + public CustomContainerTemplate withIngress(SessionIngress ingress) { + this.ingress = ingress; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (registryCredentials() != null) { + registryCredentials().validate(); + } + if (containers() != null) { + containers().forEach(e -> e.validate()); + } + if (ingress() != null) { + ingress().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomain.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomain.java index 298c01667aba..92e3a1e30f46 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomain.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomain.java @@ -106,8 +106,8 @@ public CustomDomain withCertificateId(String certificateId) { */ public void validate() { if (name() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property name in model CustomDomain")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model CustomDomain")); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java index c5b307384859..513baeac18d4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java @@ -35,6 +35,12 @@ public final class CustomScaleRule { @JsonProperty(value = "auth") private List auth; + /* + * The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for system-assigned identity. + */ + @JsonProperty(value = "identity") + private String identity; + /** * Creates an instance of CustomScaleRule class. */ @@ -103,6 +109,28 @@ public CustomScaleRule withAuth(List auth) { return this; } + /** + * Get the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container + * App, or 'system' for system-assigned identity. + * + * @return the identity value. + */ + public String identity() { + return this.identity; + } + + /** + * Set the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container + * App, or 'system' for system-assigned identity. + * + * @param identity the identity value to set. + * @return the CustomScaleRule object itself. + */ + public CustomScaleRule withIdentity(String identity) { + this.identity = identity; + return this; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Dapr.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Dapr.java index bd279c80bfc6..d1f7317e21cf 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Dapr.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Dapr.java @@ -43,8 +43,7 @@ public final class Dapr { private Integer httpReadBufferSize; /* - * Increasing max size of request body http and grpc servers parameter in MB to handle uploading of big files. - * Default is 4 MB. + * Increasing max size of request body http and grpc servers parameter in MB to handle uploading of big files. Default is 4 MB. */ @JsonProperty(value = "httpMaxRequestSize") private Integer httpMaxRequestSize; @@ -172,8 +171,8 @@ public Dapr withHttpReadBufferSize(Integer httpReadBufferSize) { } /** - * Get the httpMaxRequestSize property: Increasing max size of request body http and grpc servers parameter in MB - * to handle uploading of big files. Default is 4 MB. + * Get the httpMaxRequestSize property: Increasing max size of request body http and grpc servers parameter in MB to + * handle uploading of big files. Default is 4 MB. * * @return the httpMaxRequestSize value. */ @@ -182,8 +181,8 @@ public Integer httpMaxRequestSize() { } /** - * Set the httpMaxRequestSize property: Increasing max size of request body http and grpc servers parameter in MB - * to handle uploading of big files. Default is 4 MB. + * Set the httpMaxRequestSize property: Increasing max size of request body http and grpc servers parameter in MB to + * handle uploading of big files. Default is 4 MB. * * @param httpMaxRequestSize the httpMaxRequestSize value to set. * @return the Dapr object itself. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPoliciesCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPoliciesCollection.java index d2cd3641ede9..3bb3a11c4d16 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPoliciesCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPoliciesCollection.java @@ -69,8 +69,9 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property value in model DaprComponentResiliencyPoliciesCollection")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model DaprComponentResiliencyPoliciesCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.java index 00acaa9ac2ce..8ff5abde66e0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.java @@ -25,8 +25,7 @@ public final class DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguratio private Integer timeoutInSeconds; /* - * The optional interval in seconds after which the error count resets to 0. An interval of 0 will never reset. If - * not specified, the timeoutInSeconds value will be used. + * The optional interval in seconds after which the error count resets to 0. An interval of 0 will never reset. If not specified, the timeoutInSeconds value will be used. */ @JsonProperty(value = "intervalInSeconds") private Integer intervalInSeconds; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentsCollection.java index a61699c74b2b..de9b9783a0a9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentsCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentsCollection.java @@ -69,8 +69,8 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model DaprComponentsCollection")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model DaprComponentsCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRouteRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRouteRule.java index d6d2bdcf1338..d092591a335d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRouteRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRouteRule.java @@ -13,9 +13,7 @@ @Fluent public final class DaprSubscriptionRouteRule { /* - * The optional CEL expression used to match the event. If the match is not specified, then the route is considered - * the default. The rules are tested in the order specified, so they should be define from most-to-least specific. - * The default route should appear last in the list. + * The optional CEL expression used to match the event. If the match is not specified, then the route is considered the default. The rules are tested in the order specified, so they should be define from most-to-least specific. The default route should appear last in the list. */ @JsonProperty(value = "match") private String match; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionsCollection.java index e78b2ac2a46c..7514ab598f25 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionsCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionsCollection.java @@ -69,8 +69,9 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model DaprSubscriptionsCollection")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model DaprSubscriptionsCollection")); } else { value().forEach(e -> e.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 000000000000..08c070715a4d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DetectionStatus.java @@ -0,0 +1,58 @@ +// 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/DotNetComponentType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentType.java index 9d1346962f4f..29768af80222 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentType.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentType.java @@ -17,11 +17,6 @@ public final class DotNetComponentType extends ExpandableStringEnum e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DynamicPoolConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DynamicPoolConfiguration.java new file mode 100644 index 000000000000..afe06f43a398 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DynamicPoolConfiguration.java @@ -0,0 +1,80 @@ +// 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; + +/** + * Dynamic pool configuration. + */ +@Fluent +public final class DynamicPoolConfiguration { + /* + * The execution type of the session pool. + */ + @JsonProperty(value = "executionType") + private ExecutionType executionType; + + /* + * The cooldown period of a session in seconds. + */ + @JsonProperty(value = "cooldownPeriodInSeconds") + private Integer cooldownPeriodInSeconds; + + /** + * Creates an instance of DynamicPoolConfiguration class. + */ + public DynamicPoolConfiguration() { + } + + /** + * Get the executionType property: The execution type of the session pool. + * + * @return the executionType value. + */ + public ExecutionType executionType() { + return this.executionType; + } + + /** + * Set the executionType property: The execution type of the session pool. + * + * @param executionType the executionType value to set. + * @return the DynamicPoolConfiguration object itself. + */ + public DynamicPoolConfiguration withExecutionType(ExecutionType executionType) { + this.executionType = executionType; + return this; + } + + /** + * Get the cooldownPeriodInSeconds property: The cooldown period of a session in seconds. + * + * @return the cooldownPeriodInSeconds value. + */ + public Integer cooldownPeriodInSeconds() { + return this.cooldownPeriodInSeconds; + } + + /** + * Set the cooldownPeriodInSeconds property: The cooldown period of a session in seconds. + * + * @param cooldownPeriodInSeconds the cooldownPeriodInSeconds value to set. + * @return the DynamicPoolConfiguration object itself. + */ + public DynamicPoolConfiguration withCooldownPeriodInSeconds(Integer cooldownPeriodInSeconds) { + this.cooldownPeriodInSeconds = cooldownPeriodInSeconds; + 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 index 0e8c6c43c8f2..5e2345d28417 100644 --- 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 @@ -78,12 +78,12 @@ public EnvironmentVariable withValue(String value) { */ public void validate() { if (name() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property name in model EnvironmentVariable")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model EnvironmentVariable")); } if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model EnvironmentVariable")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model EnvironmentVariable")); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExecutionStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExecutionStatus.java new file mode 100644 index 000000000000..ea1fcb85212d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExecutionStatus.java @@ -0,0 +1,58 @@ +// 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; + +/** + * Container Apps Job execution status. + */ +@Fluent +public final class ExecutionStatus { + /* + * Replicas in the execution. + */ + @JsonProperty(value = "replicas") + private List replicas; + + /** + * Creates an instance of ExecutionStatus class. + */ + public ExecutionStatus() { + } + + /** + * Get the replicas property: Replicas in the execution. + * + * @return the replicas value. + */ + public List replicas() { + return this.replicas; + } + + /** + * Set the replicas property: Replicas in the execution. + * + * @param replicas the replicas value to set. + * @return the ExecutionStatus object itself. + */ + public ExecutionStatus withReplicas(List replicas) { + this.replicas = replicas; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (replicas() != null) { + replicas().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExecutionType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExecutionType.java new file mode 100644 index 000000000000..6798c1893b2e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExecutionType.java @@ -0,0 +1,48 @@ +// 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 execution type of the session pool. + */ +public final class ExecutionType extends ExpandableStringEnum { + /** + * Static value Timed for ExecutionType. + */ + public static final ExecutionType TIMED = fromString("Timed"); + + /** + * Creates a new instance of ExecutionType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ExecutionType() { + } + + /** + * Creates or finds a ExecutionType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExecutionType. + */ + @JsonCreator + public static ExecutionType fromString(String name) { + return fromString(name, ExecutionType.class); + } + + /** + * Gets known ExecutionType values. + * + * @return known ExecutionType values. + */ + public static Collection values() { + return values(ExecutionType.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Facebook.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Facebook.java index 6eebc6093dd5..301bbf9837d2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Facebook.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Facebook.java @@ -13,8 +13,7 @@ @Fluent public final class Facebook { /* - * false if the Facebook provider should not be enabled despite the set registration; otherwise, - * true. + * false if the Facebook provider should not be enabled despite the set registration; otherwise, true. */ @JsonProperty(value = "enabled") private Boolean enabled; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/FunctionsExtensions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/FunctionsExtensions.java new file mode 100644 index 000000000000..3a5584b9d59a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/FunctionsExtensions.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.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of FunctionsExtensions. + */ +public interface FunctionsExtensions { + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @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 body along with {@link Response}. + */ + Response invokeFunctionsHostWithResponse(String resourceGroupName, String containerAppName, + String revisionName, String functionAppName, Context context); + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @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. + */ + String invokeFunctionsHost(String resourceGroupName, String containerAppName, String revisionName, + String functionAppName); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GitHub.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GitHub.java index f017ad4e55b7..f1daa75ed8d5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GitHub.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GitHub.java @@ -13,8 +13,7 @@ @Fluent public final class GitHub { /* - * false if the GitHub provider should not be enabled despite the set registration; otherwise, - * true. + * false if the GitHub provider should not be enabled despite the set registration; otherwise, true. */ @JsonProperty(value = "enabled") private Boolean enabled; @@ -38,8 +37,8 @@ public GitHub() { } /** - * Get the enabled property: <code>false</code> if the GitHub provider should not be enabled despite - * the set registration; otherwise, <code>true</code>. + * Get the enabled property: <code>false</code> if the GitHub provider should not be enabled despite the + * set registration; otherwise, <code>true</code>. * * @return the enabled value. */ @@ -48,8 +47,8 @@ public Boolean enabled() { } /** - * Set the enabled property: <code>false</code> if the GitHub provider should not be enabled despite - * the set registration; otherwise, <code>true</code>. + * Set the enabled property: <code>false</code> if the GitHub provider should not be enabled despite the + * set registration; otherwise, <code>true</code>. * * @param enabled the enabled value to set. * @return the GitHub object itself. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Google.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Google.java index 085f2d03acff..e1e8df449eed 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Google.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Google.java @@ -13,8 +13,7 @@ @Fluent public final class Google { /* - * false if the Google provider should not be enabled despite the set registration; otherwise, - * true. + * false if the Google provider should not be enabled despite the set registration; otherwise, true. */ @JsonProperty(value = "enabled") private Boolean enabled; @@ -44,8 +43,8 @@ public Google() { } /** - * Get the enabled property: <code>false</code> if the Google provider should not be enabled despite - * the set registration; otherwise, <code>true</code>. + * Get the enabled property: <code>false</code> if the Google provider should not be enabled despite the + * set registration; otherwise, <code>true</code>. * * @return the enabled value. */ @@ -54,8 +53,8 @@ public Boolean enabled() { } /** - * Set the enabled property: <code>false</code> if the Google provider should not be enabled despite - * the set registration; otherwise, <code>true</code>. + * Set the enabled property: <code>false</code> if the Google provider should not be enabled despite the + * set registration; otherwise, <code>true</code>. * * @param enabled the enabled value to set. * @return the Google object itself. 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 index bd154edb3423..ced8a36c8835 100644 --- 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 @@ -105,8 +105,7 @@ public HttpGet withHeaders(List headers) { */ public void validate() { if (url() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property url in model HttpGet")); + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property url in model HttpGet")); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java index 0ecbbf8ea5f2..4e6a02e3af13 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java @@ -28,6 +28,12 @@ public final class HttpScaleRule { @JsonProperty(value = "auth") private List auth; + /* + * The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for system-assigned identity. + */ + @JsonProperty(value = "identity") + private String identity; + /** * Creates an instance of HttpScaleRule class. */ @@ -74,6 +80,28 @@ public HttpScaleRule withAuth(List auth) { return this; } + /** + * Get the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container + * App, or 'system' for system-assigned identity. + * + * @return the identity value. + */ + public String identity() { + return this.identity; + } + + /** + * Set the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container + * App, or 'system' for system-assigned identity. + * + * @param identity the identity value to set. + * @return the HttpScaleRule object itself. + */ + public HttpScaleRule withIdentity(String identity) { + this.identity = identity; + return this; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettings.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettings.java index 59a984e74eb4..d8e013fe7ce9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettings.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettings.java @@ -14,8 +14,7 @@ @Fluent public final class HttpSettings { /* - * false if the authentication/authorization responses not having the HTTPS scheme are permissible; - * otherwise, true. + * false if the authentication/authorization responses not having the HTTPS scheme are permissible; otherwise, true. */ @JsonProperty(value = "requireHttps") private Boolean requireHttps; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentitySettings.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentitySettings.java new file mode 100644 index 000000000000..9111ebeaf584 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentitySettings.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; + +/** + * Optional settings for a Managed Identity that is assigned to the Container App. + */ +@Fluent +public final class IdentitySettings { + /* + * The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for system-assigned identity. + */ + @JsonProperty(value = "identity", required = true) + private String identity; + + /* + * Use to select the lifecycle stages of a Container App during which the Managed Identity should be available. + */ + @JsonProperty(value = "lifecycle") + private IdentitySettingsLifeCycle lifecycle; + + /** + * Creates an instance of IdentitySettings class. + */ + public IdentitySettings() { + } + + /** + * Get the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container + * App, or 'system' for system-assigned identity. + * + * @return the identity value. + */ + public String identity() { + return this.identity; + } + + /** + * Set the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container + * App, or 'system' for system-assigned identity. + * + * @param identity the identity value to set. + * @return the IdentitySettings object itself. + */ + public IdentitySettings withIdentity(String identity) { + this.identity = identity; + return this; + } + + /** + * Get the lifecycle property: Use to select the lifecycle stages of a Container App during which the Managed + * Identity should be available. + * + * @return the lifecycle value. + */ + public IdentitySettingsLifeCycle lifecycle() { + return this.lifecycle; + } + + /** + * Set the lifecycle property: Use to select the lifecycle stages of a Container App during which the Managed + * Identity should be available. + * + * @param lifecycle the lifecycle value to set. + * @return the IdentitySettings object itself. + */ + public IdentitySettings withLifecycle(IdentitySettingsLifeCycle lifecycle) { + this.lifecycle = lifecycle; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property identity in model IdentitySettings")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IdentitySettings.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentitySettingsLifeCycle.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentitySettingsLifeCycle.java new file mode 100644 index 000000000000..15b9c0c2babd --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentitySettingsLifeCycle.java @@ -0,0 +1,63 @@ +// 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; + +/** + * Use to select the lifecycle stages of a Container App during which the Managed Identity should be available. + */ +public final class IdentitySettingsLifeCycle extends ExpandableStringEnum { + /** + * Static value Init for IdentitySettingsLifeCycle. + */ + public static final IdentitySettingsLifeCycle INIT = fromString("Init"); + + /** + * Static value Main for IdentitySettingsLifeCycle. + */ + public static final IdentitySettingsLifeCycle MAIN = fromString("Main"); + + /** + * Static value None for IdentitySettingsLifeCycle. + */ + public static final IdentitySettingsLifeCycle NONE = fromString("None"); + + /** + * Static value All for IdentitySettingsLifeCycle. + */ + public static final IdentitySettingsLifeCycle ALL = fromString("All"); + + /** + * Creates a new instance of IdentitySettingsLifeCycle value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IdentitySettingsLifeCycle() { + } + + /** + * Creates or finds a IdentitySettingsLifeCycle from its string representation. + * + * @param name a name to look for. + * @return the corresponding IdentitySettingsLifeCycle. + */ + @JsonCreator + public static IdentitySettingsLifeCycle fromString(String name) { + return fromString(name, IdentitySettingsLifeCycle.class); + } + + /** + * Gets known IdentitySettingsLifeCycle values. + * + * @return known IdentitySettingsLifeCycle values. + */ + public static Collection values() { + return values(IdentitySettingsLifeCycle.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ImageType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ImageType.java new file mode 100644 index 000000000000..a93ae5d42aa5 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ImageType.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The type of the image. Set to CloudBuild to let the system manages the image, where user will not be able to update + * image through image field. Set to ContainerImage for user provided image. + */ +public final class ImageType extends ExpandableStringEnum { + /** + * Static value CloudBuild for ImageType. + */ + public static final ImageType CLOUD_BUILD = fromString("CloudBuild"); + + /** + * Static value ContainerImage for ImageType. + */ + public static final ImageType CONTAINER_IMAGE = fromString("ContainerImage"); + + /** + * Creates a new instance of ImageType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ImageType() { + } + + /** + * Creates or finds a ImageType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ImageType. + */ + @JsonCreator + public static ImageType fromString(String name) { + return fromString(name, ImageType.class); + } + + /** + * Gets known ImageType values. + * + * @return known ImageType values. + */ + public static Collection values() { + return values(ImageType.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 115157470d1b..3fc0c8ae7ef7 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 @@ -56,8 +56,7 @@ public final class Ingress { private List customDomains; /* - * Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected - * to HTTPS connections + * Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections */ @JsonProperty(value = "allowInsecure") private Boolean allowInsecure; @@ -75,9 +74,7 @@ public final class Ingress { private IngressStickySessions stickySessions; /* - * Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. - * Accept indicates server forwards client certificate but does not require a client certificate. Require indicates - * server requires a client certificate. + * Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require a client certificate. Require indicates server requires a client certificate. */ @JsonProperty(value = "clientCertificateMode") private IngressClientCertificateMode clientCertificateMode; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java index dc57c485c5b8..b166483e7b57 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java @@ -27,6 +27,15 @@ public InitContainer withImage(String image) { return this; } + /** + * {@inheritDoc} + */ + @Override + public InitContainer withImageType(ImageType imageType) { + super.withImageType(imageType); + return this; + } + /** * {@inheritDoc} */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IpSecurityRestrictionRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IpSecurityRestrictionRule.java index 78fa22df8a37..7e0fd01ae4f2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IpSecurityRestrictionRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IpSecurityRestrictionRule.java @@ -134,16 +134,18 @@ public IpSecurityRestrictionRule withAction(Action action) { */ public void validate() { if (name() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property name in model IpSecurityRestrictionRule")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model IpSecurityRestrictionRule")); } if (ipAddressRange() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property ipAddressRange in model IpSecurityRestrictionRule")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property ipAddressRange in model IpSecurityRestrictionRule")); } if (action() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property action in model IpSecurityRestrictionRule")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property action in model IpSecurityRestrictionRule")); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponent.java index bf42b2379e15..0faa35c4e557 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponent.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponent.java @@ -7,7 +7,6 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner; -import java.util.List; /** * An immutable client-side representation of JavaComponent. @@ -35,39 +34,18 @@ public interface JavaComponent { 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: Type of the Java Component. + * Gets the properties property: Java Component resource specific properties. * - * @return the componentType value. + * @return the properties value. */ - JavaComponentType componentType(); + JavaComponentProperties properties(); /** - * Gets the provisioningState property: Provisioning state of the Java Component. - * - * @return the provisioningState value. - */ - JavaComponentProvisioningState provisioningState(); - - /** - * Gets the configurations property: List of Java Components configuration properties. - * - * @return the configurations value. - */ - List configurations(); - - /** - * Gets the serviceBinds property: List of Java Components that are bound to the Java component. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the serviceBinds value. + * @return the systemData value. */ - List serviceBinds(); + SystemData systemData(); /** * Gets the name of the resource group. @@ -118,8 +96,7 @@ interface WithParentResource { * The stage of the JavaComponent 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.WithComponentType, DefinitionStages.WithConfigurations, - DefinitionStages.WithServiceBinds { + interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. * @@ -137,42 +114,16 @@ interface WithCreate extends DefinitionStages.WithComponentType, DefinitionStage } /** - * The stage of the JavaComponent definition allowing to specify componentType. - */ - interface WithComponentType { - /** - * Specifies the componentType property: Type of the Java Component.. - * - * @param componentType Type of the Java Component. - * @return the next definition stage. - */ - WithCreate withComponentType(JavaComponentType componentType); - } - - /** - * The stage of the JavaComponent definition allowing to specify configurations. + * The stage of the JavaComponent definition allowing to specify properties. */ - interface WithConfigurations { + interface WithProperties { /** - * Specifies the configurations property: List of Java Components configuration properties. + * Specifies the properties property: Java Component resource specific properties. * - * @param configurations List of Java Components configuration properties. + * @param properties Java Component resource specific properties. * @return the next definition stage. */ - WithCreate withConfigurations(List configurations); - } - - /** - * The stage of the JavaComponent definition allowing to specify serviceBinds. - */ - interface WithServiceBinds { - /** - * Specifies the serviceBinds property: List of Java Components that are bound to the Java component. - * - * @param serviceBinds List of Java Components that are bound to the Java component. - * @return the next definition stage. - */ - WithCreate withServiceBinds(List serviceBinds); + WithCreate withProperties(JavaComponentProperties properties); } } @@ -186,8 +137,7 @@ interface WithServiceBinds { /** * The template for JavaComponent update. */ - interface Update - extends UpdateStages.WithComponentType, UpdateStages.WithConfigurations, UpdateStages.WithServiceBinds { + interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * @@ -209,42 +159,16 @@ interface Update */ interface UpdateStages { /** - * The stage of the JavaComponent update allowing to specify componentType. - */ - interface WithComponentType { - /** - * Specifies the componentType property: Type of the Java Component.. - * - * @param componentType Type of the Java Component. - * @return the next definition stage. - */ - Update withComponentType(JavaComponentType componentType); - } - - /** - * The stage of the JavaComponent update allowing to specify configurations. - */ - interface WithConfigurations { - /** - * Specifies the configurations property: List of Java Components configuration properties. - * - * @param configurations List of Java Components configuration properties. - * @return the next definition stage. - */ - Update withConfigurations(List configurations); - } - - /** - * The stage of the JavaComponent update allowing to specify serviceBinds. + * The stage of the JavaComponent update allowing to specify properties. */ - interface WithServiceBinds { + interface WithProperties { /** - * Specifies the serviceBinds property: List of Java Components that are bound to the Java component. + * Specifies the properties property: Java Component resource specific properties. * - * @param serviceBinds List of Java Components that are bound to the Java component. + * @param properties Java Component resource specific properties. * @return the next definition stage. */ - Update withServiceBinds(List serviceBinds); + Update withProperties(JavaComponentProperties properties); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentIngress.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentIngress.java new file mode 100644 index 000000000000..3605627361d1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentIngress.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.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Container App Ingress configuration. + */ +@Immutable +public final class JavaComponentIngress { + /* + * Hostname of the Java Component endpoint + */ + @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /** + * Creates an instance of JavaComponentIngress class. + */ + public JavaComponentIngress() { + } + + /** + * Get the fqdn property: Hostname of the Java Component endpoint. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * 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/JavaComponentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProperties.java similarity index 75% rename from sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JavaComponentProperties.java rename to sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProperties.java index 7b0b5c56ad9e..f16dad661fb9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JavaComponentProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProperties.java @@ -2,25 +2,37 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appcontainers.fluent.models; +package com.azure.resourcemanager.appcontainers.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeId; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; /** - * Java Component resource specific properties. + * Java Component common properties. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + property = "componentType", + defaultImpl = JavaComponentProperties.class, + visible = true) +@JsonTypeName("JavaComponentProperties") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "SpringBootAdmin", value = SpringBootAdminComponent.class), + @JsonSubTypes.Type(name = "Nacos", value = NacosComponent.class), + @JsonSubTypes.Type(name = "SpringCloudEureka", value = SpringCloudEurekaComponent.class), + @JsonSubTypes.Type(name = "SpringCloudConfig", value = SpringCloudConfigComponent.class) }) @Fluent -public final class JavaComponentProperties { +public class JavaComponentProperties { /* * Type of the Java Component. */ - @JsonProperty(value = "componentType") + @JsonTypeId + @JsonProperty(value = "componentType", required = true) private JavaComponentType componentType; /* @@ -45,6 +57,7 @@ public final class JavaComponentProperties { * Creates an instance of JavaComponentProperties class. */ public JavaComponentProperties() { + this.componentType = JavaComponentType.fromString("JavaComponentProperties"); } /** @@ -56,17 +69,6 @@ public JavaComponentType componentType() { return this.componentType; } - /** - * Set the componentType property: Type of the Java Component. - * - * @param componentType the componentType value to set. - * @return the JavaComponentProperties object itself. - */ - public JavaComponentProperties withComponentType(JavaComponentType componentType) { - this.componentType = componentType; - return this; - } - /** * Get the provisioningState property: Provisioning state of the Java Component. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentType.java index 60c54e06369d..d9b56599c589 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentType.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentType.java @@ -27,6 +27,11 @@ public final class JavaComponentType extends ExpandableStringEnum e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfiguration.java index 12c36c4401d1..03ca8d5369d6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfiguration.java @@ -39,15 +39,13 @@ public final class JobConfiguration { private Integer replicaRetryLimit; /* - * Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would - * be set to 1 by default + * Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default */ @JsonProperty(value = "manualTriggerConfig") private JobConfigurationManualTriggerConfig manualTriggerConfig; /* - * Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism - * would be set to 1 by default + * Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default */ @JsonProperty(value = "scheduleTriggerConfig") private JobConfigurationScheduleTriggerConfig scheduleTriggerConfig; @@ -64,6 +62,12 @@ public final class JobConfiguration { @JsonProperty(value = "registries") private List registries; + /* + * Optional settings for Managed Identities that are assigned to the Container App Job. If a Managed Identity is not specified here, default settings will be used. + */ + @JsonProperty(value = "identitySettings") + private List identitySettings; + /** * Creates an instance of JobConfiguration class. */ @@ -234,6 +238,28 @@ public JobConfiguration withRegistries(List registries) { return this; } + /** + * Get the identitySettings property: Optional settings for Managed Identities that are assigned to the Container + * App Job. If a Managed Identity is not specified here, default settings will be used. + * + * @return the identitySettings value. + */ + public List identitySettings() { + return this.identitySettings; + } + + /** + * Set the identitySettings property: Optional settings for Managed Identities that are assigned to the Container + * App Job. If a Managed Identity is not specified here, default settings will be used. + * + * @param identitySettings the identitySettings value to set. + * @return the JobConfiguration object itself. + */ + public JobConfiguration withIdentitySettings(List identitySettings) { + this.identitySettings = identitySettings; + return this; + } + /** * Validates the instance. * @@ -244,8 +270,8 @@ public void validate() { secrets().forEach(e -> e.validate()); } if (triggerType() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property triggerType in model JobConfiguration")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property triggerType in model JobConfiguration")); } if (manualTriggerConfig() != null) { manualTriggerConfig().validate(); @@ -259,6 +285,9 @@ public void validate() { if (registries() != null) { registries().forEach(e -> e.validate()); } + if (identitySettings() != null) { + identitySettings().forEach(e -> e.validate()); + } } private static final ClientLogger LOGGER = new ClientLogger(JobConfiguration.class); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationScheduleTriggerConfig.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationScheduleTriggerConfig.java index 4ce57dc75d70..b222d6c823a8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationScheduleTriggerConfig.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationScheduleTriggerConfig.java @@ -9,8 +9,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would - * be set to 1 by default. + * Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be + * set to 1 by default. */ @Fluent public final class JobConfigurationScheduleTriggerConfig { @@ -107,8 +107,9 @@ public JobConfigurationScheduleTriggerConfig withParallelism(Integer parallelism */ public void validate() { if (cronExpression() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property cronExpression in model JobConfigurationScheduleTriggerConfig")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property cronExpression in model JobConfigurationScheduleTriggerConfig")); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecution.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecution.java index cf83584a4386..86f5654629d5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecution.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecution.java @@ -60,6 +60,13 @@ public interface JobExecution { */ JobExecutionTemplate template(); + /** + * Gets the detailedStatus property: Detailed status of the job execution. + * + * @return the detailedStatus value. + */ + ExecutionStatus detailedStatus(); + /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner object. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchProperties.java index d09f18fc692a..534edfa37f62 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchProperties.java @@ -21,8 +21,7 @@ public final class JobPatchProperties { private ExtendedLocation extendedLocation; /* - * Managed identities needed by a container app job to interact with other Azure services to not maintain any - * secrets or credentials in code. + * Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code. */ @JsonProperty(value = "identity") private ManagedServiceIdentity identity; @@ -67,8 +66,8 @@ public JobPatchProperties withExtendedLocation(ExtendedLocation extendedLocation } /** - * Get the identity property: Managed identities needed by a container app job to interact with other Azure - * services to not maintain any secrets or credentials in code. + * Get the identity property: Managed identities needed by a container app job to interact with other Azure services + * to not maintain any secrets or credentials in code. * * @return the identity value. */ @@ -77,8 +76,8 @@ public ManagedServiceIdentity identity() { } /** - * Set the identity property: Managed identities needed by a container app job to interact with other Azure - * services to not maintain any secrets or credentials in code. + * Set the identity property: Managed identities needed by a container app job to interact with other Azure services + * to not maintain any secrets or credentials in code. * * @param identity the identity value to set. * @return the JobPatchProperties object itself. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScaleRule.java index a78b1c2b38b7..29386a84da58 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScaleRule.java @@ -38,6 +38,12 @@ public final class JobScaleRule { @JsonProperty(value = "auth") private List auth; + /* + * The resource ID of a user-assigned managed identity that is assigned to the job, or 'system' for system-assigned identity. + */ + @JsonProperty(value = "identity") + private String identity; + /** * Creates an instance of JobScaleRule class. */ @@ -126,6 +132,28 @@ public JobScaleRule withAuth(List auth) { return this; } + /** + * Get the identity property: The resource ID of a user-assigned managed identity that is assigned to the job, or + * 'system' for system-assigned identity. + * + * @return the identity value. + */ + public String identity() { + return this.identity; + } + + /** + * Set the identity property: The resource ID of a user-assigned managed identity that is assigned to the job, or + * 'system' for system-assigned identity. + * + * @param identity the identity value to set. + * @return the JobScaleRule object itself. + */ + public JobScaleRule withIdentity(String identity) { + this.identity = identity; + return this; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsCollection.java index 7d0d995b3a42..84a88199ac0e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsCollection.java @@ -69,8 +69,8 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model JobsCollection")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model JobsCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Kind.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Kind.java new file mode 100644 index 000000000000..4658255e44e8 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Kind.java @@ -0,0 +1,49 @@ +// 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; + +/** + * Metadata used to render different experiences for resources of the same type; e.g. WorkflowApp is a kind of + * Microsoft.App/ContainerApps type. If supported, the resource provider must validate and persist this value. + */ +public final class Kind extends ExpandableStringEnum { + /** + * Static value workflowapp for Kind. + */ + public static final Kind WORKFLOWAPP = fromString("workflowapp"); + + /** + * Creates a new instance of Kind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Kind() { + } + + /** + * Creates or finds a Kind from its string representation. + * + * @param name a name to look for. + * @return the corresponding Kind. + */ + @JsonCreator + public static Kind fromString(String name) { + return fromString(name, Kind.class); + } + + /** + * Gets known Kind values. + * + * @return known Kind values. + */ + public static Collection values() { + return values(Kind.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Level.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Level.java new file mode 100644 index 000000000000..2ebdd69db318 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Level.java @@ -0,0 +1,73 @@ +// 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 specified logger's log level. + */ +public final class Level extends ExpandableStringEnum { + /** + * Static value off for Level. + */ + public static final Level OFF = fromString("off"); + + /** + * Static value error for Level. + */ + public static final Level ERROR = fromString("error"); + + /** + * Static value info for Level. + */ + public static final Level INFO = fromString("info"); + + /** + * Static value debug for Level. + */ + public static final Level DEBUG = fromString("debug"); + + /** + * Static value trace for Level. + */ + public static final Level TRACE = fromString("trace"); + + /** + * Static value warn for Level. + */ + public static final Level WARN = fromString("warn"); + + /** + * Creates a new instance of Level value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Level() { + } + + /** + * Creates or finds a Level from its string representation. + * + * @param name a name to look for. + * @return the corresponding Level. + */ + @JsonCreator + public static Level fromString(String name) { + return fromString(name, Level.class); + } + + /** + * Gets known Level values. + * + * @return known Level values. + */ + public static Collection values() { + return values(Level.class); + } +} 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 index d4a6e587bc76..887900df96e9 100644 --- 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 @@ -21,8 +21,7 @@ public final class ListUsagesResult { 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. + * 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; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoggerSetting.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoggerSetting.java new file mode 100644 index 000000000000..501037656d9f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoggerSetting.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; + +/** + * Logger settings for java workloads. + */ +@Fluent +public final class LoggerSetting { + /* + * Logger name. + */ + @JsonProperty(value = "logger", required = true) + private String logger; + + /* + * The specified logger's log level. + */ + @JsonProperty(value = "level", required = true) + private Level level; + + /** + * Creates an instance of LoggerSetting class. + */ + public LoggerSetting() { + } + + /** + * Get the logger property: Logger name. + * + * @return the logger value. + */ + public String logger() { + return this.logger; + } + + /** + * Set the logger property: Logger name. + * + * @param logger the logger value to set. + * @return the LoggerSetting object itself. + */ + public LoggerSetting withLogger(String logger) { + this.logger = logger; + return this; + } + + /** + * Get the level property: The specified logger's log level. + * + * @return the level value. + */ + public Level level() { + return this.level; + } + + /** + * Set the level property: The specified logger's log level. + * + * @param level the level value to set. + * @return the LoggerSetting object itself. + */ + public LoggerSetting withLevel(Level level) { + this.level = level; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (logger() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property logger in model LoggerSetting")); + } + if (level() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property level in model LoggerSetting")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LoggerSetting.class); +} 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 d26582e52661..a244e83c45dd 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 @@ -26,15 +26,13 @@ public final class Login { private TokenStore tokenStore; /* - * true if the fragments from the request are preserved after the login request is made; otherwise, - * false. + * true if the fragments from the request are preserved after the login request is made; otherwise, false. */ @JsonProperty(value = "preserveUrlFragmentsForLogins") private Boolean preserveUrlFragmentsForLogins; /* - * External URLs that can be redirected to as part of logging in or logging out of the app. Note that the query - * string part of the URL is ignored. + * External URLs that can be redirected to as part of logging in or logging out of the app. Note that the query string part of the URL is ignored. * This is an advanced setting typically only needed by Windows Store application backends. * Note that URLs within the current domain are always implicitly allowed. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateCollection.java index c086402c9706..8bdc27655609 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateCollection.java @@ -69,8 +69,9 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model ManagedCertificateCollection")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ManagedCertificateCollection")); } else { value().forEach(e -> e.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 1999293a6283..51b578bde41e 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 @@ -205,6 +205,20 @@ public interface ManagedEnvironment { */ ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication(); + /** + * Gets the peerTrafficConfiguration property: Peer traffic settings for the Managed Environment. + * + * @return the peerTrafficConfiguration value. + */ + ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration(); + + /** + * Gets the privateEndpointConnections property: Private endpoint connections to the resource. + * + * @return the privateEndpointConnections value. + */ + List privateEndpointConnections(); + /** * Gets the region of the resource. * @@ -288,14 +302,15 @@ interface WithResourceGroup { * The stage of the ManagedEnvironment 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.WithKind, - DefinitionStages.WithIdentity, DefinitionStages.WithDaprAIInstrumentationKey, - DefinitionStages.WithDaprAIConnectionString, DefinitionStages.WithVnetConfiguration, - DefinitionStages.WithAppLogsConfiguration, DefinitionStages.WithAppInsightsConfiguration, - DefinitionStages.WithOpenTelemetryConfiguration, DefinitionStages.WithZoneRedundant, - DefinitionStages.WithCustomDomainConfiguration, DefinitionStages.WithWorkloadProfiles, - DefinitionStages.WithKedaConfiguration, DefinitionStages.WithDaprConfiguration, - DefinitionStages.WithInfrastructureResourceGroup, DefinitionStages.WithPeerAuthentication { + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithKind, DefinitionStages.WithIdentity, + DefinitionStages.WithDaprAIInstrumentationKey, DefinitionStages.WithDaprAIConnectionString, + DefinitionStages.WithVnetConfiguration, DefinitionStages.WithAppLogsConfiguration, + DefinitionStages.WithAppInsightsConfiguration, DefinitionStages.WithOpenTelemetryConfiguration, + DefinitionStages.WithZoneRedundant, DefinitionStages.WithCustomDomainConfiguration, + DefinitionStages.WithWorkloadProfiles, DefinitionStages.WithKedaConfiguration, + DefinitionStages.WithDaprConfiguration, DefinitionStages.WithInfrastructureResourceGroup, + DefinitionStages.WithPeerAuthentication, DefinitionStages.WithPeerTrafficConfiguration { /** * Executes the create request. * @@ -533,6 +548,20 @@ interface WithPeerAuthentication { */ WithCreate withPeerAuthentication(ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication); } + + /** + * The stage of the ManagedEnvironment definition allowing to specify peerTrafficConfiguration. + */ + interface WithPeerTrafficConfiguration { + /** + * Specifies the peerTrafficConfiguration property: Peer traffic settings for the Managed Environment. + * + * @param peerTrafficConfiguration Peer traffic settings for the Managed Environment. + * @return the next definition stage. + */ + WithCreate withPeerTrafficConfiguration( + ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration); + } } /** @@ -550,7 +579,8 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithKind, UpdateSta UpdateStages.WithVnetConfiguration, UpdateStages.WithAppLogsConfiguration, UpdateStages.WithAppInsightsConfiguration, UpdateStages.WithOpenTelemetryConfiguration, UpdateStages.WithCustomDomainConfiguration, UpdateStages.WithWorkloadProfiles, - UpdateStages.WithKedaConfiguration, UpdateStages.WithDaprConfiguration, UpdateStages.WithPeerAuthentication { + UpdateStages.WithKedaConfiguration, UpdateStages.WithDaprConfiguration, UpdateStages.WithPeerAuthentication, + UpdateStages.WithPeerTrafficConfiguration { /** * Executes the update request. * @@ -762,6 +792,20 @@ interface WithPeerAuthentication { */ Update withPeerAuthentication(ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication); } + + /** + * The stage of the ManagedEnvironment update allowing to specify peerTrafficConfiguration. + */ + interface WithPeerTrafficConfiguration { + /** + * Specifies the peerTrafficConfiguration property: Peer traffic settings for the Managed Environment. + * + * @param peerTrafficConfiguration Peer traffic settings for the Managed Environment. + * @return the next definition stage. + */ + Update withPeerTrafficConfiguration( + ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration); + } } /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPrivateEndpointConnections.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPrivateEndpointConnections.java new file mode 100644 index 000000000000..7bb6dfb9d798 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPrivateEndpointConnections.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 ManagedEnvironmentPrivateEndpointConnections. + */ +public interface ManagedEnvironmentPrivateEndpointConnections { + /** + * List private endpoint connections for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified resource as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName); + + /** + * List private endpoint connections for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return list of private endpoint connection associated with the specified resource as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName, Context context); + + /** + * Get a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection for a given managed environment along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String environmentName, + String privateEndpointConnectionName, Context context); + + /** + * Get a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection for a given managed environment. + */ + PrivateEndpointConnection get(String resourceGroupName, String environmentName, + String privateEndpointConnectionName); + + /** + * Delete a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String environmentName, String privateEndpointConnectionName); + + /** + * Delete a private endpoint connection for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Azure + * resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String environmentName, String privateEndpointConnectionName, + Context context); + + /** + * Get a private endpoint connection for a given managed environment. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection for a given managed environment along with {@link Response}. + */ + PrivateEndpointConnection getById(String id); + + /** + * Get a private endpoint connection for a given managed environment. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a private endpoint connection for a given managed environment along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a private endpoint connection for a given managed environment. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a private endpoint connection for a given managed environment. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new PrivateEndpointConnection resource. + * + * @param name resource name. + * @return the first stage of the new PrivateEndpointConnection definition. + */ + PrivateEndpointConnection.DefinitionStages.Blank define(String name); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPrivateLinkResources.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPrivateLinkResources.java new file mode 100644 index 000000000000..480e3073148a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPrivateLinkResources.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 ManagedEnvironmentPrivateLinkResources. + */ +public interface ManagedEnvironmentPrivateLinkResources { + /** + * List private link resources for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName); + + /** + * List private link resources for a given managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a list of private link resources 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/ManagedEnvironmentPropertiesPeerTrafficConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerTrafficConfiguration.java new file mode 100644 index 000000000000..ebbb153ee410 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerTrafficConfiguration.java @@ -0,0 +1,58 @@ +// 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; + +/** + * Peer traffic settings for the Managed Environment. + */ +@Fluent +public final class ManagedEnvironmentPropertiesPeerTrafficConfiguration { + /* + * Peer traffic encryption settings for the Managed Environment + */ + @JsonProperty(value = "encryption") + private ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption encryption; + + /** + * Creates an instance of ManagedEnvironmentPropertiesPeerTrafficConfiguration class. + */ + public ManagedEnvironmentPropertiesPeerTrafficConfiguration() { + } + + /** + * Get the encryption property: Peer traffic encryption settings for the Managed Environment. + * + * @return the encryption value. + */ + public ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption encryption() { + return this.encryption; + } + + /** + * Set the encryption property: Peer traffic encryption settings for the Managed Environment. + * + * @param encryption the encryption value to set. + * @return the ManagedEnvironmentPropertiesPeerTrafficConfiguration object itself. + */ + public ManagedEnvironmentPropertiesPeerTrafficConfiguration + withEncryption(ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption encryption) { + this.encryption = encryption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (encryption() != null) { + encryption().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.java new file mode 100644 index 000000000000..a70cffa94be1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Peer traffic encryption settings for the Managed Environment. + */ +@Fluent +public final class ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption { + /* + * Boolean indicating whether the peer traffic encryption is enabled + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Creates an instance of ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption class. + */ + public ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption() { + } + + /** + * Get the enabled property: Boolean indicating whether the peer traffic encryption is enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Boolean indicating whether the peer traffic encryption is enabled. + * + * @param enabled the enabled value to set. + * @return the ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption object itself. + */ + public ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsCollection.java index 3ef87ab8253b..11b4fa518e2a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsCollection.java @@ -69,8 +69,9 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model ManagedEnvironmentsCollection")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model ManagedEnvironmentsCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentity.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentity.java index d4f2c257c015..e7ef7738116d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentity.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentity.java @@ -17,15 +17,13 @@ @Fluent public final class ManagedServiceIdentity { /* - * The service principal ID of the system assigned identity. This property will only be provided for a system - * assigned identity. + * The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. */ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private UUID principalId; /* - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned - * identity. + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. */ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private UUID tenantId; @@ -37,11 +35,7 @@ public final class ManagedServiceIdentity { private ManagedServiceIdentityType type; /* - * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys - * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ - * userAssignedIdentities/{identityName}. - * The dictionary values can be empty objects ({}) in requests. + * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. */ @JsonProperty(value = "userAssignedIdentities") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) @@ -64,8 +58,8 @@ public UUID principalId() { } /** - * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided - * for a system assigned identity. + * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for + * a system assigned identity. * * @return the tenantId value. */ @@ -128,8 +122,8 @@ public ManagedServiceIdentity withUserAssignedIdentities(Map { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NacosComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NacosComponent.java new file mode 100644 index 000000000000..973ffcba8fce --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NacosComponent.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; +import com.fasterxml.jackson.annotation.JsonTypeId; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** + * Nacos properties. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + property = "componentType", + defaultImpl = NacosComponent.class, + visible = true) +@JsonTypeName("Nacos") +@Fluent +public final class NacosComponent extends JavaComponentProperties { + /* + * Type of the Java Component. + */ + @JsonTypeId + @JsonProperty(value = "componentType", required = true) + private JavaComponentType componentType = JavaComponentType.NACOS; + + /* + * Java Component Ingress configurations. + */ + @JsonProperty(value = "ingress") + private JavaComponentIngress ingress; + + /** + * Creates an instance of NacosComponent class. + */ + public NacosComponent() { + } + + /** + * Get the componentType property: Type of the Java Component. + * + * @return the componentType value. + */ + @Override + public JavaComponentType componentType() { + return this.componentType; + } + + /** + * Get the ingress property: Java Component Ingress configurations. + * + * @return the ingress value. + */ + public JavaComponentIngress ingress() { + return this.ingress; + } + + /** + * Set the ingress property: Java Component Ingress configurations. + * + * @param ingress the ingress value to set. + * @return the NacosComponent object itself. + */ + public NacosComponent withIngress(JavaComponentIngress ingress) { + this.ingress = ingress; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public NacosComponent withConfigurations(List configurations) { + super.withConfigurations(configurations); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public NacosComponent withServiceBinds(List serviceBinds) { + super.withServiceBinds(serviceBinds); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (ingress() != null) { + ingress().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Nonce.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Nonce.java index 804cdd2e4555..227afd2278e5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Nonce.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Nonce.java @@ -13,8 +13,7 @@ @Fluent public final class Nonce { /* - * false if the nonce should not be validated while completing the login flow; otherwise, - * true. + * false if the nonce should not be validated while completing the login flow; otherwise, true. */ @JsonProperty(value = "validateNonce") private Boolean validateNonce; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectConfig.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectConfig.java index c35be9b8c3fe..fd25b9ce7d7f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectConfig.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectConfig.java @@ -129,8 +129,8 @@ public OpenIdConnectConfig withCertificationUri(String certificationUri) { } /** - * Get the wellKnownOpenIdConfiguration property: The endpoint that contains all the configuration endpoints for - * the provider. + * Get the wellKnownOpenIdConfiguration property: The endpoint that contains all the configuration endpoints for the + * provider. * * @return the wellKnownOpenIdConfiguration value. */ @@ -139,8 +139,8 @@ public String wellKnownOpenIdConfiguration() { } /** - * Set the wellKnownOpenIdConfiguration property: The endpoint that contains all the configuration endpoints for - * the provider. + * Set the wellKnownOpenIdConfiguration property: The endpoint that contains all the configuration endpoints for the + * provider. * * @param wellKnownOpenIdConfiguration the wellKnownOpenIdConfiguration value to set. * @return the OpenIdConnectConfig object itself. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectRegistration.java index 626b6c1fd21c..5d6f3f2c8c05 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectRegistration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectRegistration.java @@ -77,8 +77,8 @@ public OpenIdConnectRegistration withClientCredential(OpenIdConnectClientCredent } /** - * Get the openIdConnectConfiguration property: The configuration settings of the endpoints used for the custom - * Open ID Connect provider. + * Get the openIdConnectConfiguration property: The configuration settings of the endpoints used for the custom Open + * ID Connect provider. * * @return the openIdConnectConfiguration value. */ @@ -87,8 +87,8 @@ public OpenIdConnectConfig openIdConnectConfiguration() { } /** - * Set the openIdConnectConfiguration property: The configuration settings of the endpoints used for the custom - * Open ID Connect provider. + * Set the openIdConnectConfiguration property: The configuration settings of the endpoints used for the custom Open + * ID Connect provider. * * @param openIdConnectConfiguration the openIdConnectConfiguration value to set. * @return the OpenIdConnectRegistration object itself. 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 000000000000..3c858a73ae3e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchApplyStatus.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.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 000000000000..e353b2f0f696 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchCollection.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.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Container App patch collection. + */ +@Fluent +public final class PatchCollection { + /* + * 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 PatchCollection class. + */ + public PatchCollection() { + } + + /** + * 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 PatchCollection object itself. + */ + public PatchCollection 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 PatchCollection object itself. + */ + public PatchCollection 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.atError() + .log(new IllegalArgumentException("Missing required property value in model PatchCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PatchCollection.class); +} 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 000000000000..9e7ba74ee217 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetails.java @@ -0,0 +1,155 @@ +// 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 000000000000..89b001dd8884 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsNewLayer.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; + +/** + * 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 000000000000..5164fd589246 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsOldLayer.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; + +/** + * 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 000000000000..bdb458782b34 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchProperties.java @@ -0,0 +1,171 @@ +// 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; + +/** + * Top level properties that describes current states of the patch resource. + */ +@Fluent +public final class PatchProperties { + /* + * The Azure resource id of the target environment for the patch. + */ + @JsonProperty(value = "targetEnvironmentId") + private String targetEnvironmentId; + + /* + * The Azure resource id of the target container app for the patch. + */ + @JsonProperty(value = "targetContainerAppId") + private String targetContainerAppId; + + /* + * The Azure resource id of the target revision for the patch. + */ + @JsonProperty(value = "targetRevisionId") + private String targetRevisionId; + + /* + * The status of the patch operation. + */ + @JsonProperty(value = "patchApplyStatus", access = JsonProperty.Access.WRITE_ONLY) + private PatchApplyStatus patchApplyStatus; + + /* + * The UTC timestamp that describes when the patch object was created. + */ + @JsonProperty(value = "createdAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdAt; + + /* + * The UTC timestamp that describes when the patch object was last updated. + */ + @JsonProperty(value = "lastModifiedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastModifiedAt; + + /* + * 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 Azure resource id of the target environment for the patch. + * + * @return the targetEnvironmentId value. + */ + public String targetEnvironmentId() { + return this.targetEnvironmentId; + } + + /** + * Set the targetEnvironmentId property: The Azure resource 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 Azure resource id of the target container app for the patch. + * + * @return the targetContainerAppId value. + */ + public String targetContainerAppId() { + return this.targetContainerAppId; + } + + /** + * Set the targetContainerAppId property: The Azure resource 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 Azure resource id of the target revision for the patch. + * + * @return the targetRevisionId value. + */ + public String targetRevisionId() { + return this.targetRevisionId; + } + + /** + * Set the targetRevisionId property: The Azure resource 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 patchApplyStatus property: The status of the patch operation. + * + * @return the patchApplyStatus value. + */ + public PatchApplyStatus patchApplyStatus() { + return this.patchApplyStatus; + } + + /** + * Get the createdAt property: The UTC timestamp that describes when the patch object was created. + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.createdAt; + } + + /** + * Get the lastModifiedAt property: The UTC timestamp that describes when the patch object was last updated. + * + * @return the lastModifiedAt value. + */ + public OffsetDateTime lastModifiedAt() { + return this.lastModifiedAt; + } + + /** + * 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/PatchSkipConfig.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchSkipConfig.java new file mode 100644 index 000000000000..e90ee35e1771 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchSkipConfig.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The configuration for patcher to skip a patch or not. + */ +@Fluent +public final class PatchSkipConfig { + /* + * The flag to indicate whether to skip the patch or not. + */ + @JsonProperty(value = "skip") + private Boolean skip; + + /** + * Creates an instance of PatchSkipConfig class. + */ + public PatchSkipConfig() { + } + + /** + * Get the skip property: The flag to indicate whether to skip the patch or not. + * + * @return the skip value. + */ + public Boolean skip() { + return this.skip; + } + + /** + * Set the skip property: The flag to indicate whether to skip the patch or not. + * + * @param skip the skip value to set. + * @return the PatchSkipConfig object itself. + */ + public PatchSkipConfig withSkip(Boolean skip) { + this.skip = skip; + 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/PatchType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchType.java new file mode 100644 index 000000000000..d5140a25703a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchType.java @@ -0,0 +1,63 @@ +// 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/PatchingMode.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchingMode.java new file mode 100644 index 000000000000..45e2614585de --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchingMode.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Patching mode for the container app. Null or default in this field will be interpreted as Automatic by RP. Automatic + * mode will automatically apply available patches. Manual mode will require the user to manually apply patches. + * Disabled mode will stop patch detection and auto patching. + */ +public final class PatchingMode extends ExpandableStringEnum { + /** + * Static value Automatic for PatchingMode. + */ + public static final PatchingMode AUTOMATIC = fromString("Automatic"); + + /** + * Static value Manual for PatchingMode. + */ + public static final PatchingMode MANUAL = fromString("Manual"); + + /** + * Static value Disabled for PatchingMode. + */ + public static final PatchingMode DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of PatchingMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PatchingMode() { + } + + /** + * Creates or finds a PatchingMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding PatchingMode. + */ + @JsonCreator + public static PatchingMode fromString(String name) { + return fromString(name, PatchingMode.class); + } + + /** + * Gets known PatchingMode values. + * + * @return known PatchingMode values. + */ + public static Collection values() { + return values(PatchingMode.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PoolManagementType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PoolManagementType.java new file mode 100644 index 000000000000..21941ee91657 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PoolManagementType.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 pool management type of the session pool. + */ +public final class PoolManagementType extends ExpandableStringEnum { + /** + * Static value Manual for PoolManagementType. + */ + public static final PoolManagementType MANUAL = fromString("Manual"); + + /** + * Static value Dynamic for PoolManagementType. + */ + public static final PoolManagementType DYNAMIC = fromString("Dynamic"); + + /** + * Creates a new instance of PoolManagementType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PoolManagementType() { + } + + /** + * Creates or finds a PoolManagementType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PoolManagementType. + */ + @JsonCreator + public static PoolManagementType fromString(String name) { + return fromString(name, PoolManagementType.class); + } + + /** + * Gets known PoolManagementType values. + * + * @return known PoolManagementType values. + */ + public static Collection values() { + return values(PoolManagementType.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpoint.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpoint.java new file mode 100644 index 000000000000..5fedf3dc70b6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpoint.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.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Private Endpoint resource. + */ +@Immutable +public final class PrivateEndpoint { + /* + * The ARM identifier for Private Endpoint + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Creates an instance of PrivateEndpoint class. + */ + public PrivateEndpoint() { + } + + /** + * Get the id property: The ARM identifier for Private Endpoint. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * 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/PrivateEndpointConnection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnection.java new file mode 100644 index 000000000000..d0cd177423c3 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnection.java @@ -0,0 +1,245 @@ +// 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.PrivateEndpointConnectionInner; +import java.util.List; + +/** + * An immutable client-side representation of PrivateEndpointConnection. + */ +public interface PrivateEndpointConnection { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the groupIds property: The group ids for the private endpoint resource. + * + * @return the groupIds value. + */ + List groupIds(); + + /** + * Gets the privateEndpoint property: The resource of private end point. + * + * @return the privateEndpoint value. + */ + PrivateEndpoint privateEndpoint(); + + /** + * Gets the privateLinkServiceConnectionState property: A collection of information about the state of the + * connection between service consumer and provider. + * + * @return the privateLinkServiceConnectionState value. + */ + PrivateLinkServiceConnectionState privateLinkServiceConnectionState(); + + /** + * Gets the provisioningState property: The provisioning state of the private endpoint connection resource. + * + * @return the provisioningState value. + */ + PrivateEndpointConnectionProvisioningState provisioningState(); + + /** + * 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.PrivateEndpointConnectionInner object. + * + * @return the inner object. + */ + PrivateEndpointConnectionInner innerModel(); + + /** + * The entirety of the PrivateEndpointConnection definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The PrivateEndpointConnection definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the PrivateEndpointConnection definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the PrivateEndpointConnection definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, environmentName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @return the next definition stage. + */ + WithCreate withExistingManagedEnvironment(String resourceGroupName, String environmentName); + } + + /** + * The stage of the PrivateEndpointConnection definition which contains all the minimum required properties for + * the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithPrivateEndpoint, DefinitionStages.WithPrivateLinkServiceConnectionState { + /** + * Executes the create request. + * + * @return the created resource. + */ + PrivateEndpointConnection create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + PrivateEndpointConnection create(Context context); + } + + /** + * The stage of the PrivateEndpointConnection definition allowing to specify privateEndpoint. + */ + interface WithPrivateEndpoint { + /** + * Specifies the privateEndpoint property: The resource of private end point.. + * + * @param privateEndpoint The resource of private end point. + * @return the next definition stage. + */ + WithCreate withPrivateEndpoint(PrivateEndpoint privateEndpoint); + } + + /** + * The stage of the PrivateEndpointConnection definition allowing to specify privateLinkServiceConnectionState. + */ + interface WithPrivateLinkServiceConnectionState { + /** + * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of + * the connection between service consumer and provider.. + * + * @param privateLinkServiceConnectionState A collection of information about the state of the connection + * between service consumer and provider. + * @return the next definition stage. + */ + WithCreate withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState); + } + } + + /** + * Begins update for the PrivateEndpointConnection resource. + * + * @return the stage of resource update. + */ + PrivateEndpointConnection.Update update(); + + /** + * The template for PrivateEndpointConnection update. + */ + interface Update extends UpdateStages.WithPrivateEndpoint, UpdateStages.WithPrivateLinkServiceConnectionState { + /** + * Executes the update request. + * + * @return the updated resource. + */ + PrivateEndpointConnection apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + PrivateEndpointConnection apply(Context context); + } + + /** + * The PrivateEndpointConnection update stages. + */ + interface UpdateStages { + /** + * The stage of the PrivateEndpointConnection update allowing to specify privateEndpoint. + */ + interface WithPrivateEndpoint { + /** + * Specifies the privateEndpoint property: The resource of private end point.. + * + * @param privateEndpoint The resource of private end point. + * @return the next definition stage. + */ + Update withPrivateEndpoint(PrivateEndpoint privateEndpoint); + } + + /** + * The stage of the PrivateEndpointConnection update allowing to specify privateLinkServiceConnectionState. + */ + interface WithPrivateLinkServiceConnectionState { + /** + * Specifies the privateLinkServiceConnectionState property: A collection of information about the state of + * the connection between service consumer and provider.. + * + * @param privateLinkServiceConnectionState A collection of information about the state of the connection + * between service consumer and provider. + * @return the next definition stage. + */ + Update withPrivateLinkServiceConnectionState( + PrivateLinkServiceConnectionState privateLinkServiceConnectionState); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + PrivateEndpointConnection refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + PrivateEndpointConnection refresh(Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnectionListResult.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnectionListResult.java new file mode 100644 index 000000000000..128b000e7f09 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnectionListResult.java @@ -0,0 +1,74 @@ +// 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.PrivateEndpointConnectionInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * List of private endpoint connection associated with the specified resource. + */ +@Fluent +public final class PrivateEndpointConnectionListResult { + /* + * Array of private endpoint connections + */ + @JsonProperty(value = "value") + private List value; + + /* + * URL to get the next set of operation list results (if there are any). + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of PrivateEndpointConnectionListResult class. + */ + public PrivateEndpointConnectionListResult() { + } + + /** + * Get the value property: Array of private endpoint connections. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Array of private endpoint connections. + * + * @param value the value value to set. + * @return the PrivateEndpointConnectionListResult object itself. + */ + public PrivateEndpointConnectionListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: URL to get the next set of operation list results (if there are any). + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnectionProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnectionProvisioningState.java new file mode 100644 index 000000000000..1da7ec99791e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnectionProvisioningState.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.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The current provisioning state. + */ +public final class PrivateEndpointConnectionProvisioningState + extends ExpandableStringEnum { + /** + * Static value Succeeded for PrivateEndpointConnectionProvisioningState. + */ + public static final PrivateEndpointConnectionProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for PrivateEndpointConnectionProvisioningState. + */ + public static final PrivateEndpointConnectionProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for PrivateEndpointConnectionProvisioningState. + */ + public static final PrivateEndpointConnectionProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Waiting for PrivateEndpointConnectionProvisioningState. + */ + public static final PrivateEndpointConnectionProvisioningState WAITING = fromString("Waiting"); + + /** + * Static value Updating for PrivateEndpointConnectionProvisioningState. + */ + public static final PrivateEndpointConnectionProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for PrivateEndpointConnectionProvisioningState. + */ + public static final PrivateEndpointConnectionProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value Pending for PrivateEndpointConnectionProvisioningState. + */ + public static final PrivateEndpointConnectionProvisioningState PENDING = fromString("Pending"); + + /** + * Creates a new instance of PrivateEndpointConnectionProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateEndpointConnectionProvisioningState() { + } + + /** + * Creates or finds a PrivateEndpointConnectionProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding PrivateEndpointConnectionProvisioningState. + */ + @JsonCreator + public static PrivateEndpointConnectionProvisioningState fromString(String name) { + return fromString(name, PrivateEndpointConnectionProvisioningState.class); + } + + /** + * Gets known PrivateEndpointConnectionProvisioningState values. + * + * @return known PrivateEndpointConnectionProvisioningState values. + */ + public static Collection values() { + return values(PrivateEndpointConnectionProvisioningState.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointServiceConnectionStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointServiceConnectionStatus.java new file mode 100644 index 000000000000..61a99486e968 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointServiceConnectionStatus.java @@ -0,0 +1,64 @@ +// 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 private endpoint connection status. + */ +public final class PrivateEndpointServiceConnectionStatus + extends ExpandableStringEnum { + /** + * Static value Pending for PrivateEndpointServiceConnectionStatus. + */ + public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending"); + + /** + * Static value Approved for PrivateEndpointServiceConnectionStatus. + */ + public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved"); + + /** + * Static value Rejected for PrivateEndpointServiceConnectionStatus. + */ + public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected"); + + /** + * Static value Disconnected for PrivateEndpointServiceConnectionStatus. + */ + public static final PrivateEndpointServiceConnectionStatus DISCONNECTED = fromString("Disconnected"); + + /** + * Creates a new instance of PrivateEndpointServiceConnectionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PrivateEndpointServiceConnectionStatus() { + } + + /** + * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding PrivateEndpointServiceConnectionStatus. + */ + @JsonCreator + public static PrivateEndpointServiceConnectionStatus fromString(String name) { + return fromString(name, PrivateEndpointServiceConnectionStatus.class); + } + + /** + * Gets known PrivateEndpointServiceConnectionStatus values. + * + * @return known PrivateEndpointServiceConnectionStatus values. + */ + public static Collection values() { + return values(PrivateEndpointServiceConnectionStatus.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkResource.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkResource.java new file mode 100644 index 000000000000..43ea727b07d3 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkResource.java @@ -0,0 +1,70 @@ +// 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.PrivateLinkResourceInner; +import java.util.List; + +/** + * An immutable client-side representation of PrivateLinkResource. + */ +public interface PrivateLinkResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the groupId property: The private link resource group id. + * + * @return the groupId value. + */ + String groupId(); + + /** + * Gets the requiredMembers property: The private link resource required member names. + * + * @return the requiredMembers value. + */ + List requiredMembers(); + + /** + * Gets the requiredZoneNames property: The private link resource private link DNS zone name. + * + * @return the requiredZoneNames value. + */ + List requiredZoneNames(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.PrivateLinkResourceInner object. + * + * @return the inner object. + */ + PrivateLinkResourceInner innerModel(); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkResourceListResult.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkResourceListResult.java new file mode 100644 index 000000000000..f4778389ee81 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkResourceListResult.java @@ -0,0 +1,74 @@ +// 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.PrivateLinkResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * A list of private link resources. + */ +@Fluent +public final class PrivateLinkResourceListResult { + /* + * Array of private link resources + */ + @JsonProperty(value = "value") + private List value; + + /* + * URL to get the next set of operation list results (if there are any). + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of PrivateLinkResourceListResult class. + */ + public PrivateLinkResourceListResult() { + } + + /** + * Get the value property: Array of private link resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Array of private link resources. + * + * @param value the value value to set. + * @return the PrivateLinkResourceListResult object itself. + */ + public PrivateLinkResourceListResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: URL to get the next set of operation list results (if there are any). + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkServiceConnectionState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkServiceConnectionState.java new file mode 100644 index 000000000000..04b98b0d8ea5 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkServiceConnectionState.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.fasterxml.jackson.annotation.JsonProperty; + +/** + * A collection of information about the state of the connection between service consumer and provider. + */ +@Fluent +public final class PrivateLinkServiceConnectionState { + /* + * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. + */ + @JsonProperty(value = "status") + private PrivateEndpointServiceConnectionStatus status; + + /* + * The reason for approval/rejection of the connection. + */ + @JsonProperty(value = "description") + private String description; + + /* + * A message indicating if changes on the service provider require any updates on the consumer. + */ + @JsonProperty(value = "actionsRequired") + private String actionsRequired; + + /** + * Creates an instance of PrivateLinkServiceConnectionState class. + */ + public PrivateLinkServiceConnectionState() { + } + + /** + * Get the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the + * service. + * + * @return the status value. + */ + public PrivateEndpointServiceConnectionStatus status() { + return this.status; + } + + /** + * Set the status property: Indicates whether the connection has been Approved/Rejected/Removed by the owner of the + * service. + * + * @param status the status value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnectionStatus status) { + this.status = status; + return this; + } + + /** + * Get the description property: The reason for approval/rejection of the connection. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: The reason for approval/rejection of the connection. + * + * @param description the description value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the actionsRequired property: A message indicating if changes on the service provider require any updates on + * the consumer. + * + * @return the actionsRequired value. + */ + public String actionsRequired() { + return this.actionsRequired; + } + + /** + * Set the actionsRequired property: A message indicating if changes on the service provider require any updates on + * the consumer. + * + * @param actionsRequired the actionsRequired value to set. + * @return the PrivateLinkServiceConnectionState object itself. + */ + public PrivateLinkServiceConnectionState withActionsRequired(String actionsRequired) { + this.actionsRequired = actionsRequired; + 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/QueueScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QueueScaleRule.java index aef1fb3523f6..60c9c172d8c7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QueueScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QueueScaleRule.java @@ -13,6 +13,12 @@ */ @Fluent public final class QueueScaleRule { + /* + * Storage account name. required if using managed identity to authenticate + */ + @JsonProperty(value = "accountName") + private String accountName; + /* * Queue name. */ @@ -31,12 +37,38 @@ public final class QueueScaleRule { @JsonProperty(value = "auth") private List auth; + /* + * The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for system-assigned identity. + */ + @JsonProperty(value = "identity") + private String identity; + /** * Creates an instance of QueueScaleRule class. */ public QueueScaleRule() { } + /** + * Get the accountName property: Storage account name. required if using managed identity to authenticate. + * + * @return the accountName value. + */ + public String accountName() { + return this.accountName; + } + + /** + * Set the accountName property: Storage account name. required if using managed identity to authenticate. + * + * @param accountName the accountName value to set. + * @return the QueueScaleRule object itself. + */ + public QueueScaleRule withAccountName(String accountName) { + this.accountName = accountName; + return this; + } + /** * Get the queueName property: Queue name. * @@ -97,6 +129,28 @@ public QueueScaleRule withAuth(List auth) { return this; } + /** + * Get the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container + * App, or 'system' for system-assigned identity. + * + * @return the identity value. + */ + public String identity() { + return this.identity; + } + + /** + * Set the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container + * App, or 'system' for system-assigned identity. + * + * @param identity the identity value to set. + * @return the QueueScaleRule object itself. + */ + public QueueScaleRule withIdentity(String identity) { + this.identity = identity; + return this; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryCredentials.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryCredentials.java index a20caa49d999..a3edd93c1500 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryCredentials.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryCredentials.java @@ -31,8 +31,7 @@ public final class RegistryCredentials { private String passwordSecretRef; /* - * A Managed Identity to use to authenticate with Azure Container Registry. For user-assigned identities, use the - * full user-assigned identity Resource ID. For system-assigned identities, use 'system' + * A Managed Identity to use to authenticate with Azure Container Registry. For user-assigned identities, use the full user-assigned identity Resource ID. For system-assigned identities, use 'system' */ @JsonProperty(value = "identity") private String identity; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaExecutionStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaExecutionStatus.java new file mode 100644 index 000000000000..1451867b6140 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaExecutionStatus.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.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Container Apps Job execution replica status. + */ +@Fluent +public final class ReplicaExecutionStatus { + /* + * Replica Name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Containers in the execution replica + */ + @JsonProperty(value = "containers") + private List containers; + + /** + * Creates an instance of ReplicaExecutionStatus class. + */ + public ReplicaExecutionStatus() { + } + + /** + * Get the name property: Replica Name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Replica Name. + * + * @param name the name value to set. + * @return the ReplicaExecutionStatus object itself. + */ + public ReplicaExecutionStatus withName(String name) { + this.name = name; + return this; + } + + /** + * Get the containers property: Containers in the execution replica. + * + * @return the containers value. + */ + public List containers() { + return this.containers; + } + + /** + * Set the containers property: Containers in the execution replica. + * + * @param containers the containers value to set. + * @return the ReplicaExecutionStatus object itself. + */ + public ReplicaExecutionStatus withContainers(List containers) { + this.containers = containers; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (containers() != null) { + containers().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionCollection.java index a9efc54b85d5..6431c884fadf 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionCollection.java @@ -69,8 +69,8 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model RevisionCollection")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model RevisionCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Runtime.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Runtime.java new file mode 100644 index 000000000000..4db435c3aa6e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Runtime.java @@ -0,0 +1,86 @@ +// 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; + +/** + * Container App Runtime configuration. + */ +@Fluent +public final class Runtime { + /* + * Java app configuration + */ + @JsonProperty(value = "java") + private RuntimeJava java; + + /* + * .NET app configuration + */ + @JsonProperty(value = "dotnet") + private RuntimeDotnet dotnet; + + /** + * Creates an instance of Runtime class. + */ + public Runtime() { + } + + /** + * Get the java property: Java app configuration. + * + * @return the java value. + */ + public RuntimeJava java() { + return this.java; + } + + /** + * Set the java property: Java app configuration. + * + * @param java the java value to set. + * @return the Runtime object itself. + */ + public Runtime withJava(RuntimeJava java) { + this.java = java; + return this; + } + + /** + * Get the dotnet property: .NET app configuration. + * + * @return the dotnet value. + */ + public RuntimeDotnet dotnet() { + return this.dotnet; + } + + /** + * Set the dotnet property: .NET app configuration. + * + * @param dotnet the dotnet value to set. + * @return the Runtime object itself. + */ + public Runtime withDotnet(RuntimeDotnet dotnet) { + this.dotnet = dotnet; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (java() != null) { + java().validate(); + } + if (dotnet() != null) { + dotnet().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeDotnet.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeDotnet.java new file mode 100644 index 000000000000..c43f8333a4a0 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeDotnet.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * .NET app configuration. + */ +@Fluent +public final class RuntimeDotnet { + /* + * Auto configure the ASP.NET Core Data Protection feature + */ + @JsonProperty(value = "autoConfigureDataProtection") + private Boolean autoConfigureDataProtection; + + /** + * Creates an instance of RuntimeDotnet class. + */ + public RuntimeDotnet() { + } + + /** + * Get the autoConfigureDataProtection property: Auto configure the ASP.NET Core Data Protection feature. + * + * @return the autoConfigureDataProtection value. + */ + public Boolean autoConfigureDataProtection() { + return this.autoConfigureDataProtection; + } + + /** + * Set the autoConfigureDataProtection property: Auto configure the ASP.NET Core Data Protection feature. + * + * @param autoConfigureDataProtection the autoConfigureDataProtection value to set. + * @return the RuntimeDotnet object itself. + */ + public RuntimeDotnet withAutoConfigureDataProtection(Boolean autoConfigureDataProtection) { + this.autoConfigureDataProtection = autoConfigureDataProtection; + 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/RuntimeJava.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJava.java new file mode 100644 index 000000000000..ec54266dfc6d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJava.java @@ -0,0 +1,83 @@ +// 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; + +/** + * Java app configuration. + */ +@Fluent +public final class RuntimeJava { + /* + * Enable jmx core metrics for the java app + */ + @JsonProperty(value = "enableMetrics") + private Boolean enableMetrics; + + /* + * Diagnostic capabilities achieved by java agent + */ + @JsonProperty(value = "javaAgent") + private RuntimeJavaAgent javaAgent; + + /** + * Creates an instance of RuntimeJava class. + */ + public RuntimeJava() { + } + + /** + * Get the enableMetrics property: Enable jmx core metrics for the java app. + * + * @return the enableMetrics value. + */ + public Boolean enableMetrics() { + return this.enableMetrics; + } + + /** + * Set the enableMetrics property: Enable jmx core metrics for the java app. + * + * @param enableMetrics the enableMetrics value to set. + * @return the RuntimeJava object itself. + */ + public RuntimeJava withEnableMetrics(Boolean enableMetrics) { + this.enableMetrics = enableMetrics; + return this; + } + + /** + * Get the javaAgent property: Diagnostic capabilities achieved by java agent. + * + * @return the javaAgent value. + */ + public RuntimeJavaAgent javaAgent() { + return this.javaAgent; + } + + /** + * Set the javaAgent property: Diagnostic capabilities achieved by java agent. + * + * @param javaAgent the javaAgent value to set. + * @return the RuntimeJava object itself. + */ + public RuntimeJava withJavaAgent(RuntimeJavaAgent javaAgent) { + this.javaAgent = javaAgent; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (javaAgent() != null) { + javaAgent().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgent.java new file mode 100644 index 000000000000..d5dec506899d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgent.java @@ -0,0 +1,83 @@ +// 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; + +/** + * Diagnostic capabilities achieved by java agent. + */ +@Fluent +public final class RuntimeJavaAgent { + /* + * Enable java agent injection for the java app. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * Capabilities on the java logging scenario. + */ + @JsonProperty(value = "logging") + private RuntimeJavaAgentLogging logging; + + /** + * Creates an instance of RuntimeJavaAgent class. + */ + public RuntimeJavaAgent() { + } + + /** + * Get the enabled property: Enable java agent injection for the java app. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Enable java agent injection for the java app. + * + * @param enabled the enabled value to set. + * @return the RuntimeJavaAgent object itself. + */ + public RuntimeJavaAgent withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the logging property: Capabilities on the java logging scenario. + * + * @return the logging value. + */ + public RuntimeJavaAgentLogging logging() { + return this.logging; + } + + /** + * Set the logging property: Capabilities on the java logging scenario. + * + * @param logging the logging value to set. + * @return the RuntimeJavaAgent object itself. + */ + public RuntimeJavaAgent withLogging(RuntimeJavaAgentLogging logging) { + this.logging = logging; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (logging() != null) { + logging().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgentLogging.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgentLogging.java new file mode 100644 index 000000000000..49946dbafa49 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgentLogging.java @@ -0,0 +1,58 @@ +// 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; + +/** + * Capabilities on the java logging scenario. + */ +@Fluent +public final class RuntimeJavaAgentLogging { + /* + * Settings of the logger for the java app. + */ + @JsonProperty(value = "loggerSettings") + private List loggerSettings; + + /** + * Creates an instance of RuntimeJavaAgentLogging class. + */ + public RuntimeJavaAgentLogging() { + } + + /** + * Get the loggerSettings property: Settings of the logger for the java app. + * + * @return the loggerSettings value. + */ + public List loggerSettings() { + return this.loggerSettings; + } + + /** + * Set the loggerSettings property: Settings of the logger for the java app. + * + * @param loggerSettings the loggerSettings value to set. + * @return the RuntimeJavaAgentLogging object itself. + */ + public RuntimeJavaAgentLogging withLoggerSettings(List loggerSettings) { + this.loggerSettings = loggerSettings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (loggerSettings() != null) { + loggerSettings().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleConfiguration.java new file mode 100644 index 000000000000..8682fc60e4de --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleConfiguration.java @@ -0,0 +1,80 @@ +// 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; + +/** + * Scale configuration. + */ +@Fluent +public final class ScaleConfiguration { + /* + * The maximum count of sessions at the same time. + */ + @JsonProperty(value = "maxConcurrentSessions") + private Integer maxConcurrentSessions; + + /* + * The minimum count of ready session instances. + */ + @JsonProperty(value = "readySessionInstances") + private Integer readySessionInstances; + + /** + * Creates an instance of ScaleConfiguration class. + */ + public ScaleConfiguration() { + } + + /** + * Get the maxConcurrentSessions property: The maximum count of sessions at the same time. + * + * @return the maxConcurrentSessions value. + */ + public Integer maxConcurrentSessions() { + return this.maxConcurrentSessions; + } + + /** + * Set the maxConcurrentSessions property: The maximum count of sessions at the same time. + * + * @param maxConcurrentSessions the maxConcurrentSessions value to set. + * @return the ScaleConfiguration object itself. + */ + public ScaleConfiguration withMaxConcurrentSessions(Integer maxConcurrentSessions) { + this.maxConcurrentSessions = maxConcurrentSessions; + return this; + } + + /** + * Get the readySessionInstances property: The minimum count of ready session instances. + * + * @return the readySessionInstances value. + */ + public Integer readySessionInstances() { + return this.readySessionInstances; + } + + /** + * Set the readySessionInstances property: The minimum count of ready session instances. + * + * @param readySessionInstances the readySessionInstances value to set. + * @return the ScaleConfiguration object itself. + */ + public ScaleConfiguration withReadySessionInstances(Integer readySessionInstances) { + this.readySessionInstances = readySessionInstances; + 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/Secret.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Secret.java index 984042a638af..754477cb1d15 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Secret.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Secret.java @@ -25,8 +25,7 @@ public final class Secret { private String value; /* - * Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned - * identity. + * Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned identity. */ @JsonProperty(value = "identity") private String identity; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretAutoGenerated.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretAutoGenerated.java new file mode 100644 index 000000000000..b7ba5319635c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretAutoGenerated.java @@ -0,0 +1,80 @@ +// 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; + +/** + * Secret definition. + */ +@Fluent +public final class SecretAutoGenerated { + /* + * Secret Name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Secret Value. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Creates an instance of SecretAutoGenerated class. + */ + public SecretAutoGenerated() { + } + + /** + * Get the name property: Secret Name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Secret Name. + * + * @param name the name value to set. + * @return the SecretAutoGenerated object itself. + */ + public SecretAutoGenerated withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: Secret Value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Secret Value. + * + * @param value the value value to set. + * @return the SecretAutoGenerated object itself. + */ + public SecretAutoGenerated 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/Service.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Service.java index af26a69c5fe2..52ae74b77ade 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Service.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Service.java @@ -52,8 +52,7 @@ public Service withType(String type) { */ public void validate() { if (type() == null) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("Missing required property type in model Service")); + throw LOGGER.atError().log(new IllegalArgumentException("Missing required property type in model Service")); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionContainer.java new file mode 100644 index 000000000000..5aaf0af42044 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionContainer.java @@ -0,0 +1,191 @@ +// 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; + +/** + * Container definitions for the sessions of the session pool. + */ +@Fluent +public final class SessionContainer { + /* + * Container image tag. + */ + @JsonProperty(value = "image") + private String image; + + /* + * Custom container name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Container start command. + */ + @JsonProperty(value = "command") + private List command; + + /* + * Container start command arguments. + */ + @JsonProperty(value = "args") + private List args; + + /* + * Container environment variables. + */ + @JsonProperty(value = "env") + private List env; + + /* + * Container resource requirements. + */ + @JsonProperty(value = "resources") + private SessionContainerResources resources; + + /** + * Creates an instance of SessionContainer class. + */ + public SessionContainer() { + } + + /** + * Get the image property: Container image tag. + * + * @return the image value. + */ + public String image() { + return this.image; + } + + /** + * Set the image property: Container image tag. + * + * @param image the image value to set. + * @return the SessionContainer object itself. + */ + public SessionContainer withImage(String image) { + this.image = image; + return this; + } + + /** + * Get the name property: Custom container name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Custom container name. + * + * @param name the name value to set. + * @return the SessionContainer object itself. + */ + public SessionContainer withName(String name) { + this.name = name; + return this; + } + + /** + * Get the command property: Container start command. + * + * @return the command value. + */ + public List command() { + return this.command; + } + + /** + * Set the command property: Container start command. + * + * @param command the command value to set. + * @return the SessionContainer object itself. + */ + public SessionContainer withCommand(List command) { + this.command = command; + return this; + } + + /** + * Get the args property: Container start command arguments. + * + * @return the args value. + */ + public List args() { + return this.args; + } + + /** + * Set the args property: Container start command arguments. + * + * @param args the args value to set. + * @return the SessionContainer object itself. + */ + public SessionContainer withArgs(List args) { + this.args = args; + return this; + } + + /** + * Get the env property: Container environment variables. + * + * @return the env value. + */ + public List env() { + return this.env; + } + + /** + * Set the env property: Container environment variables. + * + * @param env the env value to set. + * @return the SessionContainer object itself. + */ + public SessionContainer withEnv(List env) { + this.env = env; + return this; + } + + /** + * Get the resources property: Container resource requirements. + * + * @return the resources value. + */ + public SessionContainerResources resources() { + return this.resources; + } + + /** + * Set the resources property: Container resource requirements. + * + * @param resources the resources value to set. + * @return the SessionContainer object itself. + */ + public SessionContainer withResources(SessionContainerResources resources) { + this.resources = resources; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (env() != null) { + env().forEach(e -> e.validate()); + } + if (resources() != null) { + resources().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionContainerResources.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionContainerResources.java new file mode 100644 index 000000000000..2db458ddcf86 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionContainerResources.java @@ -0,0 +1,80 @@ +// 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; + +/** + * Container resource requirements for sessions of the session pool. + */ +@Fluent +public final class SessionContainerResources { + /* + * Required CPU in cores, e.g. 0.5 + */ + @JsonProperty(value = "cpu") + private Double cpu; + + /* + * Required memory, e.g. "250Mb" + */ + @JsonProperty(value = "memory") + private String memory; + + /** + * Creates an instance of SessionContainerResources class. + */ + public SessionContainerResources() { + } + + /** + * Get the cpu property: Required CPU in cores, e.g. 0.5. + * + * @return the cpu value. + */ + public Double cpu() { + return this.cpu; + } + + /** + * Set the cpu property: Required CPU in cores, e.g. 0.5. + * + * @param cpu the cpu value to set. + * @return the SessionContainerResources object itself. + */ + public SessionContainerResources withCpu(Double cpu) { + this.cpu = cpu; + return this; + } + + /** + * Get the memory property: Required memory, e.g. "250Mb". + * + * @return the memory value. + */ + public String memory() { + return this.memory; + } + + /** + * Set the memory property: Required memory, e.g. "250Mb". + * + * @param memory the memory value to set. + * @return the SessionContainerResources object itself. + */ + public SessionContainerResources withMemory(String memory) { + this.memory = memory; + 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/SessionIngress.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionIngress.java new file mode 100644 index 000000000000..cb26e2cba313 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionIngress.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Session pool ingress configuration. + */ +@Fluent +public final class SessionIngress { + /* + * Target port in containers for traffic from ingress + */ + @JsonProperty(value = "targetPort") + private Integer targetPort; + + /** + * Creates an instance of SessionIngress class. + */ + public SessionIngress() { + } + + /** + * Get the targetPort property: Target port in containers for traffic from ingress. + * + * @return the targetPort value. + */ + public Integer targetPort() { + return this.targetPort; + } + + /** + * Set the targetPort property: Target port in containers for traffic from ingress. + * + * @param targetPort the targetPort value to set. + * @return the SessionIngress object itself. + */ + public SessionIngress withTargetPort(Integer targetPort) { + this.targetPort = targetPort; + 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/SessionNetworkConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionNetworkConfiguration.java new file mode 100644 index 000000000000..b5beb3304f6c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionNetworkConfiguration.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Session network configuration. + */ +@Fluent +public final class SessionNetworkConfiguration { + /* + * Network status for the sessions. + */ + @JsonProperty(value = "status") + private SessionNetworkStatus status; + + /** + * Creates an instance of SessionNetworkConfiguration class. + */ + public SessionNetworkConfiguration() { + } + + /** + * Get the status property: Network status for the sessions. + * + * @return the status value. + */ + public SessionNetworkStatus status() { + return this.status; + } + + /** + * Set the status property: Network status for the sessions. + * + * @param status the status value to set. + * @return the SessionNetworkConfiguration object itself. + */ + public SessionNetworkConfiguration withStatus(SessionNetworkStatus status) { + this.status = status; + 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/SessionNetworkStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionNetworkStatus.java new file mode 100644 index 000000000000..78dc8c6e1989 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionNetworkStatus.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; + +/** + * Network status for the sessions. + */ +public final class SessionNetworkStatus extends ExpandableStringEnum { + /** + * Static value EgressEnabled for SessionNetworkStatus. + */ + public static final SessionNetworkStatus EGRESS_ENABLED = fromString("EgressEnabled"); + + /** + * Static value EgressDisabled for SessionNetworkStatus. + */ + public static final SessionNetworkStatus EGRESS_DISABLED = fromString("EgressDisabled"); + + /** + * Creates a new instance of SessionNetworkStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SessionNetworkStatus() { + } + + /** + * Creates or finds a SessionNetworkStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding SessionNetworkStatus. + */ + @JsonCreator + public static SessionNetworkStatus fromString(String name) { + return fromString(name, SessionNetworkStatus.class); + } + + /** + * Gets known SessionNetworkStatus values. + * + * @return known SessionNetworkStatus values. + */ + public static Collection values() { + return values(SessionNetworkStatus.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPool.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPool.java new file mode 100644 index 000000000000..6cc8fd6cb7ad --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPool.java @@ -0,0 +1,481 @@ +// 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.SessionPoolInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of SessionPool. + */ +public interface SessionPool { + /** + * 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 systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the environmentId property: Resource ID of the session pool's environment. + * + * @return the environmentId value. + */ + String environmentId(); + + /** + * Gets the containerType property: The container type of the sessions. + * + * @return the containerType value. + */ + ContainerType containerType(); + + /** + * Gets the poolManagementType property: The pool management type of the session pool. + * + * @return the poolManagementType value. + */ + PoolManagementType poolManagementType(); + + /** + * Gets the nodeCount property: The number of nodes the session pool is using. + * + * @return the nodeCount value. + */ + Integer nodeCount(); + + /** + * Gets the scaleConfiguration property: The scale configuration of the session pool. + * + * @return the scaleConfiguration value. + */ + ScaleConfiguration scaleConfiguration(); + + /** + * Gets the secrets property: The secrets of the session pool. + * + * @return the secrets value. + */ + List secrets(); + + /** + * Gets the dynamicPoolConfiguration property: The pool configuration if the poolManagementType is dynamic. + * + * @return the dynamicPoolConfiguration value. + */ + DynamicPoolConfiguration dynamicPoolConfiguration(); + + /** + * Gets the customContainerTemplate property: The custom container configuration if the containerType is + * CustomContainer. + * + * @return the customContainerTemplate value. + */ + CustomContainerTemplate customContainerTemplate(); + + /** + * Gets the sessionNetworkConfiguration property: The network configuration of the sessions in the session pool. + * + * @return the sessionNetworkConfiguration value. + */ + SessionNetworkConfiguration sessionNetworkConfiguration(); + + /** + * Gets the poolManagementEndpoint property: The endpoint to manage the pool. + * + * @return the poolManagementEndpoint value. + */ + String poolManagementEndpoint(); + + /** + * Gets the provisioningState property: Provisioning state of the session pool. + * + * @return the provisioningState value. + */ + SessionPoolProvisioningState provisioningState(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.SessionPoolInner object. + * + * @return the inner object. + */ + SessionPoolInner innerModel(); + + /** + * The entirety of the SessionPool definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The SessionPool definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the SessionPool definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the SessionPool 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 SessionPool 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 SessionPool 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.WithEnvironmentId, DefinitionStages.WithContainerType, + DefinitionStages.WithPoolManagementType, DefinitionStages.WithScaleConfiguration, + DefinitionStages.WithSecrets, DefinitionStages.WithDynamicPoolConfiguration, + DefinitionStages.WithCustomContainerTemplate, DefinitionStages.WithSessionNetworkConfiguration { + /** + * Executes the create request. + * + * @return the created resource. + */ + SessionPool create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + SessionPool create(Context context); + } + + /** + * The stage of the SessionPool 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 SessionPool definition allowing to specify environmentId. + */ + interface WithEnvironmentId { + /** + * Specifies the environmentId property: Resource ID of the session pool's environment.. + * + * @param environmentId Resource ID of the session pool's environment. + * @return the next definition stage. + */ + WithCreate withEnvironmentId(String environmentId); + } + + /** + * The stage of the SessionPool definition allowing to specify containerType. + */ + interface WithContainerType { + /** + * Specifies the containerType property: The container type of the sessions.. + * + * @param containerType The container type of the sessions. + * @return the next definition stage. + */ + WithCreate withContainerType(ContainerType containerType); + } + + /** + * The stage of the SessionPool definition allowing to specify poolManagementType. + */ + interface WithPoolManagementType { + /** + * Specifies the poolManagementType property: The pool management type of the session pool.. + * + * @param poolManagementType The pool management type of the session pool. + * @return the next definition stage. + */ + WithCreate withPoolManagementType(PoolManagementType poolManagementType); + } + + /** + * The stage of the SessionPool definition allowing to specify scaleConfiguration. + */ + interface WithScaleConfiguration { + /** + * Specifies the scaleConfiguration property: The scale configuration of the session pool.. + * + * @param scaleConfiguration The scale configuration of the session pool. + * @return the next definition stage. + */ + WithCreate withScaleConfiguration(ScaleConfiguration scaleConfiguration); + } + + /** + * The stage of the SessionPool definition allowing to specify secrets. + */ + interface WithSecrets { + /** + * Specifies the secrets property: The secrets of the session pool.. + * + * @param secrets The secrets of the session pool. + * @return the next definition stage. + */ + WithCreate withSecrets(List secrets); + } + + /** + * The stage of the SessionPool definition allowing to specify dynamicPoolConfiguration. + */ + interface WithDynamicPoolConfiguration { + /** + * Specifies the dynamicPoolConfiguration property: The pool configuration if the poolManagementType is + * dynamic.. + * + * @param dynamicPoolConfiguration The pool configuration if the poolManagementType is dynamic. + * @return the next definition stage. + */ + WithCreate withDynamicPoolConfiguration(DynamicPoolConfiguration dynamicPoolConfiguration); + } + + /** + * The stage of the SessionPool definition allowing to specify customContainerTemplate. + */ + interface WithCustomContainerTemplate { + /** + * Specifies the customContainerTemplate property: The custom container configuration if the containerType + * is CustomContainer.. + * + * @param customContainerTemplate The custom container configuration if the containerType is + * CustomContainer. + * @return the next definition stage. + */ + WithCreate withCustomContainerTemplate(CustomContainerTemplate customContainerTemplate); + } + + /** + * The stage of the SessionPool definition allowing to specify sessionNetworkConfiguration. + */ + interface WithSessionNetworkConfiguration { + /** + * Specifies the sessionNetworkConfiguration property: The network configuration of the sessions in the + * session pool.. + * + * @param sessionNetworkConfiguration The network configuration of the sessions in the session pool. + * @return the next definition stage. + */ + WithCreate withSessionNetworkConfiguration(SessionNetworkConfiguration sessionNetworkConfiguration); + } + } + + /** + * Begins update for the SessionPool resource. + * + * @return the stage of resource update. + */ + SessionPool.Update update(); + + /** + * The template for SessionPool update. + */ + interface Update extends UpdateStages.WithScaleConfiguration, UpdateStages.WithSecrets, + UpdateStages.WithDynamicPoolConfiguration, UpdateStages.WithCustomContainerTemplate, + UpdateStages.WithSessionNetworkConfiguration { + /** + * Executes the update request. + * + * @return the updated resource. + */ + SessionPool apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + SessionPool apply(Context context); + } + + /** + * The SessionPool update stages. + */ + interface UpdateStages { + /** + * The stage of the SessionPool update allowing to specify scaleConfiguration. + */ + interface WithScaleConfiguration { + /** + * Specifies the scaleConfiguration property: The scale configuration of the session pool.. + * + * @param scaleConfiguration The scale configuration of the session pool. + * @return the next definition stage. + */ + Update withScaleConfiguration(ScaleConfiguration scaleConfiguration); + } + + /** + * The stage of the SessionPool update allowing to specify secrets. + */ + interface WithSecrets { + /** + * Specifies the secrets property: The secrets of the session pool.. + * + * @param secrets The secrets of the session pool. + * @return the next definition stage. + */ + Update withSecrets(List secrets); + } + + /** + * The stage of the SessionPool update allowing to specify dynamicPoolConfiguration. + */ + interface WithDynamicPoolConfiguration { + /** + * Specifies the dynamicPoolConfiguration property: The pool configuration if the poolManagementType is + * dynamic.. + * + * @param dynamicPoolConfiguration The pool configuration if the poolManagementType is dynamic. + * @return the next definition stage. + */ + Update withDynamicPoolConfiguration(DynamicPoolConfiguration dynamicPoolConfiguration); + } + + /** + * The stage of the SessionPool update allowing to specify customContainerTemplate. + */ + interface WithCustomContainerTemplate { + /** + * Specifies the customContainerTemplate property: The custom container configuration if the containerType + * is CustomContainer.. + * + * @param customContainerTemplate The custom container configuration if the containerType is + * CustomContainer. + * @return the next definition stage. + */ + Update withCustomContainerTemplate(CustomContainerTemplate customContainerTemplate); + } + + /** + * The stage of the SessionPool update allowing to specify sessionNetworkConfiguration. + */ + interface WithSessionNetworkConfiguration { + /** + * Specifies the sessionNetworkConfiguration property: The network configuration of the sessions in the + * session pool.. + * + * @param sessionNetworkConfiguration The network configuration of the sessions in the session pool. + * @return the next definition stage. + */ + Update withSessionNetworkConfiguration(SessionNetworkConfiguration sessionNetworkConfiguration); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + SessionPool refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + SessionPool refresh(Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolCollection.java new file mode 100644 index 000000000000..3de578034455 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolCollection.java @@ -0,0 +1,80 @@ +// 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.SessionPoolInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Session pool collection Azure resource. + */ +@Fluent +public final class SessionPoolCollection { + /* + * Collection of resources. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * Link to next page of resources. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of SessionPoolCollection class. + */ + public SessionPoolCollection() { + } + + /** + * Get the value property: Collection of resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Collection of resources. + * + * @param value the value value to set. + * @return the SessionPoolCollection object itself. + */ + public SessionPoolCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model SessionPoolCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(SessionPoolCollection.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolProvisioningState.java new file mode 100644 index 000000000000..b16171f4e561 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolProvisioningState.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; + +/** + * Provisioning state of the session pool. + */ +public final class SessionPoolProvisioningState extends ExpandableStringEnum { + /** + * Static value InProgress for SessionPoolProvisioningState. + */ + public static final SessionPoolProvisioningState IN_PROGRESS = fromString("InProgress"); + + /** + * Static value Succeeded for SessionPoolProvisioningState. + */ + public static final SessionPoolProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for SessionPoolProvisioningState. + */ + public static final SessionPoolProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for SessionPoolProvisioningState. + */ + public static final SessionPoolProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Deleting for SessionPoolProvisioningState. + */ + public static final SessionPoolProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates a new instance of SessionPoolProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SessionPoolProvisioningState() { + } + + /** + * Creates or finds a SessionPoolProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding SessionPoolProvisioningState. + */ + @JsonCreator + public static SessionPoolProvisioningState fromString(String name) { + return fromString(name, SessionPoolProvisioningState.class); + } + + /** + * Gets known SessionPoolProvisioningState values. + * + * @return known SessionPoolProvisioningState values. + */ + public static Collection values() { + return values(SessionPoolProvisioningState.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolUpdatableProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolUpdatableProperties.java new file mode 100644 index 000000000000..a7ee6acbe551 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolUpdatableProperties.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.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.fluent.models.SessionPoolUpdatablePropertiesProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Container App session pool updatable properties. + */ +@Fluent +public final class SessionPoolUpdatableProperties { + /* + * Session pool resource specific updatable properties. + */ + @JsonProperty(value = "properties") + private SessionPoolUpdatablePropertiesProperties innerProperties; + + /** + * Creates an instance of SessionPoolUpdatableProperties class. + */ + public SessionPoolUpdatableProperties() { + } + + /** + * Get the innerProperties property: Session pool resource specific updatable properties. + * + * @return the innerProperties value. + */ + private SessionPoolUpdatablePropertiesProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the scaleConfiguration property: The scale configuration of the session pool. + * + * @return the scaleConfiguration value. + */ + public ScaleConfiguration scaleConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().scaleConfiguration(); + } + + /** + * Set the scaleConfiguration property: The scale configuration of the session pool. + * + * @param scaleConfiguration the scaleConfiguration value to set. + * @return the SessionPoolUpdatableProperties object itself. + */ + public SessionPoolUpdatableProperties withScaleConfiguration(ScaleConfiguration scaleConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new SessionPoolUpdatablePropertiesProperties(); + } + this.innerProperties().withScaleConfiguration(scaleConfiguration); + return this; + } + + /** + * Get the secrets property: The secrets of the session pool. + * + * @return the secrets value. + */ + public List secrets() { + return this.innerProperties() == null ? null : this.innerProperties().secrets(); + } + + /** + * Set the secrets property: The secrets of the session pool. + * + * @param secrets the secrets value to set. + * @return the SessionPoolUpdatableProperties object itself. + */ + public SessionPoolUpdatableProperties withSecrets(List secrets) { + if (this.innerProperties() == null) { + this.innerProperties = new SessionPoolUpdatablePropertiesProperties(); + } + this.innerProperties().withSecrets(secrets); + return this; + } + + /** + * Get the dynamicPoolConfiguration property: The pool configuration if the poolManagementType is dynamic. + * + * @return the dynamicPoolConfiguration value. + */ + public DynamicPoolConfiguration dynamicPoolConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().dynamicPoolConfiguration(); + } + + /** + * Set the dynamicPoolConfiguration property: The pool configuration if the poolManagementType is dynamic. + * + * @param dynamicPoolConfiguration the dynamicPoolConfiguration value to set. + * @return the SessionPoolUpdatableProperties object itself. + */ + public SessionPoolUpdatableProperties + withDynamicPoolConfiguration(DynamicPoolConfiguration dynamicPoolConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new SessionPoolUpdatablePropertiesProperties(); + } + this.innerProperties().withDynamicPoolConfiguration(dynamicPoolConfiguration); + return this; + } + + /** + * Get the customContainerTemplate property: The custom container configuration if the containerType is + * CustomContainer. + * + * @return the customContainerTemplate value. + */ + public CustomContainerTemplate customContainerTemplate() { + return this.innerProperties() == null ? null : this.innerProperties().customContainerTemplate(); + } + + /** + * Set the customContainerTemplate property: The custom container configuration if the containerType is + * CustomContainer. + * + * @param customContainerTemplate the customContainerTemplate value to set. + * @return the SessionPoolUpdatableProperties object itself. + */ + public SessionPoolUpdatableProperties withCustomContainerTemplate(CustomContainerTemplate customContainerTemplate) { + if (this.innerProperties() == null) { + this.innerProperties = new SessionPoolUpdatablePropertiesProperties(); + } + this.innerProperties().withCustomContainerTemplate(customContainerTemplate); + return this; + } + + /** + * Get the sessionNetworkConfiguration property: The network configuration of the sessions in the session pool. + * + * @return the sessionNetworkConfiguration value. + */ + public SessionNetworkConfiguration sessionNetworkConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().sessionNetworkConfiguration(); + } + + /** + * Set the sessionNetworkConfiguration property: The network configuration of the sessions in the session pool. + * + * @param sessionNetworkConfiguration the sessionNetworkConfiguration value to set. + * @return the SessionPoolUpdatableProperties object itself. + */ + public SessionPoolUpdatableProperties + withSessionNetworkConfiguration(SessionNetworkConfiguration sessionNetworkConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new SessionPoolUpdatablePropertiesProperties(); + } + this.innerProperties().withSessionNetworkConfiguration(sessionNetworkConfiguration); + return this; + } + + /** + * 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/models/SessionRegistryCredentials.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionRegistryCredentials.java new file mode 100644 index 000000000000..6f740e4779d4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionRegistryCredentials.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; + +/** + * Session pool private registry credentials. + */ +@Fluent +public final class SessionRegistryCredentials { + /* + * Container registry server. + */ + @JsonProperty(value = "registryServer") + private String registryServer; + + /* + * Container registry username. + */ + @JsonProperty(value = "username") + private String username; + + /* + * The name of the secret that contains the registry login password + */ + @JsonProperty(value = "passwordSecretRef") + private String passwordSecretRef; + + /** + * Creates an instance of SessionRegistryCredentials class. + */ + public SessionRegistryCredentials() { + } + + /** + * Get the registryServer property: Container registry server. + * + * @return the registryServer value. + */ + public String registryServer() { + return this.registryServer; + } + + /** + * Set the registryServer property: Container registry server. + * + * @param registryServer the registryServer value to set. + * @return the SessionRegistryCredentials object itself. + */ + public SessionRegistryCredentials withRegistryServer(String registryServer) { + this.registryServer = registryServer; + return this; + } + + /** + * Get the username property: Container registry username. + * + * @return the username value. + */ + public String username() { + return this.username; + } + + /** + * Set the username property: Container registry username. + * + * @param username the username value to set. + * @return the SessionRegistryCredentials object itself. + */ + public SessionRegistryCredentials withUsername(String username) { + this.username = username; + return this; + } + + /** + * Get the passwordSecretRef property: The name of the secret that contains the registry login password. + * + * @return the passwordSecretRef value. + */ + public String passwordSecretRef() { + return this.passwordSecretRef; + } + + /** + * Set the passwordSecretRef property: The name of the secret that contains the registry login password. + * + * @param passwordSecretRef the passwordSecretRef value to set. + * @return the SessionRegistryCredentials object itself. + */ + public SessionRegistryCredentials withPasswordSecretRef(String passwordSecretRef) { + this.passwordSecretRef = passwordSecretRef; + 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/SourceControlCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlCollection.java index 652bfc58a835..5fbba7e732a7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlCollection.java @@ -69,8 +69,8 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property value in model SourceControlCollection")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property value in model SourceControlCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringBootAdminComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringBootAdminComponent.java new file mode 100644 index 000000000000..b494f83f0076 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringBootAdminComponent.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; +import com.fasterxml.jackson.annotation.JsonTypeId; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** + * Spring Boot Admin properties. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + property = "componentType", + defaultImpl = SpringBootAdminComponent.class, + visible = true) +@JsonTypeName("SpringBootAdmin") +@Fluent +public final class SpringBootAdminComponent extends JavaComponentProperties { + /* + * Type of the Java Component. + */ + @JsonTypeId + @JsonProperty(value = "componentType", required = true) + private JavaComponentType componentType = JavaComponentType.SPRING_BOOT_ADMIN; + + /* + * Java Component Ingress configurations. + */ + @JsonProperty(value = "ingress") + private JavaComponentIngress ingress; + + /** + * Creates an instance of SpringBootAdminComponent class. + */ + public SpringBootAdminComponent() { + } + + /** + * Get the componentType property: Type of the Java Component. + * + * @return the componentType value. + */ + @Override + public JavaComponentType componentType() { + return this.componentType; + } + + /** + * Get the ingress property: Java Component Ingress configurations. + * + * @return the ingress value. + */ + public JavaComponentIngress ingress() { + return this.ingress; + } + + /** + * Set the ingress property: Java Component Ingress configurations. + * + * @param ingress the ingress value to set. + * @return the SpringBootAdminComponent object itself. + */ + public SpringBootAdminComponent withIngress(JavaComponentIngress ingress) { + this.ingress = ingress; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpringBootAdminComponent withConfigurations(List configurations) { + super.withConfigurations(configurations); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpringBootAdminComponent withServiceBinds(List serviceBinds) { + super.withServiceBinds(serviceBinds); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (ingress() != null) { + ingress().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudConfigComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudConfigComponent.java new file mode 100644 index 000000000000..5b5b3e610b38 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudConfigComponent.java @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeId; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** + * Spring Cloud Config properties. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + property = "componentType", + defaultImpl = SpringCloudConfigComponent.class, + visible = true) +@JsonTypeName("SpringCloudConfig") +@Fluent +public final class SpringCloudConfigComponent extends JavaComponentProperties { + /* + * Type of the Java Component. + */ + @JsonTypeId + @JsonProperty(value = "componentType", required = true) + private JavaComponentType componentType = JavaComponentType.SPRING_CLOUD_CONFIG; + + /** + * Creates an instance of SpringCloudConfigComponent class. + */ + public SpringCloudConfigComponent() { + } + + /** + * Get the componentType property: Type of the Java Component. + * + * @return the componentType value. + */ + @Override + public JavaComponentType componentType() { + return this.componentType; + } + + /** + * {@inheritDoc} + */ + @Override + public SpringCloudConfigComponent withConfigurations(List configurations) { + super.withConfigurations(configurations); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpringCloudConfigComponent withServiceBinds(List serviceBinds) { + super.withServiceBinds(serviceBinds); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudEurekaComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudEurekaComponent.java new file mode 100644 index 000000000000..d0d65b4bd479 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudEurekaComponent.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; +import com.fasterxml.jackson.annotation.JsonTypeId; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** + * Spring Cloud Eureka properties. + */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + property = "componentType", + defaultImpl = SpringCloudEurekaComponent.class, + visible = true) +@JsonTypeName("SpringCloudEureka") +@Fluent +public final class SpringCloudEurekaComponent extends JavaComponentProperties { + /* + * Type of the Java Component. + */ + @JsonTypeId + @JsonProperty(value = "componentType", required = true) + private JavaComponentType componentType = JavaComponentType.SPRING_CLOUD_EUREKA; + + /* + * Java Component Ingress configurations. + */ + @JsonProperty(value = "ingress") + private JavaComponentIngress ingress; + + /** + * Creates an instance of SpringCloudEurekaComponent class. + */ + public SpringCloudEurekaComponent() { + } + + /** + * Get the componentType property: Type of the Java Component. + * + * @return the componentType value. + */ + @Override + public JavaComponentType componentType() { + return this.componentType; + } + + /** + * Get the ingress property: Java Component Ingress configurations. + * + * @return the ingress value. + */ + public JavaComponentIngress ingress() { + return this.ingress; + } + + /** + * Set the ingress property: Java Component Ingress configurations. + * + * @param ingress the ingress value to set. + * @return the SpringCloudEurekaComponent object itself. + */ + public SpringCloudEurekaComponent withIngress(JavaComponentIngress ingress) { + this.ingress = ingress; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpringCloudEurekaComponent withConfigurations(List configurations) { + super.withConfigurations(configurations); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpringCloudEurekaComponent withServiceBinds(List serviceBinds) { + super.withServiceBinds(serviceBinds); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (ingress() != null) { + ingress().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java index d8b26124d95c..44ba2d8c208a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java @@ -28,6 +28,12 @@ public final class TcpScaleRule { @JsonProperty(value = "auth") private List auth; + /* + * The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for system-assigned identity. + */ + @JsonProperty(value = "identity") + private String identity; + /** * Creates an instance of TcpScaleRule class. */ @@ -74,6 +80,28 @@ public TcpScaleRule withAuth(List auth) { return this; } + /** + * Get the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container + * App, or 'system' for system-assigned identity. + * + * @return the identity value. + */ + public String identity() { + return this.identity; + } + + /** + * Set the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container + * App, or 'system' for system-assigned identity. + * + * @param identity the identity value to set. + * @return the TcpScaleRule object itself. + */ + public TcpScaleRule withIdentity(String identity) { + this.identity = identity; + return this; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java index a5b91a04bc38..4adbad2f745c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java @@ -22,10 +22,7 @@ public final class Template { private String revisionSuffix; /* - * Optional duration in seconds the Container App Instance needs to terminate gracefully. Value must be - * non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut - * down). If this value is nil, the default grace period will be used instead. Set this value longer than the - * expected cleanup time for your process. Defaults to 30 seconds. + * Optional duration in seconds the Container App Instance needs to terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. Set this value longer than the expected cleanup time for your process. Defaults to 30 seconds. */ @JsonProperty(value = "terminationGracePeriodSeconds") private Long terminationGracePeriodSeconds; 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 index 3214e366a176..521bc906a783 100644 --- 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 @@ -13,9 +13,8 @@ @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. + * 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; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Twitter.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Twitter.java index a23d0f0b96ff..90a1d1039e7c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Twitter.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Twitter.java @@ -13,8 +13,7 @@ @Fluent public final class Twitter { /* - * false if the Twitter provider should not be enabled despite the set registration; otherwise, - * true. + * false if the Twitter provider should not be enabled despite the set registration; otherwise, true. */ @JsonProperty(value = "enabled") private Boolean enabled; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VnetConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VnetConfiguration.java index acc516dd8093..99264a91a1bd 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VnetConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VnetConfiguration.java @@ -13,8 +13,7 @@ @Fluent public final class VnetConfiguration { /* - * Boolean indicating the environment only has an internal load balancer. These environments do not have a public - * static IP resource. They must provide infrastructureSubnetId if enabling this property + * Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. They must provide infrastructureSubnetId if enabling this property */ @JsonProperty(value = "internal") private Boolean internal; @@ -26,22 +25,19 @@ public final class VnetConfiguration { private String infrastructureSubnetId; /* - * CIDR notation IP range assigned to the Docker bridge, network. Must not overlap with any other provided IP - * ranges. + * CIDR notation IP range assigned to the Docker bridge, network. Must not overlap with any other provided IP ranges. */ @JsonProperty(value = "dockerBridgeCidr") private String dockerBridgeCidr; /* - * IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. Must not overlap - * with any other provided IP ranges. + * IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. Must not overlap with any other provided IP ranges. */ @JsonProperty(value = "platformReservedCidr") private String platformReservedCidr; /* - * An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS - * server. + * An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS server. */ @JsonProperty(value = "platformReservedDnsIP") private String platformReservedDnsIp; @@ -143,8 +139,8 @@ public VnetConfiguration withPlatformReservedCidr(String platformReservedCidr) { } /** - * Get the platformReservedDnsIp property: An IP address from the IP range defined by platformReservedCidr that - * will be reserved for the internal DNS server. + * Get the platformReservedDnsIp property: An IP address from the IP range defined by platformReservedCidr that will + * be reserved for the internal DNS server. * * @return the platformReservedDnsIp value. */ @@ -153,8 +149,8 @@ public String platformReservedDnsIp() { } /** - * Set the platformReservedDnsIp property: An IP address from the IP range defined by platformReservedCidr that - * will be reserved for the internal DNS server. + * Set the platformReservedDnsIp property: An IP address from the IP range defined by platformReservedCidr that will + * be reserved for the internal DNS server. * * @param platformReservedDnsIp the platformReservedDnsIp value to set. * @return the VnetConfiguration object itself. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Volume.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Volume.java index 5f0f95c517a1..4c8206eb046f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Volume.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Volume.java @@ -32,15 +32,13 @@ public final class Volume { private String storageName; /* - * List of secrets to be added in volume. If no secrets are provided, all secrets in collection will be added to - * volume. + * List of secrets to be added in volume. If no secrets are provided, all secrets in collection will be added to volume. */ @JsonProperty(value = "secrets") private List secrets; /* - * Mount options used while mounting the Azure file share or NFS Azure file share. Must be a comma-separated - * string. + * Mount options used while mounting the Azure file share or NFS Azure file share. Must be a comma-separated string. */ @JsonProperty(value = "mountOptions") private String mountOptions; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VolumeMount.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VolumeMount.java index 8e5dd84d45d8..e6d3170b9cb3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VolumeMount.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VolumeMount.java @@ -57,8 +57,7 @@ public VolumeMount withVolumeName(String volumeName) { } /** - * Get the mountPath property: Path within the container at which the volume should be mounted.Must not contain - * ':'. + * Get the mountPath property: Path within the container at which the volume should be mounted.Must not contain ':'. * * @return the mountPath value. */ @@ -67,8 +66,7 @@ public String mountPath() { } /** - * Set the mountPath property: Path within the container at which the volume should be mounted.Must not contain - * ':'. + * Set the mountPath property: Path within the container at which the volume should be mounted.Must not contain ':'. * * @param mountPath the mountPath value to set. * @return the VolumeMount object itself. @@ -79,8 +77,8 @@ public VolumeMount withMountPath(String mountPath) { } /** - * Get the subPath property: Path within the volume from which the container's volume should be mounted. Defaults - * to "" (volume's root). + * Get the subPath property: Path within the volume from which the container's volume should be mounted. Defaults to + * "" (volume's root). * * @return the subPath value. */ @@ -89,8 +87,8 @@ public String subPath() { } /** - * Set the subPath property: Path within the volume from which the container's volume should be mounted. Defaults - * to "" (volume's root). + * Set the subPath property: Path within the volume from which the container's volume should be mounted. Defaults to + * "" (volume's root). * * @param subPath the subPath value to set. * @return the VolumeMount object itself. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java index 066d2ac72069..a59e86c2079b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java @@ -130,12 +130,13 @@ public WorkloadProfile withMaximumCount(Integer maximumCount) { */ public void validate() { if (name() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property name in model WorkloadProfile")); + throw LOGGER.atError() + .log(new IllegalArgumentException("Missing required property name in model WorkloadProfile")); } if (workloadProfileType() == null) { - throw LOGGER.logExceptionAsError( - new IllegalArgumentException("Missing required property workloadProfileType in model WorkloadProfile")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property workloadProfileType in model WorkloadProfile")); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesCollection.java index d8e70bc82c76..d5a8e59e4aa9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesCollection.java @@ -69,8 +69,9 @@ public String nextLink() { */ public void validate() { if (value() == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - "Missing required property value in model WorkloadProfileStatesCollection")); + throw LOGGER.atError() + .log(new IllegalArgumentException( + "Missing required property value in model WorkloadProfileStatesCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/package-info.java index a5d836af42d9..c0b9d82b3bd0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/package-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/package-info.java @@ -4,6 +4,8 @@ /** * Package containing the data models for ContainerAppsApiClient. - * null. + * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the + * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions + * extension resource. */ package com.azure.resourcemanager.appcontainers.models; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/package-info.java index 82dc538e0b9f..5e8cbf3c1591 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/package-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/package-info.java @@ -4,6 +4,8 @@ /** * Package containing the classes for ContainerAppsApiClient. - * null. + * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the + * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions + * extension resource. */ package com.azure.resourcemanager.appcontainers; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/module-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/module-info.java index e63ceaf542d1..5118670615e7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/module-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/module-info.java @@ -10,4 +10,4 @@ exports com.azure.resourcemanager.appcontainers.models; opens com.azure.resourcemanager.appcontainers.fluent.models to com.azure.core, com.fasterxml.jackson.databind; opens com.azure.resourcemanager.appcontainers.models to com.azure.core, com.fasterxml.jackson.databind; -} +} \ No newline at end of file diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/proxy-config.json b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/proxy-config.json index 8de18d9e34b1..097e43853ad7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/proxy-config.json +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/proxy-config.json @@ -1 +1 @@ -[ [ "com.azure.resourcemanager.appcontainers.implementation.AppResilienciesClientImpl$AppResilienciesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsAuthConfigsClientImpl$ContainerAppsAuthConfigsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.AvailableWorkloadProfilesClientImpl$AvailableWorkloadProfilesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BillingMetersClientImpl$BillingMetersService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BuildersClientImpl$BuildersService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BuildsByBuilderResourcesClientImpl$BuildsByBuilderResourcesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BuildsClientImpl$BuildsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BuildAuthTokensClientImpl$BuildAuthTokensService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsClientImpl$ConnectedEnvironmentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsCertificatesClientImpl$ConnectedEnvironmentsCertificatesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsDaprComponentsClientImpl$ConnectedEnvironmentsDaprComponentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsStoragesClientImpl$ConnectedEnvironmentsStoragesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsClientImpl$ContainerAppsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionsClientImpl$ContainerAppsRevisionsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionReplicasClientImpl$ContainerAppsRevisionReplicasService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsDiagnosticsClientImpl$ContainerAppsDiagnosticsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentDiagnosticsClientImpl$ManagedEnvironmentDiagnosticsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsDiagnosticsClientImpl$ManagedEnvironmentsDiagnosticsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.JobsClientImpl$JobsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.JobsExecutionsClientImpl$JobsExecutionsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ResourceProvidersClientImpl$ResourceProvidersService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsClientImpl$ManagedEnvironmentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.CertificatesClientImpl$CertificatesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedCertificatesClientImpl$ManagedCertificatesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.NamespacesClientImpl$NamespacesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.DaprComponentResiliencyPoliciesClientImpl$DaprComponentResiliencyPoliciesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.DaprComponentsClientImpl$DaprComponentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.DaprSubscriptionsClientImpl$DaprSubscriptionsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsStoragesClientImpl$ManagedEnvironmentsStoragesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsSourceControlsClientImpl$ContainerAppsSourceControlsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.UsagesClientImpl$UsagesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentUsagesClientImpl$ManagedEnvironmentUsagesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.JavaComponentsClientImpl$JavaComponentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.DotNetComponentsClientImpl$DotNetComponentsService" ] ] \ No newline at end of file +[ [ "com.azure.resourcemanager.appcontainers.implementation.AppResilienciesClientImpl$AppResilienciesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsAuthConfigsClientImpl$ContainerAppsAuthConfigsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.AvailableWorkloadProfilesClientImpl$AvailableWorkloadProfilesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BillingMetersClientImpl$BillingMetersService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BuildersClientImpl$BuildersService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BuildsByBuilderResourcesClientImpl$BuildsByBuilderResourcesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BuildsClientImpl$BuildsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BuildAuthTokensClientImpl$BuildAuthTokensService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsClientImpl$ConnectedEnvironmentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsCertificatesClientImpl$ConnectedEnvironmentsCertificatesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsDaprComponentsClientImpl$ConnectedEnvironmentsDaprComponentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsStoragesClientImpl$ConnectedEnvironmentsStoragesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsClientImpl$ContainerAppsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionsClientImpl$ContainerAppsRevisionsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionReplicasClientImpl$ContainerAppsRevisionReplicasService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsBuildsByContainerAppsClientImpl$ContainerAppsBuildsByContainerAppsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsBuildsClientImpl$ContainerAppsBuildsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsPatchesClientImpl$ContainerAppsPatchesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsDiagnosticsClientImpl$ContainerAppsDiagnosticsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentDiagnosticsClientImpl$ManagedEnvironmentDiagnosticsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsDiagnosticsClientImpl$ManagedEnvironmentsDiagnosticsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.JobsClientImpl$JobsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.DotNetComponentsClientImpl$DotNetComponentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.JavaComponentsClientImpl$JavaComponentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.JobsExecutionsClientImpl$JobsExecutionsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ResourceProvidersClientImpl$ResourceProvidersService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsClientImpl$ManagedEnvironmentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.CertificatesClientImpl$CertificatesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedCertificatesClientImpl$ManagedCertificatesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.NamespacesClientImpl$NamespacesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentPrivateEndpointConnectionsClientImpl$ManagedEnvironmentPrivateEndpointConnectionsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentPrivateLinkResourcesClientImpl$ManagedEnvironmentPrivateLinkResourcesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.DaprComponentResiliencyPoliciesClientImpl$DaprComponentResiliencyPoliciesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.DaprComponentsClientImpl$DaprComponentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.DaprSubscriptionsClientImpl$DaprSubscriptionsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsStoragesClientImpl$ManagedEnvironmentsStoragesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsSourceControlsClientImpl$ContainerAppsSourceControlsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.UsagesClientImpl$UsagesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentUsagesClientImpl$ManagedEnvironmentUsagesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.FunctionsExtensionsClientImpl$FunctionsExtensionsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsSessionPoolsClientImpl$ContainerAppsSessionPoolsService" ] ] \ No newline at end of file diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/reflect-config.json b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/reflect-config.json index daaeffa7283a..a5fb0d25139a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/reflect-config.json +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/reflect-config.json @@ -533,6 +533,11 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerAppPropertiesPatchingConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.models.Configuration", "allDeclaredConstructors" : true, @@ -583,11 +588,46 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Runtime", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.RuntimeJava", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgent", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.LoggerSetting", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.RuntimeDotnet", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.models.Service", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.IdentitySettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.models.Template", "allDeclaredConstructors" : true, @@ -763,6 +803,61 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PatchCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PatchProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PatchDetails", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PatchDetailsNewLayer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PatchDetailsOldLayer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PatchSkipConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner", "allDeclaredConstructors" : true, @@ -918,6 +1013,36 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.PrivateEndpointConnectionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.PrivateEndpointConnectionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PrivateEndpoint", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.fluent.models.JobInner", "allDeclaredConstructors" : true, @@ -963,6 +1088,31 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentsCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.models.AvailableOperations", "allDeclaredConstructors" : true, @@ -978,6 +1128,31 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentsCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.models.JobsCollection", "allDeclaredConstructors" : true, @@ -1023,6 +1198,21 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ExecutionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ReplicaExecutionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerExecutionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.fluent.models.JobSecretsCollectionInner", "allDeclaredConstructors" : true, @@ -1078,6 +1268,26 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnectionListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PrivateLinkResourceListResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.PrivateLinkResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.PrivateLinkResourceProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPoliciesCollection", "allDeclaredConstructors" : true, @@ -1214,52 +1424,97 @@ "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentsCollection", + "name" : "com.azure.resourcemanager.appcontainers.models.SessionPoolCollection", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner", + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.SessionPoolInner", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentProperties", + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.SessionPoolProperties", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty", + "name" : "com.azure.resourcemanager.appcontainers.models.ScaleConfiguration", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind", + "name" : "com.azure.resourcemanager.appcontainers.models.SecretAutoGenerated", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentsCollection", + "name" : "com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner", + "name" : "com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentProperties", + "name" : "com.azure.resourcemanager.appcontainers.models.SessionRegistryCredentials", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty", + "name" : "com.azure.resourcemanager.appcontainers.models.SessionContainer", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind", + "name" : "com.azure.resourcemanager.appcontainers.models.SessionContainerResources", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.SessionIngress", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.SessionPoolUpdatableProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.SessionPoolUpdatablePropertiesProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentIngress", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.SpringBootAdminComponent", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.NacosComponent", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.SpringCloudEurekaComponent", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.SpringCloudConfigComponent", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true @@ -1318,11 +1573,21 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Kind", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.models.ContainerAppProvisioningState", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PatchingMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode", "allDeclaredConstructors" : true, @@ -1368,6 +1633,21 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Level", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.IdentitySettingsLifeCycle", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ImageType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.models.Scheme", "allDeclaredConstructors" : true, @@ -1408,11 +1688,36 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PatchApplyStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DetectionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PatchType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PrivateEndpointServiceConnectionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnectionProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.models.JobProvisioningState", "allDeclaredConstructors" : true, @@ -1423,6 +1728,26 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.models.JobExecutionRunningState", "allDeclaredConstructors" : true, @@ -1439,22 +1764,27 @@ "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentType", + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerType", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentProvisioningState", + "name" : "com.azure.resourcemanager.appcontainers.models.PoolManagementType", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentType", + "name" : "com.azure.resourcemanager.appcontainers.models.ExecutionType", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentProvisioningState", + "name" : "com.azure.resourcemanager.appcontainers.models.SessionNetworkStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.SessionPoolProvisioningState", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyCreateOrUpdateSamples.java index f2dcd1e3fd98..15927e8f040e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyCreateOrUpdateSamples.java @@ -18,9 +18,7 @@ */ public final class AppResiliencyCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_CreateOrUpdate - * .json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_CreateOrUpdate.json */ /** * Sample code: Create or Update App Resiliency. @@ -29,19 +27,26 @@ public final class AppResiliencyCreateOrUpdateSamples { */ public static void createOrUpdateAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.appResiliencies().define("resiliency-policy-1").withExistingContainerApp("rg", "testcontainerApp0") + manager.appResiliencies() + .define("resiliency-policy-1") + .withExistingContainerApp("rg", "testcontainerApp0") .withTimeoutPolicy(new TimeoutPolicy().withResponseTimeoutInSeconds(15).withConnectionTimeoutInSeconds(5)) - .withHttpRetryPolicy(new HttpRetryPolicy().withMaxRetries(5).withInitialDelayInMilliseconds(1000L) - .withMaxIntervalInMilliseconds(10000L) - .withHeaders( - Arrays.asList(new HeaderMatch().withHeaderProperty("X-Content-Type").withPrefixMatch("GOATS"))) - .withHttpStatusCodes(Arrays.asList(502, 503)).withErrors( - Arrays.asList("5xx", "connect-failure", "reset", "retriable-headers", "retriable-status-codes"))) + .withHttpRetryPolicy( + new HttpRetryPolicy().withMaxRetries(5) + .withInitialDelayInMilliseconds(1000L) + .withMaxIntervalInMilliseconds(10000L) + .withHeaders( + Arrays.asList(new HeaderMatch().withHeaderProperty("X-Content-Type").withPrefixMatch("GOATS"))) + .withHttpStatusCodes(Arrays.asList(502, 503)) + .withErrors(Arrays.asList("5xx", "connect-failure", "reset", "retriable-headers", + "retriable-status-codes"))) .withTcpRetryPolicy(new TcpRetryPolicy().withMaxConnectAttempts(3)) - .withCircuitBreakerPolicy(new CircuitBreakerPolicy().withConsecutiveErrors(5).withIntervalInSeconds(10) + .withCircuitBreakerPolicy(new CircuitBreakerPolicy().withConsecutiveErrors(5) + .withIntervalInSeconds(10) .withMaxEjectionPercent(50)) .withHttpConnectionPool( new HttpConnectionPool().withHttp1MaxPendingRequests(1024).withHttp2MaxRequests(1024)) - .withTcpConnectionPool(new TcpConnectionPool().withMaxConnections(100)).create(); + .withTcpConnectionPool(new TcpConnectionPool().withMaxConnections(100)) + .create(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyDeleteSamples.java index ff432a623f64..f1473d3c8815 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyDeleteSamples.java @@ -9,8 +9,7 @@ */ public final class AppResiliencyDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Delete.json */ /** * Sample code: Delete App Resiliency. @@ -18,7 +17,7 @@ public final class AppResiliencyDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.appResiliencies().deleteWithResponse("rg", "testcontainerApp0", "resiliency-policy-1", - com.azure.core.util.Context.NONE); + manager.appResiliencies() + .deleteWithResponse("rg", "testcontainerApp0", "resiliency-policy-1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyGetSamples.java index a0a5bd608f42..dd66f40a2c9d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyGetSamples.java @@ -9,8 +9,7 @@ */ public final class AppResiliencyGetSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Get.json */ /** * Sample code: Get App Resiliency. @@ -18,7 +17,7 @@ public final class AppResiliencyGetSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.appResiliencies().getWithResponse("rg", "testcontainerApp0", "resiliency-policy-1", - com.azure.core.util.Context.NONE); + manager.appResiliencies() + .getWithResponse("rg", "testcontainerApp0", "resiliency-policy-1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyListSamples.java index dd4f9d77ee94..0b9dbf839407 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyListSamples.java @@ -9,8 +9,7 @@ */ public final class AppResiliencyListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_List.json */ /** * Sample code: List App Resiliency. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyUpdateSamples.java index e0d26b251899..024a448ac9ae 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyUpdateSamples.java @@ -12,8 +12,7 @@ */ public final class AppResiliencyUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Patch.json */ /** * Sample code: Update App Resiliency. 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 628041decb5c..89c11e0c853c 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 @@ -9,8 +9,7 @@ */ public final class AvailableWorkloadProfilesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * AvailableWorkloadProfiles_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 506e65cca4d1..da6b3b926a34 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 @@ -9,8 +9,7 @@ */ public final class BillingMetersGetSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/BillingMeters_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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/BuildAuthTokenListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildAuthTokenListSamples.java index c364ecfe64ff..551a75926fb4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildAuthTokenListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildAuthTokenListSamples.java @@ -9,8 +9,7 @@ */ public final class BuildAuthTokenListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_ListAuthToken.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_ListAuthToken.json */ /** * Sample code: Get Build Auth Token. 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 index 227168e3fe8f..fba7378672e0 100644 --- 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 @@ -17,8 +17,7 @@ */ public final class BuildersCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_CreateOrUpdate.json */ /** * Sample code: Builders_CreateOrUpdate_0. @@ -27,7 +26,10 @@ public final class BuildersCreateOrUpdateSamples { */ public static void buildersCreateOrUpdate0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builders().define("testBuilder").withRegion("eastus").withExistingResourceGroup("rg") + manager.builders() + .define("testBuilder") + .withRegion("eastus") + .withExistingResourceGroup("rg") .withTags(mapOf("company", "Microsoft")) .withIdentity(new ManagedServiceIdentity() .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) @@ -36,11 +38,13 @@ public final class BuildersCreateOrUpdateSamples { 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( + .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"))) + new ContainerRegistry().withContainerRegistryServer("test2.azurecr.io") + .withIdentityResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"))) .create(); } 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 index 00990722478d..004c1e351e23 100644 --- 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 @@ -9,8 +9,7 @@ */ public final class BuildersDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_Delete.json */ /** * Sample code: Builders_Delete_0. 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 index 9d1b5ef1a93b..a2fbdf395855 100644 --- 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 @@ -9,8 +9,7 @@ */ public final class BuildersGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_Get.json */ /** * Sample code: Builders_Get_0. 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 index 96827840fea8..bb855b0368cf 100644 --- 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 @@ -9,9 +9,7 @@ */ public final class BuildersListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_ListByResourceGroup - * .json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_ListByResourceGroup.json */ /** * Sample code: Builders_ListByResourceGroup_0. 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 index cd9a5c76be8a..c10fb911b6a4 100644 --- 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 @@ -9,9 +9,7 @@ */ public final class BuildersListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_ListBySubscription. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_ListBySubscription.json */ /** * Sample code: Builders_ListBySubscription_0. 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 index db6b95d59959..ec8d86fb5c0a 100644 --- 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 @@ -13,8 +13,7 @@ */ public final class BuildersUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_Update.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_Update.json */ /** * Sample code: Builders_Update_0. @@ -23,7 +22,8 @@ public final class BuildersUpdateSamples { */ public static void buildersUpdate0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { BuilderResource resource = manager.builders() - .getByResourceGroupWithResponse("rg", "testBuilder", com.azure.core.util.Context.NONE).getValue(); + .getByResourceGroupWithResponse("rg", "testBuilder", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("mytag1", "myvalue1")).apply(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsByBuilderResourceListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsByBuilderResourceListSamples.java index 0234c29a09b2..437019f85597 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsByBuilderResourceListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsByBuilderResourceListSamples.java @@ -9,9 +9,7 @@ */ public final class BuildsByBuilderResourceListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_ListByBuilderResource - * .json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_ListByBuilderResource.json */ /** * Sample code: Builds_ListByBuilderResource_0. 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 index 1b1cf25bd03d..d55cc888d9b4 100644 --- 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 @@ -16,8 +16,7 @@ */ public final class BuildsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_CreateOrUpdate.json */ /** * Sample code: Builds_CreateOrUpdate_WithConfig. @@ -26,30 +25,32 @@ public final class BuildsCreateOrUpdateSamples { */ public static void buildsCreateOrUpdateWithConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.builds().define("testBuild-123456789az").withExistingBuilder("rg", "testBuilder") + 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")))))) + .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-11-02-preview/examples/ - * Builds_CreateOrUpdate_NoConfig.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_CreateOrUpdate_NoConfig.json */ /** * Sample code: Builds_CreateOrUpdate_NoConfig. 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 index 85b1819a1ed1..103aff904b96 100644 --- 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 @@ -9,8 +9,7 @@ */ public final class BuildsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_Delete.json */ /** * Sample code: Builds_Delete_0. 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 index 274c47086205..288f85f5f553 100644 --- 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 @@ -9,8 +9,7 @@ */ public final class BuildsGetSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_Get.json */ /** * Sample code: Builds_Get_0. 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 0679d0bd5325..08343fe33b69 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 @@ -14,8 +14,7 @@ */ public final class CertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * Certificate_CreateOrUpdate_FromKeyVault.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificate_CreateOrUpdate_FromKeyVault.json */ /** * Sample code: Create or Update Certificate using Managed Identity. @@ -24,19 +23,19 @@ public final class CertificatesCreateOrUpdateSamples { */ public static void createOrUpdateCertificateUsingManagedIdentity( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates().createOrUpdateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - new CertificateInner().withLocation("East US").withProperties(new CertificateProperties() - .withCertificateKeyVaultProperties(new CertificateKeyVaultProperties().withIdentity( - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/microsoft.managedidentity/userassignedidentities/test-user-mi") - .withKeyVaultUrl("fakeTokenPlaceholder")) - .withCertificateType(CertificateType.SERVER_SSLCERTIFICATE)), - com.azure.core.util.Context.NONE); + manager.certificates() + .createOrUpdateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + new CertificateInner().withLocation("East US") + .withProperties(new CertificateProperties() + .withCertificateKeyVaultProperties(new CertificateKeyVaultProperties().withIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/microsoft.managedidentity/userassignedidentities/test-user-mi") + .withKeyVaultUrl("fakeTokenPlaceholder")) + .withCertificateType(CertificateType.SERVER_SSLCERTIFICATE)), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificate_CreateOrUpdate. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -45,10 +44,12 @@ public static void createOrUpdateCertificateUsingManagedIdentity( */ public static void createOrUpdateCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates().createOrUpdateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - new CertificateInner().withLocation("East US") - .withProperties(new CertificateProperties().withPassword("fakeTokenPlaceholder") - .withValue("Y2VydA==".getBytes()).withCertificateType(CertificateType.IMAGE_PULL_TRUSTED_CA)), - com.azure.core.util.Context.NONE); + manager.certificates() + .createOrUpdateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + new CertificateInner().withLocation("East US") + .withProperties(new CertificateProperties().withPassword("fakeTokenPlaceholder") + .withValue("Y2VydA==".getBytes()) + .withCertificateType(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 51fd5931b8c7..d4481c625dbb 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 @@ -9,8 +9,7 @@ */ public final class CertificatesDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -18,7 +17,8 @@ public final class CertificatesDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates().deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - com.azure.core.util.Context.NONE); + manager.certificates() + .deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } 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 89b21554efc5..527a751ac101 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 @@ -9,8 +9,7 @@ */ public final class CertificatesGetSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificate_Get.json */ /** * Sample code: Get Certificate. @@ -18,7 +17,8 @@ public final class CertificatesGetSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates().getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - com.azure.core.util.Context.NONE); + manager.certificates() + .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } 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 ed4587d1ba6a..a92904dddb8f 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 @@ -9,8 +9,7 @@ */ public final class CertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * Certificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 293cf822faea..d23ca096b0d2 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 @@ -13,8 +13,7 @@ */ public final class CertificatesUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificates_Patch.json */ /** * Sample code: Patch Certificate. @@ -22,9 +21,10 @@ public final class CertificatesUpdateSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates().updateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), - com.azure.core.util.Context.NONE); + manager.certificates() + .updateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available 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 a6e0e0999cd0..3505813f8405 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 @@ -11,8 +11,7 @@ */ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsCertificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -21,7 +20,9 @@ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { */ public static void createOrUpdateCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsCertificates().define("certificate-firendly-name").withRegion("East US") + manager.connectedEnvironmentsCertificates() + .define("certificate-firendly-name") + .withRegion("East US") .withExistingConnectedEnvironment("examplerg", "testcontainerenv") .withProperties( new CertificateProperties().withPassword("fakeTokenPlaceholder").withValue("Y2VydA==".getBytes())) 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 8ba3c58c59a4..648339a1b53e 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 @@ -9,8 +9,7 @@ */ public final class ConnectedEnvironmentsCertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsCertificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsCertificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -18,7 +17,8 @@ public final class ConnectedEnvironmentsCertificatesDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsCertificates().deleteWithResponse("examplerg", "testcontainerenv", - "certificate-firendly-name", com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsCertificates() + .deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } 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 55e10d25a725..a3c99e94b27c 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 @@ -9,8 +9,7 @@ */ public final class ConnectedEnvironmentsCertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsCertificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsCertificate_Get.json */ /** * Sample code: Get Certificate. @@ -18,7 +17,8 @@ public final class ConnectedEnvironmentsCertificatesGetSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsCertificates().getWithResponse("examplerg", "testcontainerenv", - "certificate-firendly-name", com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsCertificates() + .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } 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 8c1d0632f8c6..31b26d50c43c 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 @@ -9,8 +9,7 @@ */ public final class ConnectedEnvironmentsCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json */ /** * Sample code: List Certificates by Connected Environment. @@ -19,7 +18,7 @@ public final class ConnectedEnvironmentsCertificatesListSamples { */ public static void listCertificatesByConnectedEnvironment( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsCertificates().list("examplerg", "testcontainerenv", - com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsCertificates() + .list("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE); } } 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 3204b307a089..7727e4e4cfa2 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 @@ -13,8 +13,7 @@ */ public final class ConnectedEnvironmentsCertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsCertificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsCertificates_Patch.json */ /** * Sample code: Patch Certificate. @@ -22,8 +21,10 @@ public final class ConnectedEnvironmentsCertificatesUpdateSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - Certificate resource = manager.connectedEnvironmentsCertificates().getWithResponse("examplerg", - "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE).getValue(); + Certificate resource = manager.connectedEnvironmentsCertificates() + .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } 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 c5609981289c..8ad11c339a77 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 @@ -11,8 +11,7 @@ */ public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsCertificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -22,8 +21,9 @@ public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { public static void certificatesCheckNameAvailability(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.connectedEnvironments() - .checkNameAvailabilityWithResponse("examplerg", "testcontainerenv", new CheckNameAvailabilityRequest() - .withName("testcertificatename").withType("Microsoft.App/connectedEnvironments/certificates"), + .checkNameAvailabilityWithResponse("examplerg", "testcontainerenv", + new CheckNameAvailabilityRequest().withName("testcertificatename") + .withType("Microsoft.App/connectedEnvironments/certificates"), com.azure.core.util.Context.NONE); } } 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 132aecd42e86..be60b030cfb7 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 @@ -11,8 +11,7 @@ */ public final class ConnectedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create kube environments. @@ -20,12 +19,16 @@ public final class ConnectedEnvironmentsCreateOrUpdateSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void createKubeEnvironments(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().define("testenv").withRegion("East US").withExistingResourceGroup("examplerg") + manager.connectedEnvironments() + .define("testenv") + .withRegion("East US") + .withExistingResourceGroup("examplerg") .withStaticIp("1.2.3.4") .withDaprAIConnectionString( "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("www.my-name.com") - .withCertificateValue("Y2VydA==".getBytes()).withCertificatePassword("fakeTokenPlaceholder")) + .withCertificateValue("Y2VydA==".getBytes()) + .withCertificatePassword("fakeTokenPlaceholder")) .create(); } } 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 c80b32b2c3d5..f66f888a9d5d 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 @@ -15,8 +15,7 @@ */ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json */ /** * Sample code: Create or update dapr component. @@ -25,9 +24,13 @@ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { */ public static void createOrUpdateDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsDaprComponents().define("reddog") - .withExistingConnectedEnvironment("examplerg", "myenvironment").withComponentType("state.azure.cosmosdb") - .withVersion("v1").withIgnoreErrors(false).withInitTimeout("50s") + manager.connectedEnvironmentsDaprComponents() + .define("reddog") + .withExistingConnectedEnvironment("examplerg", "myenvironment") + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), new DaprMetadata().withName("database").withValue("itemsDB"), 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 0d09c50557ed..bd32bc0b75a1 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 @@ -9,8 +9,7 @@ */ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsDaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json */ /** * Sample code: Delete dapr component. @@ -18,7 +17,7 @@ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsDaprComponents().deleteWithResponse("examplerg", "myenvironment", "reddog", - com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsDaprComponents() + .deleteWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } 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 46f5e23495ee..4a8ebf162e23 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 @@ -9,8 +9,7 @@ */ public final class ConnectedEnvironmentsDaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsDaprComponents_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json */ /** * Sample code: Get Dapr Component. @@ -18,7 +17,7 @@ public final class ConnectedEnvironmentsDaprComponentsGetSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsDaprComponents().getWithResponse("examplerg", "myenvironment", "reddog", - com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsDaprComponents() + .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } 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 ab17db519628..64d6053709f7 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 @@ -9,8 +9,7 @@ */ public final class ConnectedEnvironmentsDaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsDaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsDaprComponents_List.json */ /** * Sample code: List Dapr Components. @@ -18,7 +17,7 @@ public final class ConnectedEnvironmentsDaprComponentsListSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void listDaprComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsDaprComponents().list("examplerg", "myenvironment", - com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsDaprComponents() + .list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); } } 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 c28a23c8bcc3..aa2795c6bc57 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 @@ -9,8 +9,7 @@ */ public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsDaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -19,7 +18,7 @@ public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { */ public static void listContainerAppsSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsDaprComponents().listSecretsWithResponse("examplerg", "myenvironment", "reddog", - com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsDaprComponents() + .listSecretsWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } 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 8b303c72d1cb..3b024e045fc5 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 @@ -9,9 +9,7 @@ */ public final class ConnectedEnvironmentsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironments_Delete - * .json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 4e2b5a153c38..ca6775924097 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 @@ -9,9 +9,7 @@ */ public final class ConnectedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironments_Get. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironments_Get.json */ /** * Sample code: Get connected environment by connectedEnvironmentName. @@ -20,7 +18,7 @@ public final class ConnectedEnvironmentsGetByResourceGroupSamples { */ public static void getConnectedEnvironmentByConnectedEnvironmentName( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().getByResourceGroupWithResponse("examplerg", "examplekenv", - com.azure.core.util.Context.NONE); + manager.connectedEnvironments() + .getByResourceGroupWithResponse("examplerg", "examplekenv", com.azure.core.util.Context.NONE); } } 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 46055391c269..2b7a5dc71832 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 @@ -9,8 +9,7 @@ */ public final class ConnectedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 0249dc9cd9c1..dbc048d70157 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 @@ -9,8 +9,7 @@ */ public final class ConnectedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 efdbcb1dd3b7..9df7df2d0921 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 @@ -13,8 +13,7 @@ */ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. @@ -23,11 +22,14 @@ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { */ public static void createOrUpdateEnvironmentsStorage(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages().define("jlaw-demo1") + manager.connectedEnvironmentsStorages() + .define("jlaw-demo1") .withExistingConnectedEnvironment("examplerg", "env") - .withProperties(new ConnectedEnvironmentStorageProperties().withAzureFile( - new AzureFileProperties().withAccountName("account1").withAccountKey("fakeTokenPlaceholder") - .withAccessMode(AccessMode.READ_ONLY).withShareName("share1"))) + .withProperties(new ConnectedEnvironmentStorageProperties() + .withAzureFile(new AzureFileProperties().withAccountName("account1") + .withAccountKey("fakeTokenPlaceholder") + .withAccessMode(AccessMode.READ_ONLY) + .withShareName("share1"))) .create(); } } 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 1fa1aae1cd26..e27cdd952107 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 @@ -9,8 +9,7 @@ */ public final class ConnectedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. @@ -19,7 +18,7 @@ public final class ConnectedEnvironmentsStoragesDeleteSamples { */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages().deleteWithResponse("examplerg", "env", "jlaw-demo1", - com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsStorages() + .deleteWithResponse("examplerg", "env", "jlaw-demo1", com.azure.core.util.Context.NONE); } } 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 6766bd976d04..c4771cabb5e9 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 @@ -9,8 +9,7 @@ */ public final class ConnectedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. @@ -19,7 +18,7 @@ public final class ConnectedEnvironmentsStoragesGetSamples { */ public static void getAEnvironmentsStoragePropertiesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages().getWithResponse("examplerg", "env", "jlaw-demo1", - com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsStorages() + .getWithResponse("examplerg", "env", "jlaw-demo1", com.azure.core.util.Context.NONE); } } 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 ae861ce3634f..22dc0248792d 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 @@ -9,8 +9,7 @@ */ public final class ConnectedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ConnectedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. @@ -19,7 +18,7 @@ public final class ConnectedEnvironmentsStoragesListSamples { */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironmentsStorages().listWithResponse("examplerg", "managedEnv", - com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsStorages() + .listWithResponse("examplerg", "managedEnv", com.azure.core.util.Context.NONE); } } 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 c7b698b3a9f2..7c422b3d7864 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 @@ -9,9 +9,7 @@ */ public final class ConnectedEnvironmentsUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironments_Patch. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 ba742e7bcea3..aeaec7377fa3 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 @@ -17,9 +17,7 @@ */ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AuthConfigs_CreateOrUpdate. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App AuthConfig. @@ -28,7 +26,8 @@ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { */ public static void createOrUpdateContainerAppAuthConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsAuthConfigs().define("current") + manager.containerAppsAuthConfigs() + .define("current") .withExistingContainerApp("workerapps-rg-xj", "testcanadacentral") .withPlatform(new AuthPlatform().withEnabled(true)) .withGlobalValidation( 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 2c949bcda365..25d848bbac54 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsAuthConfigsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AuthConfigs_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_Delete.json */ /** * Sample code: Delete Container App AuthConfig. @@ -19,7 +18,7 @@ public final class ContainerAppsAuthConfigsDeleteSamples { */ public static void deleteContainerAppAuthConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsAuthConfigs().deleteWithResponse("workerapps-rg-xj", "testcanadacentral", "current", - com.azure.core.util.Context.NONE); + manager.containerAppsAuthConfigs() + .deleteWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } } 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 4ef9610059c3..07476aa1247b 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsAuthConfigsGetSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AuthConfigs_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_Get.json */ /** * Sample code: Get Container App's AuthConfig. @@ -19,7 +18,7 @@ public final class ContainerAppsAuthConfigsGetSamples { */ public static void getContainerAppSAuthConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsAuthConfigs().getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", - com.azure.core.util.Context.NONE); + manager.containerAppsAuthConfigs() + .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } } 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 6735d790759c..efbdb5a3f330 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 @@ -9,9 +9,7 @@ */ public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AuthConfigs_ListByContainer. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_ListByContainer.json */ /** * Sample code: List Auth Configs by Container Apps. @@ -20,7 +18,7 @@ public final class ContainerAppsAuthConfigsListByContainerAppSamples { */ public static void listAuthConfigsByContainerApps(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsAuthConfigs().listByContainerApp("workerapps-rg-xj", "testcanadacentral", - com.azure.core.util.Context.NONE); + manager.containerAppsAuthConfigs() + .listByContainerApp("workerapps-rg-xj", "testcanadacentral", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppListSamples.java new file mode 100644 index 000000000000..1ec6984c8f70 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppListSamples.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 ContainerAppsBuildsByContainerApp List. + */ +public final class ContainerAppsBuildsByContainerAppListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsBuilds_ListByContainerApp.json + */ + /** + * Sample code: ContainerAppsBuilds_ListByContainerApp_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void containerAppsBuildsListByContainerApp0( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsBuildsByContainerApps().list("rg", "testCapp", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsDeleteSamples.java new file mode 100644 index 000000000000..a05f846ec779 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsDeleteSamples.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 ContainerAppsBuilds Delete. + */ +public final class ContainerAppsBuildsDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsBuilds_Delete.json + */ + /** + * Sample code: ContainerAppsBuilds_Delete_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsBuildsDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsBuilds().delete("rg", "testCapp", "testBuild", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetSamples.java new file mode 100644 index 000000000000..925a722e34bb --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetSamples.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 ContainerAppsBuilds Get. + */ +public final class ContainerAppsBuildsGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsBuilds_Get.json + */ + /** + * Sample code: ContainerAppsBuilds_Get_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsBuildsGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsBuilds().getWithResponse("rg", "testCapp", "testBuild", com.azure.core.util.Context.NONE); + } +} 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 5472e0cc9b7e..de55c209c339 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.appcontainers.generated; import com.azure.resourcemanager.appcontainers.models.Action; +import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; import com.azure.resourcemanager.appcontainers.models.Affinity; import com.azure.resourcemanager.appcontainers.models.AppProtocol; import com.azure.resourcemanager.appcontainers.models.BindingType; @@ -14,6 +15,7 @@ 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.ContainerAppPropertiesPatchingConfiguration; import com.azure.resourcemanager.appcontainers.models.ContainerResources; import com.azure.resourcemanager.appcontainers.models.CorsPolicy; import com.azure.resourcemanager.appcontainers.models.CustomDomain; @@ -21,6 +23,9 @@ import com.azure.resourcemanager.appcontainers.models.Dapr; import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; +import com.azure.resourcemanager.appcontainers.models.IdentitySettings; +import com.azure.resourcemanager.appcontainers.models.IdentitySettingsLifeCycle; +import com.azure.resourcemanager.appcontainers.models.ImageType; import com.azure.resourcemanager.appcontainers.models.Ingress; import com.azure.resourcemanager.appcontainers.models.IngressClientCertificateMode; import com.azure.resourcemanager.appcontainers.models.IngressPortMapping; @@ -28,7 +33,19 @@ import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; +import com.azure.resourcemanager.appcontainers.models.Kind; +import com.azure.resourcemanager.appcontainers.models.Level; +import com.azure.resourcemanager.appcontainers.models.LoggerSetting; import com.azure.resourcemanager.appcontainers.models.LogLevel; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.appcontainers.models.PatchingMode; +import com.azure.resourcemanager.appcontainers.models.QueueScaleRule; +import com.azure.resourcemanager.appcontainers.models.Runtime; +import com.azure.resourcemanager.appcontainers.models.RuntimeDotnet; +import com.azure.resourcemanager.appcontainers.models.RuntimeJava; +import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgent; +import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging; import com.azure.resourcemanager.appcontainers.models.Scale; import com.azure.resourcemanager.appcontainers.models.ScaleRule; import com.azure.resourcemanager.appcontainers.models.Service; @@ -38,6 +55,7 @@ import com.azure.resourcemanager.appcontainers.models.Template; import com.azure.resourcemanager.appcontainers.models.TrafficWeight; import com.azure.resourcemanager.appcontainers.models.Type; +import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; import com.azure.resourcemanager.appcontainers.models.Volume; import com.azure.resourcemanager.appcontainers.models.VolumeMount; import java.util.Arrays; @@ -49,8 +67,124 @@ */ public final class ContainerAppsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ContainerApps_CreateOrUpdate_ConnectedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_SourceToCloudApp_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update SourceToCloud App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateSourceToCloudApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps() + .define("testcontainerApp0") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withWorkloadProfileName("My-GP-01") + .withPatchingConfiguration( + new ContainerAppPropertiesPatchingConfiguration().withPatchingMode(PatchingMode.AUTOMATIC)) + .withConfiguration( + new Configuration() + .withIngress(new Ingress().withExternal(true) + .withTargetPort(3000) + .withTraffic(Arrays.asList(new TrafficWeight() + .withRevisionName("testcontainerApp0-ab1234") + .withWeight(100) + .withLabel("production"))) + .withCustomDomains(Arrays.asList(new CustomDomain() + .withName("www.my-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + new CustomDomain().withName("www.my-other-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions( + Arrays + .asList( + new IpSecurityRestrictionRule().withName("Allow work IP A subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32") + .withAction(Action.ALLOW), + new IpSecurityRestrictionRule().withName("Allow work IP B subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8") + .withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) + .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) + .withCorsPolicy(new CorsPolicy() + .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) + .withAllowedMethods(Arrays.asList("GET", "POST")) + .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) + .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")) + .withMaxAge(1234) + .withAllowCredentials(true)) + .withAdditionalPortMappings(Arrays.asList( + new IngressPortMapping().withExternal(true).withTargetPort(1234), + new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) + .withDapr(new Dapr().withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withMaxInactiveRevisions(10) + .withService(new Service().withType("redis"))) + .withTemplate(new Template() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers(Arrays.asList(new Container() + .withImage("") + .withImageType(ImageType.CLOUD_BUILD) + .withName("testcontainerApp0") + .withVolumeMounts( + Arrays.asList( + new VolumeMount().withVolumeName("azurefile") + .withMountPath("/mnt/path1") + .withSubPath("subPath1"), + new VolumeMount() + .withVolumeName("nfsazurefile") + .withMountPath("/mnt/path2") + .withSubPath("subPath2"))) + .withProbes( + Arrays.asList(new ContainerAppProbe().withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders( + Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") + .withValue("Awesome"))) + .withPath("/health") + .withPort(8080)).withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withScale( + new Scale().withMinReplicas(1) + .withMaxReplicas(5) + .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule") + .withCustom(new CustomScaleRule().withType("http") + .withMetadata(mapOf("concurrentRequests", "50")))))) + .withVolumes(Arrays.asList( + new Volume().withName("azurefile") + .withStorageType(StorageType.AZURE_FILE) + .withStorageName("storage"), + new Volume().withName("nfsazurefile") + .withStorageType(StorageType.NFS_AZURE_FILE) + .withStorageName("nfsStorage"))) + .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") + .withName("redisService") + .withClientType("dotnet") + .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_CreateOrUpdate_ConnectedEnvironment.json */ /** * Sample code: Create or Update App On A Connected Environment. @@ -59,68 +193,98 @@ public final class ContainerAppsCreateOrUpdateSamples { */ public static void createOrUpdateAppOnAConnectedEnvironment( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().define("testcontainerApp0").withRegion("East US").withExistingResourceGroup("rg") + manager.containerApps() + .define("testcontainerApp0") + .withRegion("East US") + .withExistingResourceGroup("rg") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation") .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube") - .withConfiguration(new Configuration().withIngress(new Ingress().withExternal(true).withTargetPort(3000) - .withTraffic(Arrays.asList(new TrafficWeight().withRevisionName("testcontainerApp0-ab1234") - .withWeight(100).withLabel("production"))) - .withCustomDomains(Arrays.asList(new CustomDomain().withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED).withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain().withName("www.my-other-name.com").withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions(Arrays.asList( - new IpSecurityRestrictionRule().withName("Allow work IP A subnet") - .withDescription("Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/32").withAction(Action.ALLOW), - new IpSecurityRestrictionRule().withName("Allow work IP B subnet") - .withDescription("Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/8").withAction(Action.ALLOW))) - .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) - .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) - .withCorsPolicy(new CorsPolicy() - .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) - .withAllowedMethods(Arrays.asList("GET", "POST")) - .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) - .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")).withMaxAge(1234).withAllowCredentials(true)) - .withAdditionalPortMappings( - Arrays.asList(new IngressPortMapping().withExternal(true).withTargetPort(1234), - new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) - .withDapr( - new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) - .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel( - LogLevel.DEBUG) + .withConfiguration( + new Configuration() + .withIngress(new Ingress().withExternal(true) + .withTargetPort(3000) + .withTraffic(Arrays.asList(new TrafficWeight() + .withRevisionName("testcontainerApp0-ab1234") + .withWeight(100) + .withLabel("production"))) + .withCustomDomains(Arrays.asList(new CustomDomain() + .withName("www.my-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + new CustomDomain().withName("www.my-other-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions( + Arrays + .asList( + new IpSecurityRestrictionRule().withName("Allow work IP A subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32") + .withAction(Action.ALLOW), + new IpSecurityRestrictionRule().withName("Allow work IP B subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8") + .withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) + .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) + .withCorsPolicy(new CorsPolicy() + .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) + .withAllowedMethods(Arrays.asList("GET", "POST")) + .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) + .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")) + .withMaxAge(1234) + .withAllowCredentials(true)) + .withAdditionalPortMappings(Arrays.asList( + new IngressPortMapping().withExternal(true).withTargetPort(1234), + new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) + .withDapr(new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) .withEnableApiLogging(true)) - .withMaxInactiveRevisions(10)) + .withRuntime(new Runtime().withJava(new RuntimeJava().withEnableMetrics(true) + .withJavaAgent(new RuntimeJavaAgent().withEnabled(true) + .withLogging(new RuntimeJavaAgentLogging().withLoggerSettings(Arrays.asList( + new LoggerSetting().withLogger("org.springframework.boot").withLevel(Level.DEBUG)))))) + .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) + .withMaxInactiveRevisions(10)) .withTemplate(new Template() .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0").withCommand(Arrays.asList("/bin/sh")) + .withName("testinitcontainerApp0") + .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( - Arrays - .asList(new Container().withImage("repo/testcontainerApp0:v1").withName("testcontainerApp0") - .withProbes(Arrays.asList(new ContainerAppProbe() - .withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header").withValue("Awesome"))) - .withPath("/health").withPort(8080)) - .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) - .withScale(new Scale().withMinReplicas(1).withMaxReplicas(5) - .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule").withCustom( - new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50"))))))) + .withContainers(Arrays.asList(new Container() + .withImage("repo/testcontainerApp0:v1") + .withName("testcontainerApp0") + .withProbes( + Arrays.asList(new ContainerAppProbe().withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders( + Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") + .withValue("Awesome"))) + .withPath("/health") + .withPort(8080)).withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withScale( + new Scale().withMinReplicas(1) + .withMaxReplicas(5) + .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule") + .withCustom(new CustomScaleRule().withType("http") + .withMetadata(mapOf("concurrentRequests", "50"))))))) .create(); } /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_CreateOrUpdate - * .json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App. @@ -129,77 +293,141 @@ public static void createOrUpdateAppOnAConnectedEnvironment( */ public static void createOrUpdateContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().define("testcontainerApp0").withRegion("East US").withExistingResourceGroup("rg") + manager.containerApps() + .define("testcontainerApp0") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withIdentity(new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", + new UserAssignedIdentity()))) .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withWorkloadProfileName( - "My-GP-01") - .withConfiguration(new Configuration().withIngress(new Ingress().withExternal(true).withTargetPort(3000) - .withTraffic(Arrays.asList(new TrafficWeight().withRevisionName("testcontainerApp0-ab1234") - .withWeight(100).withLabel("production"))) - .withCustomDomains(Arrays.asList(new CustomDomain().withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED).withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain().withName("www.my-other-name.com").withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions(Arrays.asList( - new IpSecurityRestrictionRule().withName("Allow work IP A subnet") - .withDescription("Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/32").withAction(Action.ALLOW), - new IpSecurityRestrictionRule().withName("Allow work IP B subnet") - .withDescription("Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/8").withAction(Action.ALLOW))) - .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) - .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) - .withCorsPolicy(new CorsPolicy() - .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) - .withAllowedMethods(Arrays.asList("GET", "POST")) - .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) - .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")).withMaxAge(1234).withAllowCredentials(true)) - .withAdditionalPortMappings( - Arrays.asList(new IngressPortMapping().withExternal(true).withTargetPort(1234), - new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) - .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) - .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(true)) - .withMaxInactiveRevisions(10).withService(new Service().withType("redis"))) + .withWorkloadProfileName("My-GP-01") + .withConfiguration( + new Configuration() + .withIngress(new Ingress().withExternal(true) + .withTargetPort(3000) + .withTraffic(Arrays.asList(new TrafficWeight() + .withRevisionName("testcontainerApp0-ab1234") + .withWeight(100) + .withLabel("production"))) + .withCustomDomains(Arrays.asList(new CustomDomain() + .withName("www.my-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + new CustomDomain().withName("www.my-other-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions( + Arrays + .asList( + new IpSecurityRestrictionRule().withName("Allow work IP A subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32") + .withAction(Action.ALLOW), + new IpSecurityRestrictionRule().withName("Allow work IP B subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8") + .withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) + .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) + .withCorsPolicy(new CorsPolicy() + .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) + .withAllowedMethods(Arrays.asList("GET", "POST")) + .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) + .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")) + .withMaxAge(1234) + .withAllowCredentials(true)) + .withAdditionalPortMappings(Arrays.asList( + new IngressPortMapping().withExternal(true).withTargetPort(1234), + new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) + .withDapr(new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withRuntime(new Runtime().withJava(new RuntimeJava() + .withEnableMetrics(true) + .withJavaAgent(new RuntimeJavaAgent() + .withEnabled(true) + .withLogging(new RuntimeJavaAgentLogging().withLoggerSettings( + Arrays.asList(new LoggerSetting().withLogger("org.springframework.boot") + .withLevel(Level.DEBUG)))))) + .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) + .withMaxInactiveRevisions(10) + .withService(new Service().withType("redis")) + .withIdentitySettings(Arrays.asList(new IdentitySettings().withIdentity( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity") + .withLifecycle(IdentitySettingsLifeCycle.ALL), + new IdentitySettings().withIdentity("system").withLifecycle(IdentitySettingsLifeCycle.INIT)))) .withTemplate(new Template() .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0").withCommand(Arrays.asList("/bin/sh")) + .withName("testinitcontainerApp0") + .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( - Arrays.asList(new Container().withImage("repo/testcontainerApp0:v1").withName("testcontainerApp0") - .withVolumeMounts(Arrays.asList( - new VolumeMount().withVolumeName("azurefile").withMountPath("/mnt/path1") + .withContainers(Arrays.asList(new Container() + .withImage("repo/testcontainerApp0:v1") + .withName("testcontainerApp0") + .withVolumeMounts( + Arrays.asList( + new VolumeMount().withVolumeName("azurefile") + .withMountPath("/mnt/path1") .withSubPath("subPath1"), - new VolumeMount().withVolumeName("nfsazurefile").withMountPath("/mnt/path2") + new VolumeMount() + .withVolumeName("nfsazurefile") + .withMountPath("/mnt/path2") .withSubPath("subPath2"))) - .withProbes(Arrays.asList(new ContainerAppProbe() - .withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header").withValue("Awesome"))) - .withPath("/health").withPort(8080)) - .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) - .withScale(new Scale().withMinReplicas(1).withMaxReplicas(5) - .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule").withCustom( - new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50")))))) + .withProbes( + Arrays.asList(new ContainerAppProbe().withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders( + Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") + .withValue("Awesome"))) + .withPath("/health") + .withPort(8080)).withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withScale(new Scale().withMinReplicas(1) + .withMaxReplicas(5) + .withRules(Arrays.asList( + new ScaleRule().withName("httpscalingrule") + .withCustom( + new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50"))), + new ScaleRule().withName("servicebus") + .withCustom(new CustomScaleRule().withType("azure-servicebus") + .withMetadata( + mapOf("messageCount", "5", "namespace", "mynamespace", "queueName", "myqueue")) + .withIdentity( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity")), + new ScaleRule().withName("azure-queue") + .withAzureQueue(new QueueScaleRule().withAccountName("account1") + .withQueueName("queue1") + .withQueueLength(1) + .withIdentity("system"))))) .withVolumes(Arrays.asList( - new Volume().withName("azurefile").withStorageType(StorageType.AZURE_FILE) + new Volume().withName("azurefile") + .withStorageType(StorageType.AZURE_FILE) .withStorageName("storage"), - new Volume().withName("nfsazurefile").withStorageType(StorageType.NFS_AZURE_FILE) + new Volume().withName("nfsazurefile") + .withStorageType(StorageType.NFS_AZURE_FILE) .withStorageName("nfsStorage"))) .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") - .withName("redisService").withClientType("dotnet") + .withName("redisService") + .withClientType("dotnet") .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ContainerApps_TcpApp_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json */ /** * Sample code: Create or Update Tcp App. @@ -207,36 +435,63 @@ public static void createOrUpdateAppOnAConnectedEnvironment( * @param manager Entry point to ContainerAppsApiManager. */ public static void createOrUpdateTcpApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().define("testcontainerAppTcp").withRegion("East US").withExistingResourceGroup("rg") + manager.containerApps() + .define("testcontainerAppTcp") + .withRegion("East US") + .withExistingResourceGroup("rg") .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") .withConfiguration( - new Configuration() - .withIngress( - new Ingress().withExternal(true).withTargetPort(3000).withExposedPort(4000) - .withTransport( - IngressTransportMethod.TCP) - .withTraffic( - Arrays - .asList( - new TrafficWeight().withRevisionName( - "testcontainerAppTcp-ab1234").withWeight( - 100))))) + new Configuration().withIngress(new Ingress().withExternal(true) + .withTargetPort(3000) + .withExposedPort(4000) + .withTransport(IngressTransportMethod.TCP) + .withTraffic(Arrays + .asList(new TrafficWeight().withRevisionName("testcontainerAppTcp-ab1234").withWeight(100))))) .withTemplate(new Template() .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppTcp:v1") .withName("testcontainerAppTcp") - .withProbes(Arrays.asList(new ContainerAppProbe().withInitialDelaySeconds(3).withPeriodSeconds(3) - .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)).withType(Type.LIVENESS))))) - .withScale( - new Scale().withMinReplicas(1).withMaxReplicas(5) - .withRules(Arrays.asList(new ScaleRule().withName("tcpscalingrule") - .withTcp(new TcpScaleRule().withMetadata(mapOf("concurrentConnections", "50"))))))) + .withProbes(Arrays.asList(new ContainerAppProbe().withInitialDelaySeconds(3) + .withPeriodSeconds(3) + .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) + .withType(Type.LIVENESS))))) + .withScale(new Scale().withMinReplicas(1) + .withMaxReplicas(5) + .withRules(Arrays.asList(new ScaleRule().withName("tcpscalingrule") + .withTcp(new TcpScaleRule().withMetadata(mapOf("concurrentConnections", "50"))))))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ContainerApps_ManagedBy_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Kind_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update App Kind. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateAppKind(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps() + .define("testcontainerAppKind") + .withRegion("East Us") + .withExistingResourceGroup("rg") + .withManagedBy( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Web/sites/testcontainerAppKind") + .withKind(Kind.WORKFLOWAPP) + .withManagedEnvironmentId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/testmanagedenv3") + .withConfiguration(new Configuration().withActiveRevisionsMode(ActiveRevisionsMode.SINGLE) + .withIngress(new Ingress().withExternal(true).withTargetPort(80).withAllowInsecure(true))) + .withTemplate(new Template() + .withContainers(Arrays.asList(new Container().withImage("default/logicapps-base:latest") + .withName("logicapps-container") + .withResources(new ContainerResources().withCpu(1.0D).withMemory("2.0Gi")))) + .withScale(new Scale().withMinReplicas(1).withMaxReplicas(30))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_ManagedBy_CreateOrUpdate.json */ /** * Sample code: Create or Update ManagedBy App. @@ -245,30 +500,31 @@ public static void createOrUpdateTcpApp(com.azure.resourcemanager.appcontainers. */ public static void createOrUpdateManagedByApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().define("testcontainerAppManagedBy").withRegion("East US") + manager.containerApps() + .define("testcontainerAppManagedBy") + .withRegion("East US") .withExistingResourceGroup("rg") .withManagedBy( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.AppPlatform/Spring/springapp") .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withConfiguration( - new Configuration() - .withIngress( - new Ingress().withExternal(true).withTargetPort(3000).withExposedPort(4000) - .withTransport(IngressTransportMethod.TCP).withTraffic( - Arrays - .asList( - new TrafficWeight().withRevisionName("testcontainerAppManagedBy-ab1234") - .withWeight(100))))) + .withConfiguration(new Configuration().withIngress(new Ingress().withExternal(true) + .withTargetPort(3000) + .withExposedPort(4000) + .withTransport(IngressTransportMethod.TCP) + .withTraffic(Arrays + .asList(new TrafficWeight().withRevisionName("testcontainerAppManagedBy-ab1234").withWeight(100))))) .withTemplate(new Template() .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppManagedBy:v1") .withName("testcontainerAppManagedBy") - .withProbes(Arrays.asList(new ContainerAppProbe().withInitialDelaySeconds(3).withPeriodSeconds(3) - .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)).withType(Type.LIVENESS))))) - .withScale( - new Scale().withMinReplicas(1).withMaxReplicas(5) - .withRules(Arrays.asList(new ScaleRule().withName("tcpscalingrule") - .withTcp(new TcpScaleRule().withMetadata(mapOf("concurrentConnections", "50"))))))) + .withProbes(Arrays.asList(new ContainerAppProbe().withInitialDelaySeconds(3) + .withPeriodSeconds(3) + .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) + .withType(Type.LIVENESS))))) + .withScale(new Scale().withMinReplicas(1) + .withMaxReplicas(5) + .withRules(Arrays.asList(new ScaleRule().withName("tcpscalingrule") + .withTcp(new TcpScaleRule().withMetadata(mapOf("concurrentConnections", "50"))))))) .create(); } 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 47048d97bd88..df3f8ef188ed 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 a0d8c8dc108f..2378cbf7f467 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 @@ -9,9 +9,7 @@ */ public final class ContainerAppsDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerAppsDiagnostics_Get - * .json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsDiagnostics_Get.json */ /** * Sample code: Get Container App's diagnostics info. @@ -20,7 +18,8 @@ public final class ContainerAppsDiagnosticsGetDetectorSamples { */ public static void getContainerAppSDiagnosticsInfo(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics().getDetectorWithResponse("mikono-workerapp-test-rg", "mikono-capp-stage1", - "cappcontainerappnetworkIO", com.azure.core.util.Context.NONE); + manager.containerAppsDiagnostics() + .getDetectorWithResponse("mikono-workerapp-test-rg", "mikono-capp-stage1", "cappcontainerappnetworkIO", + com.azure.core.util.Context.NONE); } } 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 aa1614e9b831..9dbb6212e556 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsDiagnosticsGetRevisionSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. @@ -19,7 +18,8 @@ public final class ContainerAppsDiagnosticsGetRevisionSamples { */ public static void getContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics().getRevisionWithResponse("rg", "testcontainerApp0", - "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + manager.containerAppsDiagnostics() + .getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", + com.azure.core.util.Context.NONE); } } 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 a6264f1afb5f..3bdad4ebeae5 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsDiagnosticsGetRootSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -18,7 +17,7 @@ public final class ContainerAppsDiagnosticsGetRootSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics().getRootWithResponse("rg", "testcontainerApp0", - com.azure.core.util.Context.NONE); + manager.containerAppsDiagnostics() + .getRootWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); } } 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 6bda0b6f50de..108f19a3f1e1 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ContainerAppsDiagnostics_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostics for a given Container App. @@ -19,7 +18,7 @@ public final class ContainerAppsDiagnosticsListDetectorsSamples { */ public static void getTheListOfAvailableDiagnosticsForAGivenContainerApp( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics().listDetectors("mikono-workerapp-test-rg", "mikono-capp-stage1", - com.azure.core.util.Context.NONE); + manager.containerAppsDiagnostics() + .listDetectors("mikono-workerapp-test-rg", "mikono-capp-stage1", com.azure.core.util.Context.NONE); } } 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 3a04c7903251..1dcd7e2bc0c3 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsDiagnosticsListRevisionsSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. @@ -19,7 +18,7 @@ public final class ContainerAppsDiagnosticsListRevisionsSamples { */ public static void listContainerAppSRevisions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsDiagnostics().listRevisions("rg", "testcontainerApp0", null, - com.azure.core.util.Context.NONE); + manager.containerAppsDiagnostics() + .listRevisions("rg", "testcontainerApp0", null, com.azure.core.util.Context.NONE); } } 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 7c041c9d923c..6c414f44c5d0 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 @@ -9,9 +9,7 @@ */ public final class ContainerAppsGetAuthTokenSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_GetAuthToken. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 ff0cf63b25b6..3e16aac38f60 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -18,7 +17,7 @@ public final class ContainerAppsGetByResourceGroupSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().getByResourceGroupWithResponse("rg", "testcontainerApp0", - com.azure.core.util.Context.NONE); + manager.containerApps() + .getByResourceGroupWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); } } 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 44027ab39d2b..db4d9689ee97 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ContainerApps_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 174e04e654e2..e6e94d996d67 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ContainerApps_ListCustomHostNameAnalysis.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json */ /** * Sample code: Analyze Custom Hostname. @@ -18,7 +17,8 @@ public final class ContainerAppsListCustomHostnameAnalysisSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void analyzeCustomHostname(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().listCustomHostnameAnalysisWithResponse("rg", "testcontainerApp0", "my.name.corp", - com.azure.core.util.Context.NONE); + manager.containerApps() + .listCustomHostnameAnalysisWithResponse("rg", "testcontainerApp0", "my.name.corp", + com.azure.core.util.Context.NONE); } } 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 8610a6fd759e..09654928516f 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ContainerApps_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 ef9b743107ff..f2d92e004c77 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 @@ -9,9 +9,7 @@ */ public final class ContainerAppsListSecretsSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_ListSecrets. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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/ContainerAppsPatchesApplySamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplySamples.java new file mode 100644 index 000000000000..b63e218320b3 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplySamples.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 ContainerAppsPatches Apply. + */ +public final class ContainerAppsPatchesApplySamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_Apply.json + */ + /** + * Sample code: ContainerAppsPatches_Apply_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsPatchesApply0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsPatches().apply("rg", "test-app", "testPatch-25fe4b", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesDeleteSamples.java new file mode 100644 index 000000000000..3de07627b737 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesDeleteSamples.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 ContainerAppsPatches Delete. + */ +public final class ContainerAppsPatchesDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_Delete.json + */ + /** + * Sample code: ContainerAppsPatches_Delete_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsPatchesDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsPatches().delete("rg", "test-app", "testPatch-25fe4b", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetSamples.java new file mode 100644 index 000000000000..afe348e3e795 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetSamples.java @@ -0,0 +1,24 @@ +// 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 ContainerAppsPatches Get. + */ +public final class ContainerAppsPatchesGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_Get.json + */ + /** + * Sample code: ContainerAppsPatches_Get_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsPatchesGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsPatches() + .getWithResponse("rg", "test-app", "testPatch-25fe4b", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppSamples.java new file mode 100644 index 000000000000..3c2e2341417e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppSamples.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 ContainerAppsPatches ListByContainerApp. + */ +public final class ContainerAppsPatchesListByContainerAppSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_ListByContainerApp.json + */ + /** + * Sample code: ContainerAppsPatches_ListByContainerApp_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void containerAppsPatchesListByContainerApp0( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsPatches().listByContainerApp("rg", "test-app", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesSkipConfigureSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesSkipConfigureSamples.java new file mode 100644 index 000000000000..8147ae7a01bd --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesSkipConfigureSamples.java @@ -0,0 +1,27 @@ +// 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.PatchSkipConfig; + +/** + * Samples for ContainerAppsPatches SkipConfigure. + */ +public final class ContainerAppsPatchesSkipConfigureSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_Skip_Configure.json + */ + /** + * Sample code: ContainerAppsPatches_Skip_Configure_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsPatchesSkipConfigure0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsPatches() + .skipConfigure("rg", "test-app", "testPatch-25fe4b", new PatchSkipConfig().withSkip(true), + com.azure.core.util.Context.NONE); + } +} 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 4a723e1189c1..3e3fb8d4b77a 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Replicas_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Replicas_Get.json */ /** * Sample code: Get Container App's revision replica. @@ -19,7 +18,8 @@ public final class ContainerAppsRevisionReplicasGetReplicaSamples { */ public static void getContainerAppSRevisionReplica(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisionReplicas().getReplicaWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", - "myapp--0wlqy09-5d9774cff-5wnd8", com.azure.core.util.Context.NONE); + manager.containerAppsRevisionReplicas() + .getReplicaWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", "myapp--0wlqy09-5d9774cff-5wnd8", + com.azure.core.util.Context.NONE); } } 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 05dc2154609e..47d25bce0d2d 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsRevisionReplicasListReplicasSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Replicas_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Replicas_List.json */ /** * Sample code: List Container App's replicas. @@ -19,7 +18,7 @@ public final class ContainerAppsRevisionReplicasListReplicasSamples { */ public static void listContainerAppSReplicas(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisionReplicas().listReplicasWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", - com.azure.core.util.Context.NONE); + manager.containerAppsRevisionReplicas() + .listReplicasWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", com.azure.core.util.Context.NONE); } } 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 718323d35fcb..9952a31c5bb4 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsRevisionsActivateRevisionSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Activate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Activate.json */ /** * Sample code: Activate Container App's revision. @@ -19,7 +18,8 @@ public final class ContainerAppsRevisionsActivateRevisionSamples { */ public static void activateContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisions().activateRevisionWithResponse("rg", "testcontainerApp0", - "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + manager.containerAppsRevisions() + .activateRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", + com.azure.core.util.Context.NONE); } } 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 02575b8d6abf..fa8302027325 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Deactivate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Deactivate.json */ /** * Sample code: Deactivate Container App's revision. @@ -19,7 +18,8 @@ public final class ContainerAppsRevisionsDeactivateRevisionSamples { */ public static void deactivateContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisions().deactivateRevisionWithResponse("rg", "testcontainerApp0", - "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + manager.containerAppsRevisions() + .deactivateRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", + com.azure.core.util.Context.NONE); } } 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 9d602a61b191..bb7b6d526587 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsRevisionsGetRevisionSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. @@ -19,7 +18,8 @@ public final class ContainerAppsRevisionsGetRevisionSamples { */ public static void getContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisions().getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", - com.azure.core.util.Context.NONE); + manager.containerAppsRevisions() + .getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", + com.azure.core.util.Context.NONE); } } 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 310c3fb98a89..9a0ae6eb9063 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsRevisionsListRevisionsSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. @@ -19,7 +18,7 @@ public final class ContainerAppsRevisionsListRevisionsSamples { */ public static void listContainerAppSRevisions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisions().listRevisions("rg", "testcontainerApp0", null, - com.azure.core.util.Context.NONE); + manager.containerAppsRevisions() + .listRevisions("rg", "testcontainerApp0", null, com.azure.core.util.Context.NONE); } } 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 548cd13d8829..2e9a857e2615 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsRevisionsRestartRevisionSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Restart.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Restart.json */ /** * Sample code: Restart Container App's revision. @@ -19,7 +18,8 @@ public final class ContainerAppsRevisionsRestartRevisionSamples { */ public static void restartContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsRevisions().restartRevisionWithResponse("rg", "testStaticSite0", - "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + manager.containerAppsRevisions() + .restartRevisionWithResponse("rg", "testStaticSite0", "testcontainerApp0-pjxhsye", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..e8dfbab4f849 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsCreateOrUpdateSamples.java @@ -0,0 +1,57 @@ +// 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.ContainerType; +import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; +import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; +import com.azure.resourcemanager.appcontainers.models.ExecutionType; +import com.azure.resourcemanager.appcontainers.models.PoolManagementType; +import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; +import com.azure.resourcemanager.appcontainers.models.SessionContainer; +import com.azure.resourcemanager.appcontainers.models.SessionContainerResources; +import com.azure.resourcemanager.appcontainers.models.SessionIngress; +import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; +import com.azure.resourcemanager.appcontainers.models.SessionNetworkStatus; +import java.util.Arrays; + +/** + * Samples for ContainerAppsSessionPools CreateOrUpdate. + */ +public final class ContainerAppsSessionPoolsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SessionPools_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Session Pool. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateSessionPool(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSessionPools() + .define("testsessionpool") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withContainerType(ContainerType.CUSTOM_CONTAINER) + .withPoolManagementType(PoolManagementType.DYNAMIC) + .withScaleConfiguration( + new ScaleConfiguration().withMaxConcurrentSessions(500).withReadySessionInstances(100)) + .withDynamicPoolConfiguration( + new DynamicPoolConfiguration().withExecutionType(ExecutionType.TIMED).withCooldownPeriodInSeconds(600)) + .withCustomContainerTemplate(new CustomContainerTemplate() + .withContainers(Arrays.asList(new SessionContainer().withImage("repo/testcontainer:v4") + .withName("testinitcontainer") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new SessionContainerResources().withCpu(0.25D).withMemory("0.5Gi")))) + .withIngress(new SessionIngress().withTargetPort(80))) + .withSessionNetworkConfiguration( + new SessionNetworkConfiguration().withStatus(SessionNetworkStatus.EGRESS_ENABLED)) + .create(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsDeleteSamples.java new file mode 100644 index 000000000000..9980797fe161 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsDeleteSamples.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 ContainerAppsSessionPools Delete. + */ +public final class ContainerAppsSessionPoolsDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SessionPools_Delete.json + */ + /** + * Sample code: Delete Session Pool. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void deleteSessionPool(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSessionPools().delete("rg", "testsessionpool", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsGetByResourceGroupSamples.java new file mode 100644 index 000000000000..a4f275388990 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsGetByResourceGroupSamples.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 ContainerAppsSessionPools GetByResourceGroup. + */ +public final class ContainerAppsSessionPoolsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SessionPools_Get.json + */ + /** + * Sample code: Get Session Pool. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getSessionPool(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSessionPools() + .getByResourceGroupWithResponse("rg", "testsessionpool", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListByResourceGroupSamples.java new file mode 100644 index 000000000000..6f37e88a5144 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListByResourceGroupSamples.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 ContainerAppsSessionPools ListByResourceGroup. + */ +public final class ContainerAppsSessionPoolsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SessionPools_ListByResourceGroup.json + */ + /** + * Sample code: List Session Pools by resource group. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listSessionPoolsByResourceGroup(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSessionPools().listByResourceGroup("rg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListSamples.java new file mode 100644 index 000000000000..bd5f8fb180d1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListSamples.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 ContainerAppsSessionPools List. + */ +public final class ContainerAppsSessionPoolsListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SessionPools_ListBySubscription.json + */ + /** + * Sample code: List Session Pools by subscription. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listSessionPoolsBySubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSessionPools().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsUpdateSamples.java new file mode 100644 index 000000000000..cc69b1d41e96 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsUpdateSamples.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.generated; + +import com.azure.resourcemanager.appcontainers.models.CustomContainerTemplate; +import com.azure.resourcemanager.appcontainers.models.DynamicPoolConfiguration; +import com.azure.resourcemanager.appcontainers.models.ExecutionType; +import com.azure.resourcemanager.appcontainers.models.ScaleConfiguration; +import com.azure.resourcemanager.appcontainers.models.SessionContainer; +import com.azure.resourcemanager.appcontainers.models.SessionContainerResources; +import com.azure.resourcemanager.appcontainers.models.SessionIngress; +import com.azure.resourcemanager.appcontainers.models.SessionNetworkConfiguration; +import com.azure.resourcemanager.appcontainers.models.SessionNetworkStatus; +import com.azure.resourcemanager.appcontainers.models.SessionPool; +import java.util.Arrays; + +/** + * Samples for ContainerAppsSessionPools Update. + */ +public final class ContainerAppsSessionPoolsUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SessionPools_Patch.json + */ + /** + * Sample code: Update Session Pool. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void updateSessionPool(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + SessionPool resource = manager.containerAppsSessionPools() + .getByResourceGroupWithResponse("rg", "testsessionpool", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withScaleConfiguration( + new ScaleConfiguration().withMaxConcurrentSessions(500).withReadySessionInstances(100)) + .withDynamicPoolConfiguration( + new DynamicPoolConfiguration().withExecutionType(ExecutionType.TIMED).withCooldownPeriodInSeconds(600)) + .withCustomContainerTemplate(new CustomContainerTemplate() + .withContainers(Arrays.asList(new SessionContainer().withImage("repo/testcontainer:v4") + .withName("testinitcontainer") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new SessionContainerResources().withCpu(0.25D).withMemory("0.5Gi")))) + .withIngress(new SessionIngress().withTargetPort(80))) + .withSessionNetworkConfiguration( + new SessionNetworkConfiguration().withStatus(SessionNetworkStatus.EGRESS_ENABLED)) + .apply(); + } +} 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 a95df9fdde09..badfdf280e1e 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 @@ -15,8 +15,7 @@ */ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * SourceControls_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SourceControls_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App SourceControl. @@ -25,15 +24,22 @@ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { */ public static void createOrUpdateContainerAppSourceControl( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSourceControls().define("current") + manager.containerAppsSourceControls() + .define("current") .withExistingContainerApp("workerapps-rg-xj", "testcanadacentral") - .withRepoUrl("https://github.com/xwang971/ghatest").withBranch("master") + .withRepoUrl("https://github.com/xwang971/ghatest") + .withBranch("master") .withGithubActionConfiguration(new GithubActionConfiguration() .withRegistryInfo(new RegistryInfo().withRegistryUrl("test-registry.azurecr.io") - .withRegistryUsername("test-registry").withRegistryPassword("fakeTokenPlaceholder")) + .withRegistryUsername("test-registry") + .withRegistryPassword("fakeTokenPlaceholder")) .withAzureCredentials(new AzureCredentials().withClientId("") - .withClientSecret("fakeTokenPlaceholder").withTenantId("").withKind("feaderated")) - .withContextPath("./").withGithubPersonalAccessToken("fakeTokenPlaceholder").withImage("image/tag") + .withClientSecret("fakeTokenPlaceholder") + .withTenantId("") + .withKind("feaderated")) + .withContextPath("./") + .withGithubPersonalAccessToken("fakeTokenPlaceholder") + .withImage("image/tag") .withBuildEnvironmentVariables( Arrays.asList(new EnvironmentVariable().withName("foo1").withValue("bar1"), new EnvironmentVariable().withName("foo2").withValue("bar2")))) 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 58c3fd76c7fe..118398448a75 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsSourceControlsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/SourceControls_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SourceControls_Delete.json */ /** * Sample code: Delete Container App SourceControl. @@ -19,7 +18,7 @@ public final class ContainerAppsSourceControlsDeleteSamples { */ public static void deleteContainerAppSourceControl(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSourceControls().delete("workerapps-rg-xj", "testcanadacentral", "current", - com.azure.core.util.Context.NONE); + manager.containerAppsSourceControls() + .delete("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } } 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 4a72f7738a85..a856860d7b20 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsSourceControlsGetSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/SourceControls_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SourceControls_Get.json */ /** * Sample code: Get Container App's SourceControl. @@ -19,7 +18,7 @@ public final class ContainerAppsSourceControlsGetSamples { */ public static void getContainerAppSSourceControl(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSourceControls().getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", - com.azure.core.util.Context.NONE); + manager.containerAppsSourceControls() + .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); } } 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 568c72b952ba..db36e6f3b38a 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * SourceControls_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SourceControls_ListByContainer.json */ /** * Sample code: List App's Source Controls. @@ -18,7 +17,7 @@ public final class ContainerAppsSourceControlsListByContainerAppSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void listAppSSourceControls(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerAppsSourceControls().listByContainerApp("workerapps-rg-xj", "testcanadacentral", - com.azure.core.util.Context.NONE); + manager.containerAppsSourceControls() + .listByContainerApp("workerapps-rg-xj", "testcanadacentral", com.azure.core.util.Context.NONE); } } 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 fc183d69d664..461b03e147ba 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsStartSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Start.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 fcde0beb24fb..491e8614b32a 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 @@ -9,8 +9,7 @@ */ public final class ContainerAppsStopSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Stop.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 0adee1573e3a..1b164b09bc57 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 @@ -22,7 +22,14 @@ import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; +import com.azure.resourcemanager.appcontainers.models.Level; +import com.azure.resourcemanager.appcontainers.models.LoggerSetting; import com.azure.resourcemanager.appcontainers.models.LogLevel; +import com.azure.resourcemanager.appcontainers.models.Runtime; +import com.azure.resourcemanager.appcontainers.models.RuntimeDotnet; +import com.azure.resourcemanager.appcontainers.models.RuntimeJava; +import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgent; +import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging; import com.azure.resourcemanager.appcontainers.models.Scale; import com.azure.resourcemanager.appcontainers.models.ScaleRule; import com.azure.resourcemanager.appcontainers.models.Service; @@ -39,8 +46,7 @@ */ public final class ContainerAppsUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Patch.json */ /** * Sample code: Patch Container App. @@ -49,50 +55,82 @@ public final class ContainerAppsUpdateSamples { */ public static void patchContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { ContainerApp resource = manager.containerApps() - .getByResourceGroupWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE).getValue(); - resource - .update().withTags( - mapOf("tag1", "value1", "tag2", "value2")) - .withConfiguration(new Configuration().withIngress(new Ingress().withExternal(true).withTargetPort(3000) - .withTraffic(Arrays.asList(new TrafficWeight().withRevisionName("testcontainerApp0-ab1234") - .withWeight(100).withLabel("production"))) - .withCustomDomains(Arrays.asList(new CustomDomain().withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED).withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain().withName("www.my-other-name.com").withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions(Arrays.asList( - new IpSecurityRestrictionRule().withName("Allow work IP A subnet") - .withDescription("Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/32").withAction(Action.ALLOW), - new IpSecurityRestrictionRule().withName("Allow work IP B subnet") - .withDescription("Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/8").withAction(Action.ALLOW))) - .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY))) - .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) - .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(true)) - .withMaxInactiveRevisions(10).withService(new Service().withType("redis"))) - .withTemplate( - new Template() - .withInitContainers(Arrays.asList( - new InitContainer().withImage("repo/testcontainerApp0:v4").withName("testinitcontainerApp0") - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerApp0:v1") - .withName("testcontainerApp0").withProbes(Arrays.asList(new ContainerAppProbe() - .withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header").withValue("Awesome"))) - .withPath("/health").withPort(8080)) - .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) - .withScale(new Scale().withMinReplicas(1).withMaxReplicas(5) - .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule").withCustom( - new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50")))))) - .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service") - .withName("service").withClientType("dotnet") - .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) + .getByResourceGroupWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withConfiguration( + new Configuration() + .withIngress(new Ingress().withExternal(true) + .withTargetPort(3000) + .withTraffic(Arrays.asList(new TrafficWeight() + .withRevisionName("testcontainerApp0-ab1234") + .withWeight(100) + .withLabel("production"))) + .withCustomDomains(Arrays.asList(new CustomDomain() + .withName("www.my-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + new CustomDomain().withName("www.my-other-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions( + Arrays + .asList( + new IpSecurityRestrictionRule().withName("Allow work IP A subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32") + .withAction(Action.ALLOW), + new IpSecurityRestrictionRule().withName("Allow work IP B subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8") + .withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY))) + .withDapr(new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withRuntime(new Runtime().withJava(new RuntimeJava().withEnableMetrics(true) + .withJavaAgent(new RuntimeJavaAgent().withEnabled(true) + .withLogging(new RuntimeJavaAgentLogging().withLoggerSettings(Arrays.asList( + new LoggerSetting().withLogger("org.springframework.boot").withLevel(Level.DEBUG)))))) + .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) + .withMaxInactiveRevisions(10) + .withService(new Service().withType("redis"))) + .withTemplate(new Template() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0") + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers(Arrays.asList(new Container() + .withImage("repo/testcontainerApp0:v1") + .withName("testcontainerApp0") + .withProbes( + Arrays.asList(new ContainerAppProbe().withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders( + Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") + .withValue("Awesome"))) + .withPath("/health") + .withPort(8080)).withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withScale( + new Scale().withMinReplicas(1) + .withMaxReplicas(5) + .withRules( + Arrays.asList(new ScaleRule().withName("httpscalingrule") + .withCustom(new CustomScaleRule().withType("http") + .withMetadata(mapOf("concurrentRequests", "50")))))) + .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service") + .withName("service") + .withClientType("dotnet") + .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) .apply(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateSamples.java index b9fee2733760..a7fd4ebdeb8a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateSamples.java @@ -15,8 +15,7 @@ */ public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprComponentResiliencyPolicy_CreateOrUpdate_OutboundOnly.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_OutboundOnly.json */ /** * Sample code: Create or update dapr component resiliency policy with outbound policy only. @@ -25,22 +24,25 @@ public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { */ public static void createOrUpdateDaprComponentResiliencyPolicyWithOutboundPolicyOnly( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies().define("myresiliencypolicy") + manager.daprComponentResiliencyPolicies() + .define("myresiliencypolicy") .withExistingDaprComponent("examplerg", "myenvironment", "mydaprcomponent") .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(5) .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(100).withMaxIntervalInMilliseconds(30000))) + .withInitialDelayInMilliseconds(100) + .withMaxIntervalInMilliseconds(30000))) .withTimeoutPolicy( new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(12)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(3).withTimeoutInSeconds(20).withIntervalInSeconds(60))) + .withCircuitBreakerPolicy( + new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(3) + .withTimeoutInSeconds(20) + .withIntervalInSeconds(60))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprComponentResiliencyPolicy_CreateOrUpdate_AllOptions.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_AllOptions.json */ /** * Sample code: Create or update dapr component resiliency policy with all options. @@ -49,30 +51,36 @@ public static void createOrUpdateDaprComponentResiliencyPolicyWithOutboundPolicy */ public static void createOrUpdateDaprComponentResiliencyPolicyWithAllOptions( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies().define("myresiliencypolicy") + manager.daprComponentResiliencyPolicies() + .define("myresiliencypolicy") .withExistingDaprComponent("examplerg", "myenvironment", "mydaprcomponent") .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(15) .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(2000).withMaxIntervalInMilliseconds(5500))) + .withInitialDelayInMilliseconds(2000) + .withMaxIntervalInMilliseconds(5500))) .withTimeoutPolicy( new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(30)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(5).withTimeoutInSeconds(10).withIntervalInSeconds(4))) + .withCircuitBreakerPolicy( + new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(5) + .withTimeoutInSeconds(10) + .withIntervalInSeconds(4))) .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(5) .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(100).withMaxIntervalInMilliseconds(30000))) + .withInitialDelayInMilliseconds(100) + .withMaxIntervalInMilliseconds(30000))) .withTimeoutPolicy( new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(12)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(3).withTimeoutInSeconds(20).withIntervalInSeconds(60))) + .withCircuitBreakerPolicy( + new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(3) + .withTimeoutInSeconds(20) + .withIntervalInSeconds(60))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprComponentResiliencyPolicy_CreateOrUpdate_SparseOptions.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponentResiliencyPolicy_CreateOrUpdate_SparseOptions.json */ /** * Sample code: Create or update dapr component resiliency policy with sparse options. @@ -81,14 +89,17 @@ public static void createOrUpdateDaprComponentResiliencyPolicyWithAllOptions( */ public static void createOrUpdateDaprComponentResiliencyPolicyWithSparseOptions( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies().define("myresiliencypolicy") + manager.daprComponentResiliencyPolicies() + .define("myresiliencypolicy") .withExistingDaprComponent("examplerg", "myenvironment", "mydaprcomponent") .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(5) .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(2000).withMaxIntervalInMilliseconds(5500))) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(3).withTimeoutInSeconds(20))) + .withInitialDelayInMilliseconds(2000) + .withMaxIntervalInMilliseconds(5500))) + .withCircuitBreakerPolicy( + new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(3) + .withTimeoutInSeconds(20))) .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration().withTimeoutPolicy( new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(12))) .create(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteSamples.java index 5028bc277fa7..10bbfebd24bb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteSamples.java @@ -9,8 +9,7 @@ */ public final class DaprComponentResiliencyPoliciesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprComponentResiliencyPolicies_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponentResiliencyPolicies_Delete.json */ /** * Sample code: Delete dapr component resiliency policy. @@ -19,7 +18,8 @@ public final class DaprComponentResiliencyPoliciesDeleteSamples { */ public static void deleteDaprComponentResiliencyPolicy(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies().deleteWithResponse("examplerg", "myenvironment", "mydaprcomponent", - "myresiliencypolicy", com.azure.core.util.Context.NONE); + manager.daprComponentResiliencyPolicies() + .deleteWithResponse("examplerg", "myenvironment", "mydaprcomponent", "myresiliencypolicy", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetSamples.java index b61495084f83..28e019fe07a6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetSamples.java @@ -9,8 +9,7 @@ */ public final class DaprComponentResiliencyPoliciesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprComponentResiliencyPolicies_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponentResiliencyPolicies_Get.json */ /** * Sample code: Get Dapr component resiliency policy. @@ -19,7 +18,8 @@ public final class DaprComponentResiliencyPoliciesGetSamples { */ public static void getDaprComponentResiliencyPolicy(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies().getWithResponse("examplerg", "myenvironment", "mydaprcomponent", - "myresiliencypolicy", com.azure.core.util.Context.NONE); + manager.daprComponentResiliencyPolicies() + .getWithResponse("examplerg", "myenvironment", "mydaprcomponent", "myresiliencypolicy", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListSamples.java index 3958c1b87824..ac0595657743 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListSamples.java @@ -9,8 +9,7 @@ */ public final class DaprComponentResiliencyPoliciesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprComponentResiliencyPolicies_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponentResiliencyPolicies_List.json */ /** * Sample code: List Dapr component resiliency policies. @@ -19,7 +18,7 @@ public final class DaprComponentResiliencyPoliciesListSamples { */ public static void listDaprComponentResiliencyPolicies(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponentResiliencyPolicies().list("examplerg", "myenvironment", "mydaprcomponent", - com.azure.core.util.Context.NONE); + manager.daprComponentResiliencyPolicies() + .list("examplerg", "myenvironment", "mydaprcomponent", com.azure.core.util.Context.NONE); } } 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 a5f7ec35e4ac..7f1c79788ef8 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 @@ -16,8 +16,7 @@ */ public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprComponents_CreateOrUpdate_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json */ /** * Sample code: Create or update dapr component with secrets. @@ -26,26 +25,28 @@ public final class DaprComponentsCreateOrUpdateSamples { */ public static void createOrUpdateDaprComponentWithSecrets( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().createOrUpdateWithResponse("examplerg", "myenvironment", "reddog", - new DaprComponentInner().withComponentType("state.azure.cosmosdb").withVersion("v1").withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) - .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), - 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")) - .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); + manager.daprComponents() + .createOrUpdateWithResponse("examplerg", "myenvironment", "reddog", + new DaprComponentInner().withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), + 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")) + .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/preview/2023-11-02-preview/examples/ - * DaprComponents_CreateOrUpdate_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json */ /** * Sample code: Create or update dapr component with secret store component. @@ -54,19 +55,23 @@ public static void createOrUpdateDaprComponentWithSecrets( */ public static void createOrUpdateDaprComponentWithSecretStoreComponent( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().createOrUpdateWithResponse("examplerg", "myenvironment", "reddog", - new DaprComponentInner().withComponentType("state.azure.cosmosdb").withVersion("v1").withIgnoreErrors(false) - .withInitTimeout("50s").withSecretStoreComponent("fakeTokenPlaceholder") - .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), - 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")) - .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); + manager.daprComponents() + .createOrUpdateWithResponse("examplerg", "myenvironment", "reddog", + new DaprComponentInner().withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecretStoreComponent("fakeTokenPlaceholder") + .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), + 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")) + .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 0ca2552786b8..fa352946a983 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 @@ -9,8 +9,7 @@ */ public final class DaprComponentsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_Delete.json */ /** * Sample code: Delete dapr component. @@ -18,7 +17,7 @@ public final class DaprComponentsDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().deleteWithResponse("examplerg", "myenvironment", "reddog", - com.azure.core.util.Context.NONE); + manager.daprComponents() + .deleteWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } 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 4d7160ec58e3..9fe3866607aa 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 @@ -9,8 +9,7 @@ */ public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprComponents_Get_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_Get_SecretStoreComponent.json */ /** * Sample code: Get Dapr Component with secret store component. @@ -19,14 +18,12 @@ public final class DaprComponentsGetSamples { */ public static void getDaprComponentWithSecretStoreComponent( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", - com.azure.core.util.Context.NONE); + manager.daprComponents() + .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_Get_Secrets. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_Get_Secrets.json */ /** * Sample code: Get Dapr Component with secrets. @@ -35,7 +32,7 @@ public static void getDaprComponentWithSecretStoreComponent( */ public static void getDaprComponentWithSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", - com.azure.core.util.Context.NONE); + manager.daprComponents() + .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } 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 485c421cb488..1c59c935f1a1 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 @@ -9,8 +9,7 @@ */ public final class DaprComponentsListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 f20d1b9d59d6..423bf1a85897 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 @@ -9,9 +9,7 @@ */ public final class DaprComponentsListSecretsSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_ListSecrets. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -20,7 +18,7 @@ public final class DaprComponentsListSecretsSamples { */ public static void listContainerAppsSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().listSecretsWithResponse("examplerg", "myenvironment", "reddog", - com.azure.core.util.Context.NONE); + manager.daprComponents() + .listSecretsWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateSamples.java index 9c85aa97a89e..2d0dc723ba09 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateSamples.java @@ -16,8 +16,7 @@ */ public final class DaprSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprSubscriptions_CreateOrUpdate_RouteRulesAndMetadata.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_CreateOrUpdate_RouteRulesAndMetadata.json */ /** * Sample code: Create or update dapr subscription with route rules and metadata. @@ -26,20 +25,22 @@ public final class DaprSubscriptionsCreateOrUpdateSamples { */ public static void createOrUpdateDaprSubscriptionWithRouteRulesAndMetadata( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions().define("mysubscription") - .withExistingManagedEnvironment("examplerg", "myenvironment").withPubsubName("mypubsubcomponent") + manager.daprSubscriptions() + .define("mysubscription") + .withExistingManagedEnvironment("examplerg", "myenvironment") + .withPubsubName("mypubsubcomponent") .withTopic("inventory") .withRoutes(new DaprSubscriptionRoutes() .withRules(Arrays.asList( new DaprSubscriptionRouteRule().withMatch("event.type == 'widget'").withPath("/widgets"), new DaprSubscriptionRouteRule().withMatch("event.type == 'gadget'").withPath("/gadgets"))) .withDefaultProperty("/products")) - .withMetadata(mapOf("foo", "bar", "hello", "world")).create(); + .withMetadata(mapOf("foo", "bar", "hello", "world")) + .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprSubscriptions_CreateOrUpdate_DefaultRoute.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_CreateOrUpdate_DefaultRoute.json */ /** * Sample code: Create or update dapr subscription with default route only. @@ -48,14 +49,17 @@ public static void createOrUpdateDaprSubscriptionWithRouteRulesAndMetadata( */ public static void createOrUpdateDaprSubscriptionWithDefaultRouteOnly( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions().define("mysubscription") - .withExistingManagedEnvironment("examplerg", "myenvironment").withPubsubName("mypubsubcomponent") - .withTopic("inventory").withRoutes(new DaprSubscriptionRoutes().withDefaultProperty("/products")).create(); + manager.daprSubscriptions() + .define("mysubscription") + .withExistingManagedEnvironment("examplerg", "myenvironment") + .withPubsubName("mypubsubcomponent") + .withTopic("inventory") + .withRoutes(new DaprSubscriptionRoutes().withDefaultProperty("/products")) + .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprSubscriptions_CreateOrUpdate_BulkSubscribeAndScopes.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_CreateOrUpdate_BulkSubscribeAndScopes.json */ /** * Sample code: Create or update dapr subscription with bulk subscribe configuration and scopes. @@ -64,11 +68,15 @@ public static void createOrUpdateDaprSubscriptionWithDefaultRouteOnly( */ public static void createOrUpdateDaprSubscriptionWithBulkSubscribeConfigurationAndScopes( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions().define("mysubscription") - .withExistingManagedEnvironment("examplerg", "myenvironment").withPubsubName("mypubsubcomponent") - .withTopic("inventory").withRoutes(new DaprSubscriptionRoutes().withDefaultProperty("/products")) + manager.daprSubscriptions() + .define("mysubscription") + .withExistingManagedEnvironment("examplerg", "myenvironment") + .withPubsubName("mypubsubcomponent") + .withTopic("inventory") + .withRoutes(new DaprSubscriptionRoutes().withDefaultProperty("/products")) .withScopes(Arrays.asList("warehouseapp", "customersupportapp")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(true).withMaxMessagesCount(123) + .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(true) + .withMaxMessagesCount(123) .withMaxAwaitDurationMs(500)) .create(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteSamples.java index 140aede4ee32..2ade929fda93 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteSamples.java @@ -9,9 +9,7 @@ */ public final class DaprSubscriptionsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprSubscriptions_Delete. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_Delete.json */ /** * Sample code: Delete dapr subscription. @@ -19,7 +17,7 @@ public final class DaprSubscriptionsDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteDaprSubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions().deleteWithResponse("examplerg", "myenvironment", "mysubscription", - com.azure.core.util.Context.NONE); + manager.daprSubscriptions() + .deleteWithResponse("examplerg", "myenvironment", "mysubscription", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetSamples.java index e6c044b425c3..f5c97468aad6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetSamples.java @@ -9,8 +9,7 @@ */ public final class DaprSubscriptionsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprSubscriptions_Get_DefaultRoute.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_Get_DefaultRoute.json */ /** * Sample code: Get Dapr subscription with bulk subscribe configuration and scopes. @@ -19,13 +18,12 @@ public final class DaprSubscriptionsGetSamples { */ public static void getDaprSubscriptionWithBulkSubscribeConfigurationAndScopes( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions().getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", - com.azure.core.util.Context.NONE); + manager.daprSubscriptions() + .getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprSubscriptions_Get_BulkSubscribeAndScopes.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_Get_BulkSubscribeAndScopes.json */ /** * Sample code: Get Dapr subscription with default route only. @@ -34,13 +32,12 @@ public static void getDaprSubscriptionWithBulkSubscribeConfigurationAndScopes( */ public static void getDaprSubscriptionWithDefaultRouteOnly( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions().getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", - com.azure.core.util.Context.NONE); + manager.daprSubscriptions() + .getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DaprSubscriptions_Get_RouteRulesAndMetadata.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_Get_RouteRulesAndMetadata.json */ /** * Sample code: GetDapr subscription with route rules and metadata. @@ -49,7 +46,7 @@ public static void getDaprSubscriptionWithDefaultRouteOnly( */ public static void getDaprSubscriptionWithRouteRulesAndMetadata( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprSubscriptions().getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", - com.azure.core.util.Context.NONE); + manager.daprSubscriptions() + .getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListSamples.java index c94c7a32d307..53f7611e2414 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListSamples.java @@ -9,8 +9,7 @@ */ public final class DaprSubscriptionsListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprSubscriptions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_List.json */ /** * Sample code: List Dapr subscriptions. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateSamples.java index e89663f1e975..470447265b39 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateSamples.java @@ -14,8 +14,7 @@ */ public final class DotNetComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DotNetComponents_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_CreateOrUpdate.json */ /** * Sample code: Create or Update .NET Component. @@ -24,7 +23,8 @@ public final class DotNetComponentsCreateOrUpdateSamples { */ public static void createOrUpdateNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents().define("mydotnetcomponent") + manager.dotNetComponents() + .define("mydotnetcomponent") .withExistingManagedEnvironment("examplerg", "myenvironment") .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) .withConfigurations(Arrays.asList( @@ -33,8 +33,7 @@ public final class DotNetComponentsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DotNetComponents_CreateOrUpdate_ServiceBind.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_CreateOrUpdate_ServiceBind.json */ /** * Sample code: Create or Update .NET Component with ServiceBinds. @@ -43,13 +42,15 @@ public final class DotNetComponentsCreateOrUpdateSamples { */ public static void createOrUpdateNETComponentWithServiceBinds( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents().define("mydotnetcomponent") + manager.dotNetComponents() + .define("mydotnetcomponent") .withExistingManagedEnvironment("examplerg", "myenvironment") .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) .withConfigurations(Arrays.asList( new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) - .withServiceBinds(Arrays.asList(new DotNetComponentServiceBind().withName("yellowcat").withServiceId( - "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/dotNetComponents/yellowcat"))) + .withServiceBinds(Arrays.asList(new DotNetComponentServiceBind().withName("yellowcat") + .withServiceId( + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/dotNetComponents/yellowcat"))) .create(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsDeleteSamples.java index 9725b60a6de9..e1703c1cb896 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsDeleteSamples.java @@ -9,8 +9,7 @@ */ public final class DotNetComponentsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Delete.json */ /** * Sample code: Delete .NET Component. @@ -18,7 +17,7 @@ public final class DotNetComponentsDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents().delete("examplerg", "myenvironment", "mydotnetcomponent", - com.azure.core.util.Context.NONE); + manager.dotNetComponents() + .delete("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetSamples.java index 1fbd1fab504c..8beb7d8ddc74 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetSamples.java @@ -9,8 +9,7 @@ */ public final class DotNetComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DotNetComponents_Get_ServiceBind.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Get_ServiceBind.json */ /** * Sample code: Get .NET Component with ServiceBinds. @@ -19,13 +18,12 @@ public final class DotNetComponentsGetSamples { */ public static void getNETComponentWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents().getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", - com.azure.core.util.Context.NONE); + manager.dotNetComponents() + .getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Get.json */ /** * Sample code: Get .NET Component. @@ -33,7 +31,7 @@ public final class DotNetComponentsGetSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.dotNetComponents().getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", - com.azure.core.util.Context.NONE); + manager.dotNetComponents() + .getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListSamples.java index 9ec1b69c8d0c..2a6a513b38f0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListSamples.java @@ -9,8 +9,7 @@ */ public final class DotNetComponentsListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_List.json */ /** * Sample code: List .NET Components. @@ -22,8 +21,7 @@ public static void listNETComponents(com.azure.resourcemanager.appcontainers.Con } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DotNetComponents_List_ServiceBind.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_List_ServiceBind.json */ /** * Sample code: List .NET Components with ServiceBinds. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsUpdateSamples.java index a2bc69652dd2..1b2553fb59ac 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsUpdateSamples.java @@ -15,8 +15,7 @@ */ public final class DotNetComponentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * DotNetComponents_Patch_ServiceBind.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Patch_ServiceBind.json */ /** * Sample code: Patch .NET Component with ServiceBinds. @@ -28,17 +27,18 @@ public final class DotNetComponentsUpdateSamples { DotNetComponent resource = manager.dotNetComponents() .getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) + resource.update() + .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) .withConfigurations(Arrays.asList( new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) - .withServiceBinds(Arrays.asList(new DotNetComponentServiceBind().withName("yellowcat").withServiceId( - "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/dotNetComponents/yellowcat"))) + .withServiceBinds(Arrays.asList(new DotNetComponentServiceBind().withName("yellowcat") + .withServiceId( + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/dotNetComponents/yellowcat"))) .apply(); } /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Patch.json */ /** * Sample code: Patch .NET Component. @@ -49,7 +49,8 @@ public static void patchNETComponent(com.azure.resourcemanager.appcontainers.Con DotNetComponent resource = manager.dotNetComponents() .getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) + resource.update() + .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) .withConfigurations(Arrays.asList( new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) .apply(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionInvokeFunctionsHostSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionInvokeFunctionsHostSamples.java new file mode 100644 index 000000000000..0fb2bf57e854 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionInvokeFunctionsHostSamples.java @@ -0,0 +1,25 @@ +// 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 FunctionsExtension InvokeFunctionsHost. + */ +public final class FunctionsExtensionInvokeFunctionsHostSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/FunctionsExtension_Post.json + */ + /** + * Sample code: Invoke Functions host using Functions Extension API. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void invokeFunctionsHostUsingFunctionsExtensionAPI( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.functionsExtensions() + .invokeFunctionsHostWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", + "testcontainerApp0", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateSamples.java index 2f881bdca227..5304fb9bb38d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateSamples.java @@ -6,7 +6,7 @@ import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; +import com.azure.resourcemanager.appcontainers.models.SpringBootAdminComponent; import java.util.Arrays; /** @@ -14,8 +14,7 @@ */ public final class JavaComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * JavaComponents_CreateOrUpdate_ServiceBind.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_CreateOrUpdate_ServiceBind.json */ /** * Sample code: Create or Update Java Component with ServiceBinds. @@ -24,21 +23,22 @@ public final class JavaComponentsCreateOrUpdateSamples { */ public static void createOrUpdateJavaComponentWithServiceBinds( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.javaComponents().define("myjavacomponent").withExistingManagedEnvironment("examplerg", "myenvironment") - .withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) - .withConfigurations(Arrays.asList( + manager.javaComponents() + .define("myjavacomponent") + .withExistingManagedEnvironment("examplerg", "myenvironment") + .withProperties(new SpringBootAdminComponent().withConfigurations(Arrays.asList( new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") .withValue("true"), new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") .withValue("10000ms"))) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat").withServiceId( - "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat"))) + .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat") + .withServiceId( + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat")))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * JavaComponents_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_CreateOrUpdate.json */ /** * Sample code: Create or Update Java Component. @@ -47,13 +47,14 @@ public static void createOrUpdateJavaComponentWithServiceBinds( */ public static void createOrUpdateJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.javaComponents().define("myjavacomponent").withExistingManagedEnvironment("examplerg", "myenvironment") - .withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) - .withConfigurations(Arrays.asList( + manager.javaComponents() + .define("myjavacomponent") + .withExistingManagedEnvironment("examplerg", "myenvironment") + .withProperties(new SpringBootAdminComponent().withConfigurations(Arrays.asList( new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") .withValue("true"), new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") - .withValue("10000ms"))) + .withValue("10000ms")))) .create(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsDeleteSamples.java index 5b5824e89d4a..66dc6e1a0a5a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsDeleteSamples.java @@ -9,8 +9,7 @@ */ public final class JavaComponentsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Delete.json */ /** * Sample code: Delete Java Component. @@ -18,7 +17,7 @@ public final class JavaComponentsDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.javaComponents().delete("examplerg", "myenvironment", "myjavacomponent", - com.azure.core.util.Context.NONE); + manager.javaComponents() + .delete("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetSamples.java index 85ff835b9743..24f2cddd7a8c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetSamples.java @@ -9,8 +9,7 @@ */ public final class JavaComponentsGetSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Get.json */ /** * Sample code: Get Java Component. @@ -18,13 +17,12 @@ public final class JavaComponentsGetSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.javaComponents().getWithResponse("examplerg", "myenvironment", "myjavacomponent", - com.azure.core.util.Context.NONE); + manager.javaComponents() + .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * JavaComponents_Get_ServiceBind.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Get_ServiceBind.json */ /** * Sample code: Get Java Component with ServiceBinds. @@ -33,7 +31,7 @@ public static void getJavaComponent(com.azure.resourcemanager.appcontainers.Cont */ public static void getJavaComponentWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.javaComponents().getWithResponse("examplerg", "myenvironment", "myjavacomponent", - com.azure.core.util.Context.NONE); + manager.javaComponents() + .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListSamples.java index 6f3508a78f3c..e5cc6bb18799 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListSamples.java @@ -9,8 +9,7 @@ */ public final class JavaComponentsListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_List.json */ /** * Sample code: List Java Components. @@ -22,8 +21,7 @@ public static void listJavaComponents(com.azure.resourcemanager.appcontainers.Co } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * JavaComponents_List_ServiceBind.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_List_ServiceBind.json */ /** * Sample code: List Java Components with ServiceBinds. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsUpdateSamples.java index 7164653c6720..dc180ad0ebcd 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsUpdateSamples.java @@ -7,7 +7,7 @@ import com.azure.resourcemanager.appcontainers.models.JavaComponent; import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; +import com.azure.resourcemanager.appcontainers.models.SpringBootAdminComponent; import java.util.Arrays; /** @@ -15,8 +15,7 @@ */ public final class JavaComponentsUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Patch.json */ /** * Sample code: Patch Java Component. @@ -27,18 +26,17 @@ public static void patchJavaComponent(com.azure.resourcemanager.appcontainers.Co JavaComponent resource = manager.javaComponents() .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) - .withConfigurations(Arrays.asList( + resource.update() + .withProperties(new SpringBootAdminComponent().withConfigurations(Arrays.asList( new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") .withValue("true"), new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") - .withValue("10000ms"))) + .withValue("10000ms")))) .apply(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * JavaComponents_Patch_ServiceBind.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Patch_ServiceBind.json */ /** * Sample code: Patch Java Component with ServiceBinds. @@ -50,14 +48,15 @@ public static void patchJavaComponent(com.azure.resourcemanager.appcontainers.Co JavaComponent resource = manager.javaComponents() .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) - .withConfigurations(Arrays.asList( + resource.update() + .withProperties(new SpringBootAdminComponent().withConfigurations(Arrays.asList( new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") .withValue("true"), new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") .withValue("10000ms"))) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat").withServiceId( - "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat"))) + .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat") + .withServiceId( + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat")))) .apply(); } } 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 844b38874169..00c930e9eac6 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 @@ -13,6 +13,8 @@ import com.azure.resourcemanager.appcontainers.models.ContainerResources; import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; +import com.azure.resourcemanager.appcontainers.models.IdentitySettings; +import com.azure.resourcemanager.appcontainers.models.IdentitySettingsLifeCycle; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.JobConfiguration; import com.azure.resourcemanager.appcontainers.models.JobConfigurationEventTriggerConfig; @@ -20,19 +22,23 @@ import com.azure.resourcemanager.appcontainers.models.JobScale; import com.azure.resourcemanager.appcontainers.models.JobScaleRule; import com.azure.resourcemanager.appcontainers.models.JobTemplate; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; import com.azure.resourcemanager.appcontainers.models.TriggerType; import com.azure.resourcemanager.appcontainers.models.Type; +import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; import com.azure.resourcemanager.appcontainers.models.VolumeMount; import java.io.IOException; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** * Samples for Jobs CreateOrUpdate. */ public final class JobsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * Job_CreateorUpdate_ConnectedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_CreateorUpdate_ConnectedEnvironment.json */ /** * Sample code: Create or Update Container Apps Job On A Connected Environment. @@ -41,34 +47,43 @@ public final class JobsCreateOrUpdateSamples { */ public static void createOrUpdateContainerAppsJobOnAConnectedEnvironment( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().define("testcontainerAppsJob0").withRegion("East US").withExistingResourceGroup("rg") + manager.jobs() + .define("testcontainerAppsJob0") + .withRegion("East US") + .withExistingResourceGroup("rg") .withExtendedLocation(new ExtendedLocation().withName( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation") .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube") - .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL).withReplicaTimeout(10) - .withReplicaRetryLimit(10).withManualTriggerConfig( + .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL) + .withReplicaTimeout(10) + .withReplicaRetryLimit(10) + .withManualTriggerConfig( new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4))) .withTemplate(new JobTemplate() .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) + .withName("testinitcontainerAppsJob0") + .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers(Arrays - .asList(new Container().withImage("repo/testcontainerAppsJob0:v1").withName("testcontainerAppsJob0") - .withProbes(Arrays.asList(new ContainerAppProbe() - .withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header").withValue("Awesome"))) - .withPath("/health").withPort(8080)) - .withInitialDelaySeconds(5).withPeriodSeconds(3).withType(Type.LIVENESS)))))) + .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppsJob0:v1") + .withName("testcontainerAppsJob0") + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders( + Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") + .withValue("Awesome"))) + .withPath("/health") + .withPort(8080)) + .withInitialDelaySeconds(5) + .withPeriodSeconds(3) + .withType(Type.LIVENESS)))))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * Job_CreateorUpdate_EventTrigger.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_CreateorUpdate_EventTrigger.json */ /** * Sample code: Create or Update Container Apps Job With Event Driven Trigger. @@ -77,20 +92,34 @@ public static void createOrUpdateContainerAppsJobOnAConnectedEnvironment( */ public static void createOrUpdateContainerAppsJobWithEventDrivenTrigger( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) throws IOException { - manager.jobs().define("testcontainerAppsJob0").withRegion("East US").withExistingResourceGroup("rg") + manager.jobs() + .define("testcontainerAppsJob0") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", + new UserAssignedIdentity()))) .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.EVENT).withReplicaTimeout(10) - .withReplicaRetryLimit(10).withEventTriggerConfig( - new JobConfigurationEventTriggerConfig().withReplicaCompletionCount(1).withParallelism(4) - .withScale(new JobScale().withPollingInterval(40).withMinExecutions(1).withMaxExecutions(5) - .withRules(Arrays.asList(new JobScaleRule().withName("servicebuscalingrule") - .withType("azure-servicebus") - .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter().deserialize( - "{\"topicName\":\"my-topic\"}", Object.class, SerializerEncoding.JSON))))))) + .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.EVENT) + .withReplicaTimeout(10) + .withReplicaRetryLimit(10) + .withEventTriggerConfig(new JobConfigurationEventTriggerConfig().withReplicaCompletionCount(1) + .withParallelism(4) + .withScale(new JobScale().withPollingInterval(40) + .withMinExecutions(1) + .withMaxExecutions(5) + .withRules(Arrays.asList(new JobScaleRule().withName("servicebuscalingrule") + .withType("azure-servicebus") + .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"topicName\":\"my-topic\"}", Object.class, SerializerEncoding.JSON)) + .withIdentity( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity")))))) .withTemplate(new JobTemplate() .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) + .withName("testinitcontainerAppsJob0") + .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) .withContainers(Arrays.asList( @@ -99,8 +128,7 @@ public static void createOrUpdateContainerAppsJobWithEventDrivenTrigger( } /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_CreateorUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_CreateorUpdate.json */ /** * Sample code: Create or Update Container Apps Job. @@ -109,31 +137,63 @@ public static void createOrUpdateContainerAppsJobWithEventDrivenTrigger( */ public static void createOrUpdateContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().define("testcontainerAppsJob0").withRegion("East US").withExistingResourceGroup("rg") + manager.jobs() + .define("testcontainerAppsJob0") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withIdentity(new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", + new UserAssignedIdentity()))) .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL).withReplicaTimeout(10) - .withReplicaRetryLimit(10).withManualTriggerConfig( - new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4))) - .withTemplate( - new JobTemplate() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers(Arrays.asList( - new Container().withImage("repo/testcontainerAppsJob0:v1").withName("testcontainerAppsJob0") - .withVolumeMounts(Arrays.asList( - new VolumeMount().withVolumeName("azurefile").withMountPath("/mnt/path1") - .withSubPath("subPath1"), - new VolumeMount().withVolumeName("nfsazurefile").withMountPath("/mnt/path2") - .withSubPath("subPath2"))) - .withProbes(Arrays.asList(new ContainerAppProbe() - .withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header").withValue("Awesome"))) - .withPath("/health").withPort(8080)) - .withInitialDelaySeconds(5).withPeriodSeconds(3).withType(Type.LIVENESS)))))) + .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL) + .withReplicaTimeout(10) + .withReplicaRetryLimit(10) + .withManualTriggerConfig( + new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4)) + .withIdentitySettings(Arrays.asList(new IdentitySettings().withIdentity( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity") + .withLifecycle(IdentitySettingsLifeCycle.ALL), + new IdentitySettings().withIdentity("system").withLifecycle(IdentitySettingsLifeCycle.INIT)))) + .withTemplate(new JobTemplate() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") + .withName("testinitcontainerAppsJob0") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppsJob0:v1") + .withName("testcontainerAppsJob0") + .withVolumeMounts(Arrays.asList( + new VolumeMount().withVolumeName("azurefile") + .withMountPath("/mnt/path1") + .withSubPath("subPath1"), + new VolumeMount().withVolumeName("nfsazurefile") + .withMountPath("/mnt/path2") + .withSubPath("subPath2"))) + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders( + Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") + .withValue("Awesome"))) + .withPath("/health") + .withPort(8080)) + .withInitialDelaySeconds(5) + .withPeriodSeconds(3) + .withType(Type.LIVENESS)))))) .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/JobsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteSamples.java index 6db91f788162..8f1411e976df 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 @@ -9,8 +9,7 @@ */ public final class JobsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 f10bd3a921c8..6571f541ac1a 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 @@ -9,8 +9,7 @@ */ public final class JobsExecutionsListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Executions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 b0ff6f85a8cd..692034b48da5 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 @@ -9,8 +9,7 @@ */ public final class JobsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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/JobsGetDetectorSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorSamples.java index 1fe953f78b70..1abef70ca2a6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorSamples.java @@ -9,8 +9,7 @@ */ public final class JobsGetDetectorSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_GetDetector.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_GetDetector.json */ /** * Sample code: Get diagnostic data for a Container App Job. @@ -19,7 +18,8 @@ public final class JobsGetDetectorSamples { */ public static void getDiagnosticDataForAContainerAppJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().getDetectorWithResponse("mikono-workerapp-test-rg", "mikonojob1", "containerappjobnetworkIO", - com.azure.core.util.Context.NONE); + manager.jobs() + .getDetectorWithResponse("mikono-workerapp-test-rg", "mikonojob1", "containerappjobnetworkIO", + com.azure.core.util.Context.NONE); } } 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 be43a18ec985..fb5631d3e73d 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 @@ -9,9 +9,7 @@ */ public final class JobsListByResourceGroupSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Jobs_ListByResourceGroup. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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/JobsListDetectorsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsSamples.java index f15907dd2ff9..9a8ea8493393 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsSamples.java @@ -9,8 +9,7 @@ */ public final class JobsListDetectorsSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_ListDetectors.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_ListDetectors.json */ /** * Sample code: Get the list of available diagnostic data for a Container App Job. @@ -19,7 +18,7 @@ public final class JobsListDetectorsSamples { */ public static void getTheListOfAvailableDiagnosticDataForAContainerAppJob( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonojob1", - com.azure.core.util.Context.NONE); + manager.jobs() + .listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonojob1", com.azure.core.util.Context.NONE); } } 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 adad6deaae4b..b870c2055c02 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 @@ -9,8 +9,7 @@ */ public final class JobsListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Jobs_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 c4af65414134..0d87d90bc98e 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 @@ -9,8 +9,7 @@ */ public final class JobsListSecretsSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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/JobsProxyGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsProxyGetSamples.java index a93625f93ef0..f3ab10b93bcc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsProxyGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsProxyGetSamples.java @@ -9,8 +9,7 @@ */ public final class JobsProxyGetSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_ProxyGet.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_ProxyGet.json */ /** * Sample code: Get Container App Job by name. 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 58cfd9bc200b..6e596748f3d9 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 @@ -14,8 +14,7 @@ */ public final class JobsStartSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Start.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Start.json */ /** * Sample code: Run a Container Apps Job. @@ -23,15 +22,16 @@ public final class JobsStartSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void runAContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.jobs().start("rg", "testcontainerAppsJob0", - new JobExecutionTemplate() + manager.jobs() + .start("rg", "testcontainerAppsJob0", new JobExecutionTemplate() .withContainers(Arrays.asList(new JobExecutionContainer().withImage("repo/testcontainerAppsJob0:v4") .withName("testcontainerAppsJob0") .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) .withInitContainers(Arrays.asList(new JobExecutionContainer().withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) + .withName("testinitcontainerAppsJob0") + .withCommand(Arrays.asList("/bin/sh")) .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))), - com.azure.core.util.Context.NONE); + com.azure.core.util.Context.NONE); } } 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 1afbf7e09fda..faba46a25bbb 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 @@ -9,8 +9,7 @@ */ public final class JobsStopExecutionSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Stop_Execution.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 cb8f119105be..ace47d416025 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 @@ -9,8 +9,7 @@ */ public final class JobsStopMultipleExecutionsSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Stop_Multiple.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 504050178133..6c8b629f4139 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 @@ -24,8 +24,7 @@ */ public final class JobsUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Patch.json */ /** * Sample code: Patch Container Apps Job. @@ -34,28 +33,33 @@ public final class JobsUpdateSamples { */ public static void patchContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { Job resource = manager.jobs() - .getByResourceGroupWithResponse("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE).getValue(); + .getByResourceGroupWithResponse("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE) + .getValue(); resource.update() - .withProperties( - new JobPatchPropertiesProperties() - .withConfiguration( - new JobConfiguration().withTriggerType(TriggerType.MANUAL).withReplicaTimeout(10) - .withReplicaRetryLimit(10) - .withManualTriggerConfig(new JobConfigurationManualTriggerConfig() - .withReplicaCompletionCount(1).withParallelism(4))) - .withTemplate(new JobTemplate() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers(Arrays.asList( - new Container().withImage("repo/testcontainerAppsJob0:v1").withName("testcontainerAppsJob0") - .withProbes(Arrays.asList(new ContainerAppProbe() - .withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header").withValue("Awesome"))) - .withPath("/health").withPort(8080)) - .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))))) + .withProperties(new JobPatchPropertiesProperties() + .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL) + .withReplicaTimeout(10) + .withReplicaRetryLimit(10) + .withManualTriggerConfig( + new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4))) + .withTemplate(new JobTemplate() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") + .withName("testinitcontainerAppsJob0") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppsJob0:v1") + .withName("testcontainerAppsJob0") + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders(Arrays + .asList(new ContainerAppProbeHttpGetHttpHeadersItem().withName("Custom-Header") + .withValue("Awesome"))) + .withPath("/health") + .withPort(8080)) + .withInitialDelaySeconds(3) + .withPeriodSeconds(3) + .withType(Type.LIVENESS))))))) .apply(); } } 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 fde470aa26cb..ee1f7a39d0d7 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 @@ -12,8 +12,7 @@ */ public final class ManagedCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedCertificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedCertificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -22,7 +21,9 @@ public final class ManagedCertificatesCreateOrUpdateSamples { */ public static void createOrUpdateCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedCertificates().define("certificate-firendly-name").withRegion("East US") + manager.managedCertificates() + .define("certificate-firendly-name") + .withRegion("East US") .withExistingManagedEnvironment("examplerg", "testcontainerenv") .withProperties(new ManagedCertificateProperties().withSubjectName("my-subject-name.company.country.net") .withDomainControlValidation(ManagedCertificateDomainControlValidation.CNAME)) 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 0208a9f10167..544dc5ab99e4 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 @@ -9,9 +9,7 @@ */ public final class ManagedCertificatesDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedCertificate_Delete. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedCertificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -19,7 +17,8 @@ public final class ManagedCertificatesDeleteSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedCertificates().deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - com.azure.core.util.Context.NONE); + manager.managedCertificates() + .deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } 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 aa76bca21eaf..84eefa4cd14b 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 @@ -9,8 +9,7 @@ */ public final class ManagedCertificatesGetSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedCertificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedCertificate_Get.json */ /** * Sample code: Get Certificate. @@ -18,7 +17,8 @@ public final class ManagedCertificatesGetSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedCertificates().getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", - com.azure.core.util.Context.NONE); + manager.managedCertificates() + .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } 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 a0acb8ae2b9d..4de10bfe2163 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 @@ -9,8 +9,7 @@ */ public final class ManagedCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedCertificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 2c4059828efa..2936bede0843 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 @@ -13,9 +13,7 @@ */ public final class ManagedCertificatesUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedCertificates_Patch. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedCertificates_Patch.json */ /** * Sample code: Patch Managed Certificate. @@ -24,8 +22,10 @@ public final class ManagedCertificatesUpdateSamples { */ public static void patchManagedCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - ManagedCertificate resource = manager.managedCertificates().getWithResponse("examplerg", "testcontainerenv", - "certificate-firendly-name", com.azure.core.util.Context.NONE).getValue(); + ManagedCertificate resource = manager.managedCertificates() + .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } 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 a8284ec063a8..6946182e6d9e 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 @@ -9,8 +9,7 @@ */ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironmentDiagnostics_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentDiagnostics_Get.json */ /** * Sample code: Get diagnostic data for a managed environments. @@ -19,7 +18,8 @@ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { */ public static void getDiagnosticDataForAManagedEnvironments( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentDiagnostics().getDetectorWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", - "ManagedEnvAvailabilityMetrics", com.azure.core.util.Context.NONE); + manager.managedEnvironmentDiagnostics() + .getDetectorWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", "ManagedEnvAvailabilityMetrics", + com.azure.core.util.Context.NONE); } } 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 b1e0cd1a7357..4f7788b8705e 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 @@ -9,8 +9,7 @@ */ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironmentDiagnostics_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostic data for a managed environments. @@ -19,7 +18,7 @@ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { */ public static void getTheListOfAvailableDiagnosticDataForAManagedEnvironments( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentDiagnostics().listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", - com.azure.core.util.Context.NONE); + manager.managedEnvironmentDiagnostics() + .listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..66ae7dc00ec7 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateSamples.java @@ -0,0 +1,34 @@ +// 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.PrivateEndpointConnection; +import com.azure.resourcemanager.appcontainers.models.PrivateEndpointServiceConnectionStatus; +import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; + +/** + * Samples for ManagedEnvironmentPrivateEndpointConnections CreateOrUpdate. + */ +public final class ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentPrivateEndpointConnections_CreateOrUpdate.json + */ + /** + * Sample code: Update a Private Endpoint Connection by Managed Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void updateAPrivateEndpointConnectionByManagedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + PrivateEndpointConnection resource = manager.managedEnvironmentPrivateEndpointConnections() + .getWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withPrivateLinkServiceConnectionState( + new PrivateLinkServiceConnectionState().withStatus(PrivateEndpointServiceConnectionStatus.APPROVED) + .withActionsRequired("None")) + .apply(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsDeleteSamples.java new file mode 100644 index 000000000000..229d58c81102 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsDeleteSamples.java @@ -0,0 +1,24 @@ +// 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 ManagedEnvironmentPrivateEndpointConnections Delete. + */ +public final class ManagedEnvironmentPrivateEndpointConnectionsDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentPrivateEndpointConnections_Delete.json + */ + /** + * Sample code: Delete a Private Endpoint Connection by Managed Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void deleteAPrivateEndpointConnectionByManagedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironmentPrivateEndpointConnections() + .delete("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsGetSamples.java new file mode 100644 index 000000000000..e5f7f5332421 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsGetSamples.java @@ -0,0 +1,24 @@ +// 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 ManagedEnvironmentPrivateEndpointConnections Get. + */ +public final class ManagedEnvironmentPrivateEndpointConnectionsGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentPrivateEndpointConnections_Get.json + */ + /** + * Sample code: Get a Private Endpoint Connection by Managed Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getAPrivateEndpointConnectionByManagedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironmentPrivateEndpointConnections() + .getWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsListSamples.java new file mode 100644 index 000000000000..df51b3ee8446 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsListSamples.java @@ -0,0 +1,24 @@ +// 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 ManagedEnvironmentPrivateEndpointConnections List. + */ +public final class ManagedEnvironmentPrivateEndpointConnectionsListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentPrivateEndpointConnections_List.json + */ + /** + * Sample code: List Private Endpoint Connections by Managed Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listPrivateEndpointConnectionsByManagedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironmentPrivateEndpointConnections() + .list("examplerg", "managedEnv", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateLinkResourcesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateLinkResourcesListSamples.java new file mode 100644 index 000000000000..966af6d72823 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateLinkResourcesListSamples.java @@ -0,0 +1,24 @@ +// 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 ManagedEnvironmentPrivateLinkResources List. + */ +public final class ManagedEnvironmentPrivateLinkResourcesListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentPrivateLinkResources_List.json + */ + /** + * Sample code: List Private Link Resources by Managed Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listPrivateLinkResourcesByManagedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironmentPrivateLinkResources() + .list("examplerg", "managedEnv", com.azure.core.util.Context.NONE); + } +} 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 index 3f0fd1850183..2919e93c8f65 100644 --- 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 @@ -9,8 +9,7 @@ */ public final class ManagedEnvironmentUsagesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironmentUsages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentUsages_List.json */ /** * Sample code: List managed environment usages. 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 de579eae42f2..02c111729119 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 @@ -13,6 +13,8 @@ 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.ManagedEnvironmentPropertiesPeerTrafficConfiguration; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; import com.azure.resourcemanager.appcontainers.models.MetricsConfiguration; @@ -32,8 +34,7 @@ */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json */ /** * Sample code: Create environment with custom infrastructureResourceGroup. @@ -42,7 +43,9 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { */ public static void createEnvironmentWithCustomInfrastructureResourceGroup( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().define("testcontainerenv").withRegion("East US") + manager.managedEnvironments() + .define("testcontainerenv") + .withRegion("East US") .withExistingResourceGroup("examplerg") .withDaprAIConnectionString( "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") @@ -52,21 +55,28 @@ public static void createEnvironmentWithCustomInfrastructureResourceGroup( new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("fakeTokenPlaceholder"))) .withZoneRedundant(true) .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("www.my-name.com") - .withCertificateValue("Y2VydA==".getBytes()).withCertificatePassword("fakeTokenPlaceholder")) + .withCertificateValue("Y2VydA==".getBytes()) + .withCertificatePassword("fakeTokenPlaceholder")) .withWorkloadProfiles(Arrays.asList( - new WorkloadProfile().withName("My-GP-01").withWorkloadProfileType("GeneralPurpose").withMinimumCount(3) + new WorkloadProfile().withName("My-GP-01") + .withWorkloadProfileType("GeneralPurpose") + .withMinimumCount(3) .withMaximumCount(12), - new WorkloadProfile().withName("My-MO-01").withWorkloadProfileType("MemoryOptimized") - .withMinimumCount(3).withMaximumCount(6), - new WorkloadProfile().withName("My-CO-01").withWorkloadProfileType("ComputeOptimized") - .withMinimumCount(3).withMaximumCount(6), + new WorkloadProfile().withName("My-MO-01") + .withWorkloadProfileType("MemoryOptimized") + .withMinimumCount(3) + .withMaximumCount(6), + new WorkloadProfile().withName("My-CO-01") + .withWorkloadProfileType("ComputeOptimized") + .withMinimumCount(3) + .withMaximumCount(6), new WorkloadProfile().withName("My-consumption-01").withWorkloadProfileType("Consumption"))) - .withInfrastructureResourceGroup("myInfrastructureRgName").create(); + .withInfrastructureResourceGroup("myInfrastructureRgName") + .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create environments. @@ -74,7 +84,9 @@ public static void createEnvironmentWithCustomInfrastructureResourceGroup( * @param manager Entry point to ContainerAppsApiManager. */ public static void createEnvironments(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().define("testcontainerenv").withRegion("East US") + manager.managedEnvironments() + .define("testcontainerenv") + .withRegion("East US") .withExistingResourceGroup("examplerg") .withIdentity(new ManagedServiceIdentity() .withType(ManagedServiceIdentityType.fromString("SystemAssigned, UserAssigned")) @@ -85,9 +97,10 @@ public static void createEnvironments(com.azure.resourcemanager.appcontainers.Co "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") .withVnetConfiguration(new VnetConfiguration().withInfrastructureSubnetId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1")) - .withAppLogsConfiguration( - new AppLogsConfiguration().withLogAnalyticsConfiguration(new LogAnalyticsConfiguration() - .withCustomerId("string").withSharedKey("fakeTokenPlaceholder").withDynamicJsonColumns(true))) + .withAppLogsConfiguration(new AppLogsConfiguration() + .withLogAnalyticsConfiguration(new LogAnalyticsConfiguration().withCustomerId("string") + .withSharedKey("fakeTokenPlaceholder") + .withDynamicJsonColumns(true))) .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( @@ -97,7 +110,8 @@ public static void createEnvironments(com.azure.resourcemanager.appcontainers.Co .withDataDogConfiguration( new DataDogConfiguration().withSite("string").withKey("fakeTokenPlaceholder")) .withOtlpConfigurations(Arrays.asList(new OtlpConfiguration().withName("dashboard") - .withEndpoint("dashboard.k8s.region.azurecontainerapps.io:80").withInsecure(true) + .withEndpoint("dashboard.k8s.region.azurecontainerapps.io:80") + .withInsecure(true) .withHeaders(Arrays .asList(new Header().withKey("fakeTokenPlaceholder").withValue("xxxxxxxxxxx")))))) .withTracesConfiguration(new TracesConfiguration().withDestinations(Arrays.asList("appInsights"))) @@ -105,17 +119,26 @@ public static void createEnvironments(com.azure.resourcemanager.appcontainers.Co .withMetricsConfiguration(new MetricsConfiguration().withDestinations(Arrays.asList("dataDog")))) .withZoneRedundant(true) .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("www.my-name.com") - .withCertificateValue("Y2VydA==".getBytes()).withCertificatePassword("fakeTokenPlaceholder")) + .withCertificateValue("Y2VydA==".getBytes()) + .withCertificatePassword("fakeTokenPlaceholder")) .withWorkloadProfiles(Arrays.asList( - new WorkloadProfile().withName("My-GP-01").withWorkloadProfileType("GeneralPurpose").withMinimumCount(3) + new WorkloadProfile().withName("My-GP-01") + .withWorkloadProfileType("GeneralPurpose") + .withMinimumCount(3) .withMaximumCount(12), - new WorkloadProfile().withName("My-MO-01").withWorkloadProfileType("MemoryOptimized") - .withMinimumCount(3).withMaximumCount(6), - new WorkloadProfile().withName("My-CO-01").withWorkloadProfileType("ComputeOptimized") - .withMinimumCount(3).withMaximumCount(6), + new WorkloadProfile().withName("My-MO-01") + .withWorkloadProfileType("MemoryOptimized") + .withMinimumCount(3) + .withMaximumCount(6), + new WorkloadProfile().withName("My-CO-01") + .withWorkloadProfileType("ComputeOptimized") + .withMinimumCount(3) + .withMaximumCount(6), new WorkloadProfile().withName("My-consumption-01").withWorkloadProfileType("Consumption"))) .withPeerAuthentication( new ManagedEnvironmentPropertiesPeerAuthentication().withMtls(new Mtls().withEnabled(true))) + .withPeerTrafficConfiguration(new ManagedEnvironmentPropertiesPeerTrafficConfiguration() + .withEncryption(new ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption().withEnabled(true))) .create(); } 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 457641d21825..89c73c253c81 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 @@ -9,9 +9,7 @@ */ public final class ManagedEnvironmentsDeleteSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_Delete. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 b60a91d55c76..282859cee272 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 @@ -9,8 +9,7 @@ */ public final class ManagedEnvironmentsDiagnosticsGetRootSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -18,7 +17,7 @@ public final class ManagedEnvironmentsDiagnosticsGetRootSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getEnvironmentsByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsDiagnostics().getRootWithResponse("examplerg", "jlaw-demo1", - com.azure.core.util.Context.NONE); + manager.managedEnvironmentsDiagnostics() + .getRootWithResponse("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/ManagedEnvironmentsGetAuthTokenSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java index 7241d5d183be..4d896112caf6 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 @@ -9,8 +9,7 @@ */ public final class ManagedEnvironmentsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironments_GetAuthToken.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 042e57fb442c..6987dc556f42 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 @@ -9,8 +9,7 @@ */ public final class ManagedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -18,7 +17,7 @@ public final class ManagedEnvironmentsGetByResourceGroupSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getEnvironmentsByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().getByResourceGroupWithResponse("examplerg", "jlaw-demo1", - com.azure.core.util.Context.NONE); + manager.managedEnvironments() + .getByResourceGroupWithResponse("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/ManagedEnvironmentsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java index 0d2ddc69d749..ab3cbbd2081c 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 @@ -9,8 +9,7 @@ */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 8d741e4aa717..c4f71b84c350 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 @@ -9,8 +9,7 @@ */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 6ceae8d251fc..e092052d9a9d 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 @@ -9,8 +9,7 @@ */ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironments_ListWorkloadProfileStates.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json */ /** * Sample code: List environments by subscription. @@ -19,7 +18,7 @@ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { */ public static void listEnvironmentsBySubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironments().listWorkloadProfileStates("examplerg", "jlaw-demo1", - com.azure.core.util.Context.NONE); + manager.managedEnvironments() + .listWorkloadProfileStates("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/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java index 26b1d0f897f7..d41701d1a719 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 @@ -14,8 +14,7 @@ */ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironmentsStorages_CreateOrUpdate_NfsAzureFile.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate_NfsAzureFile.json */ /** * Sample code: Create or update environments storage for NFS Azure file. @@ -24,16 +23,18 @@ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { */ public static void createOrUpdateEnvironmentsStorageForNFSAzureFile( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().define("jlaw-demo1") + manager.managedEnvironmentsStorages() + .define("jlaw-demo1") .withExistingManagedEnvironment("examplerg", "managedEnv") - .withProperties(new ManagedEnvironmentStorageProperties().withNfsAzureFile(new NfsAzureFileProperties() - .withServer("server1").withAccessMode(AccessMode.READ_ONLY).withShareName("share1"))) + .withProperties(new ManagedEnvironmentStorageProperties() + .withNfsAzureFile(new NfsAzureFileProperties().withServer("server1") + .withAccessMode(AccessMode.READ_ONLY) + .withShareName("share1"))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. @@ -42,11 +43,14 @@ public static void createOrUpdateEnvironmentsStorageForNFSAzureFile( */ public static void createOrUpdateEnvironmentsStorage(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().define("jlaw-demo1") + manager.managedEnvironmentsStorages() + .define("jlaw-demo1") .withExistingManagedEnvironment("examplerg", "managedEnv") - .withProperties(new ManagedEnvironmentStorageProperties().withAzureFile( - new AzureFileProperties().withAccountName("account1").withAccountKey("fakeTokenPlaceholder") - .withAccessMode(AccessMode.READ_ONLY).withShareName("share1"))) + .withProperties(new ManagedEnvironmentStorageProperties() + .withAzureFile(new AzureFileProperties().withAccountName("account1") + .withAccountKey("fakeTokenPlaceholder") + .withAccessMode(AccessMode.READ_ONLY) + .withShareName("share1"))) .create(); } } 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 03400192ca15..4e7b299f8bc0 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 @@ -9,8 +9,7 @@ */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. @@ -19,7 +18,7 @@ public final class ManagedEnvironmentsStoragesDeleteSamples { */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().deleteWithResponse("examplerg", "managedEnv", "jlaw-demo1", - com.azure.core.util.Context.NONE); + manager.managedEnvironmentsStorages() + .deleteWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); } } 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 210f199df9fd..515a984c289a 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 @@ -9,8 +9,7 @@ */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage. @@ -19,13 +18,12 @@ public final class ManagedEnvironmentsStoragesGetSamples { */ public static void getAEnvironmentsStorage(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().getWithResponse("examplerg", "managedEnv", "jlaw-demo1", - com.azure.core.util.Context.NONE); + manager.managedEnvironmentsStorages() + .getWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironmentsStorages_Get_NfsAzureFile.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentsStorages_Get_NfsAzureFile.json */ /** * Sample code: get a environments storage for NFS Azure file. @@ -34,7 +32,7 @@ public final class ManagedEnvironmentsStoragesGetSamples { */ public static void getAEnvironmentsStorageForNFSAzureFile( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().getWithResponse("examplerg", "managedEnv", "jlaw-demo1", - com.azure.core.util.Context.NONE); + manager.managedEnvironmentsStorages() + .getWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); } } 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 af95ae5d86fd..882286f288d9 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 @@ -9,8 +9,7 @@ */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ManagedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. @@ -19,7 +18,7 @@ public final class ManagedEnvironmentsStoragesListSamples { */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.managedEnvironmentsStorages().listWithResponse("examplerg", "managedEnv", - com.azure.core.util.Context.NONE); + manager.managedEnvironmentsStorages() + .listWithResponse("examplerg", "managedEnv", com.azure.core.util.Context.NONE); } } 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 965bdf450755..62f3d33fe849 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 @@ -13,9 +13,7 @@ */ public final class ManagedEnvironmentsUpdateSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_Patch. - * json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 f721c1e7e9da..ab797a494c15 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 @@ -11,8 +11,7 @@ */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * Certificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -22,14 +21,14 @@ public final class NamespacesCheckNameAvailabilitySamples { public static void certificatesCheckNameAvailability(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.namespaces() - .checkNameAvailabilityWithResponse("examplerg", "testcontainerenv", new CheckNameAvailabilityRequest() - .withName("testcertificatename").withType("Microsoft.App/managedEnvironments/certificates"), + .checkNameAvailabilityWithResponse("examplerg", "testcontainerenv", + new CheckNameAvailabilityRequest().withName("testcertificatename") + .withType("Microsoft.App/managedEnvironments/certificates"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * ContainerApps_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_CheckNameAvailability.json */ /** * Sample code: ContainerApps_CheckNameAvailability. @@ -38,8 +37,9 @@ public final class NamespacesCheckNameAvailabilitySamples { */ public static void containerAppsCheckNameAvailability(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.namespaces().checkNameAvailabilityWithResponse("examplerg", "testcontainerenv", - new CheckNameAvailabilityRequest().withName("testcappname").withType("Microsoft.App/containerApps"), - com.azure.core.util.Context.NONE); + manager.namespaces() + .checkNameAvailabilityWithResponse("examplerg", "testcontainerenv", + new CheckNameAvailabilityRequest().withName("testcappname").withType("Microsoft.App/containerApps"), + com.azure.core.util.Context.NONE); } } 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 ba1100264a9b..72cd798ec8eb 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 @@ -9,8 +9,7 @@ */ public final class OperationsListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Operations_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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/ResourceProviderGetCustomDomainVerificationIdSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderGetCustomDomainVerificationIdSamples.java index d9fcf15a6a33..3f91583d1709 100644 --- 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 @@ -9,8 +9,7 @@ */ public final class ResourceProviderGetCustomDomainVerificationIdSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ - * Subscriptions_GetCustomDomainVerificationId.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Subscriptions_GetCustomDomainVerificationId.json */ /** * Sample code: List all operations. 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 8c74bfa78cc4..feb691ba9e79 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 @@ -9,8 +9,7 @@ */ public final class ResourceProviderJobExecutionSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Execution_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Execution_Get.json */ /** * Sample code: Get a single Job Execution. @@ -18,7 +17,7 @@ public final class ResourceProviderJobExecutionSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void getASingleJobExecution(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.resourceProviders().jobExecutionWithResponse("rg", "testcontainerAppsJob0", "jobExecution1", - com.azure.core.util.Context.NONE); + manager.resourceProviders() + .jobExecutionWithResponse("rg", "testcontainerAppsJob0", "jobExecution1", com.azure.core.util.Context.NONE); } } 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 index 149d43f6e59e..82ca465a9df4 100644 --- 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 @@ -9,8 +9,7 @@ */ public final class UsagesListSamples { /* - * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Usages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Usages_List.json */ /** * Sample code: List usages. 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 4a32859e2cf6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.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.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\":[\"igdtopbob\",\"og\",\"m\",\"w\"]}") - .toObject(AllowedAudiencesValidation.class); - Assertions.assertEquals("igdtopbob", model.allowedAudiences().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllowedAudiencesValidation model - = new AllowedAudiencesValidation().withAllowedAudiences(Arrays.asList("igdtopbob", "og", "m", "w")); - model = BinaryData.fromObject(model).toObject(AllowedAudiencesValidation.class); - Assertions.assertEquals("igdtopbob", 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 89f4d08ea369..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.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.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\":[\"ajionpimexgstxg\",\"po\",\"gmaajrm\"],\"identities\":[\"wzrlovmclwhij\",\"oejctbzaqsqsy\"]}") - .toObject(AllowedPrincipals.class); - Assertions.assertEquals("ajionpimexgstxg", model.groups().get(0)); - Assertions.assertEquals("wzrlovmclwhij", model.identities().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllowedPrincipals model = new AllowedPrincipals().withGroups(Arrays.asList("ajionpimexgstxg", "po", "gmaajrm")) - .withIdentities(Arrays.asList("wzrlovmclwhij", "oejctbzaqsqsy")); - model = BinaryData.fromObject(model).toObject(AllowedPrincipals.class); - Assertions.assertEquals("ajionpimexgstxg", model.groups().get(0)); - Assertions.assertEquals("wzrlovmclwhij", model.identities().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppInsightsConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppInsightsConfigurationTests.java deleted file mode 100644 index 496c1ba15075..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppInsightsConfigurationTests.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.AppInsightsConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class AppInsightsConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AppInsightsConfiguration model = BinaryData.fromString("{\"connectionString\":\"vgsgzwywakoihkn\"}") - .toObject(AppInsightsConfiguration.class); - Assertions.assertEquals("vgsgzwywakoihkn", model.connectionString()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AppInsightsConfiguration model = new AppInsightsConfiguration().withConnectionString("vgsgzwywakoihkn"); - model = BinaryData.fromObject(model).toObject(AppInsightsConfiguration.class); - Assertions.assertEquals("vgsgzwywakoihkn", model.connectionString()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppResilienciesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppResilienciesDeleteWithResponseMockTests.java deleted file mode 100644 index f694ba25e641..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppResilienciesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,52 +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 AppResilienciesDeleteWithResponseMockTests { - @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.appResiliencies().deleteWithResponse("fulopmjnlexwhcb", "pibkephuu", "erctatoyin", - com.azure.core.util.Context.NONE); - - } -} 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 7a96afa744ab..000000000000 --- 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\":\"jaoyfhrtx\"}").toObject(AuthPlatform.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("jaoyfhrtx", model.runtimeVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthPlatform model = new AuthPlatform().withEnabled(true).withRuntimeVersion("jaoyfhrtx"); - model = BinaryData.fromObject(model).toObject(AuthPlatform.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("jaoyfhrtx", 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 140b8f8ffc45..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.java +++ /dev/null @@ -1,57 +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\":\"rtltla\",\"isDataAction\":true,\"display\":{\"provider\":\"katbhjm\",\"resource\":\"nbsoqeqalarv\",\"operation\":\"gunbtgfebwlnbm\",\"description\":\"reeudzqavb\"},\"origin\":\"qmjxlyyzglgouwtl\"},{\"name\":\"jyuojqtobaxkjeyt\",\"isDataAction\":false,\"display\":{\"provider\":\"jkwrusnkq\",\"resource\":\"syrq\",\"operation\":\"jqhden\",\"description\":\"ulkpakd\"},\"origin\":\"fmjnnawtqa\"},{\"name\":\"xuckpggqoweyir\",\"isDataAction\":false,\"display\":{\"provider\":\"ngwflqqmpizruwn\",\"resource\":\"xpxiwfcngjs\",\"operation\":\"sii\",\"description\":\"mkzjvkviir\"},\"origin\":\"fgrwsdpgratzvz\"}],\"nextLink\":\"lbyvictctbrxkjzw\"}") - .toObject(AvailableOperations.class); - Assertions.assertEquals("rtltla", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("katbhjm", model.value().get(0).display().provider()); - Assertions.assertEquals("nbsoqeqalarv", model.value().get(0).display().resource()); - Assertions.assertEquals("gunbtgfebwlnbm", model.value().get(0).display().operation()); - Assertions.assertEquals("reeudzqavb", model.value().get(0).display().description()); - Assertions.assertEquals("qmjxlyyzglgouwtl", model.value().get(0).origin()); - Assertions.assertEquals("lbyvictctbrxkjzw", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableOperations model = new AvailableOperations() - .withValue(Arrays.asList( - new OperationDetailInner().withName("rtltla").withIsDataAction(true) - .withDisplay(new OperationDisplay().withProvider("katbhjm").withResource("nbsoqeqalarv") - .withOperation("gunbtgfebwlnbm").withDescription("reeudzqavb")) - .withOrigin("qmjxlyyzglgouwtl"), - new OperationDetailInner().withName("jyuojqtobaxkjeyt").withIsDataAction(false) - .withDisplay(new OperationDisplay().withProvider("jkwrusnkq").withResource("syrq") - .withOperation("jqhden").withDescription("ulkpakd")) - .withOrigin("fmjnnawtqa"), - new OperationDetailInner().withName("xuckpggqoweyir").withIsDataAction(false) - .withDisplay(new OperationDisplay().withProvider("ngwflqqmpizruwn").withResource("xpxiwfcngjs") - .withOperation("sii").withDescription("mkzjvkviir")) - .withOrigin("fgrwsdpgratzvz"))) - .withNextLink("lbyvictctbrxkjzw"); - model = BinaryData.fromObject(model).toObject(AvailableOperations.class); - Assertions.assertEquals("rtltla", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("katbhjm", model.value().get(0).display().provider()); - Assertions.assertEquals("nbsoqeqalarv", model.value().get(0).display().resource()); - Assertions.assertEquals("gunbtgfebwlnbm", model.value().get(0).display().operation()); - Assertions.assertEquals("reeudzqavb", model.value().get(0).display().description()); - Assertions.assertEquals("qmjxlyyzglgouwtl", model.value().get(0).origin()); - Assertions.assertEquals("lbyvictctbrxkjzw", 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 917ad9d8d6ce..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfileInnerTests.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.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\":\"yocf\",\"properties\":{\"category\":\"s\",\"applicability\":\"Custom\",\"cores\":376493890,\"memoryGiB\":666664165,\"gpus\":30564685,\"displayName\":\"uxh\"},\"id\":\"udxorrqn\",\"name\":\"poczvyifqrvkdvjs\",\"type\":\"lrmv\"}") - .toObject(AvailableWorkloadProfileInner.class); - Assertions.assertEquals("yocf", model.location()); - Assertions.assertEquals("s", model.properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, model.properties().applicability()); - Assertions.assertEquals(376493890, model.properties().cores()); - Assertions.assertEquals(666664165, model.properties().memoryGiB()); - Assertions.assertEquals(30564685, model.properties().gpus()); - Assertions.assertEquals("uxh", model.properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableWorkloadProfileInner model = new AvailableWorkloadProfileInner().withLocation("yocf").withProperties( - new AvailableWorkloadProfileProperties().withCategory("s").withApplicability(Applicability.CUSTOM) - .withCores(376493890).withMemoryGiB(666664165).withGpus(30564685).withDisplayName("uxh")); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileInner.class); - Assertions.assertEquals("yocf", model.location()); - Assertions.assertEquals("s", model.properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, model.properties().applicability()); - Assertions.assertEquals(376493890, model.properties().cores()); - Assertions.assertEquals(666664165, model.properties().memoryGiB()); - Assertions.assertEquals(30564685, model.properties().gpus()); - Assertions.assertEquals("uxh", 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 615d01b41854..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilePropertiesTests.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.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\":\"f\",\"applicability\":\"LocationDefault\",\"cores\":1825333220,\"memoryGiB\":500448783,\"gpus\":608072417,\"displayName\":\"xxbczwtr\"}") - .toObject(AvailableWorkloadProfileProperties.class); - Assertions.assertEquals("f", model.category()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.applicability()); - Assertions.assertEquals(1825333220, model.cores()); - Assertions.assertEquals(500448783, model.memoryGiB()); - Assertions.assertEquals(608072417, model.gpus()); - Assertions.assertEquals("xxbczwtr", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableWorkloadProfileProperties model = new AvailableWorkloadProfileProperties().withCategory("f") - .withApplicability(Applicability.LOCATION_DEFAULT).withCores(1825333220).withMemoryGiB(500448783) - .withGpus(608072417).withDisplayName("xxbczwtr"); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileProperties.class); - Assertions.assertEquals("f", model.category()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.applicability()); - Assertions.assertEquals(1825333220, model.cores()); - Assertions.assertEquals(500448783, model.memoryGiB()); - Assertions.assertEquals(608072417, model.gpus()); - Assertions.assertEquals("xxbczwtr", 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 fa4a65a0e272..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesCollectionTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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\":\"dmoh\",\"properties\":{\"category\":\"qvudwxdndnvowgu\",\"applicability\":\"LocationDefault\",\"cores\":247911704,\"memoryGiB\":175400299,\"gpus\":2105007169,\"displayName\":\"hslazjdyggdtj\"},\"id\":\"hbkuofqwey\",\"name\":\"hmenevfyexfwhybc\",\"type\":\"bvyvdcsity\"},{\"location\":\"aamdect\",\"properties\":{\"category\":\"iqscjeypv\",\"applicability\":\"Custom\",\"cores\":902064602,\"memoryGiB\":177141497,\"gpus\":61185346,\"displayName\":\"refovgmkqsleyyvx\"},\"id\":\"jpkcattpng\",\"name\":\"cr\",\"type\":\"czsqpjhvm\"},{\"location\":\"jvnysounqe\",\"properties\":{\"category\":\"oaeupfhyhltrpmo\",\"applicability\":\"Custom\",\"cores\":1490971149,\"memoryGiB\":557848148,\"gpus\":860799201,\"displayName\":\"thfuiuaodsfcpkvx\"},\"id\":\"puozmyzydag\",\"name\":\"uaxbezyiuokkt\",\"type\":\"hrdxwzywqsmbs\"}],\"nextLink\":\"exim\"}") - .toObject(AvailableWorkloadProfilesCollection.class); - Assertions.assertEquals("dmoh", model.value().get(0).location()); - Assertions.assertEquals("qvudwxdndnvowgu", model.value().get(0).properties().category()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.value().get(0).properties().applicability()); - Assertions.assertEquals(247911704, model.value().get(0).properties().cores()); - Assertions.assertEquals(175400299, model.value().get(0).properties().memoryGiB()); - Assertions.assertEquals(2105007169, model.value().get(0).properties().gpus()); - Assertions.assertEquals("hslazjdyggdtj", 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("dmoh") - .withProperties(new AvailableWorkloadProfileProperties().withCategory("qvudwxdndnvowgu") - .withApplicability(Applicability.LOCATION_DEFAULT).withCores(247911704).withMemoryGiB(175400299) - .withGpus(2105007169).withDisplayName("hslazjdyggdtj")), - new AvailableWorkloadProfileInner().withLocation("aamdect") - .withProperties(new AvailableWorkloadProfileProperties().withCategory("iqscjeypv") - .withApplicability(Applicability.CUSTOM).withCores(902064602).withMemoryGiB(177141497) - .withGpus(61185346).withDisplayName("refovgmkqsleyyvx")), - new AvailableWorkloadProfileInner().withLocation("jvnysounqe") - .withProperties(new AvailableWorkloadProfileProperties().withCategory("oaeupfhyhltrpmo") - .withApplicability(Applicability.CUSTOM).withCores(1490971149).withMemoryGiB(557848148) - .withGpus(860799201).withDisplayName("thfuiuaodsfcpkvx")))); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfilesCollection.class); - Assertions.assertEquals("dmoh", model.value().get(0).location()); - Assertions.assertEquals("qvudwxdndnvowgu", model.value().get(0).properties().category()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.value().get(0).properties().applicability()); - Assertions.assertEquals(247911704, model.value().get(0).properties().cores()); - Assertions.assertEquals(175400299, model.value().get(0).properties().memoryGiB()); - Assertions.assertEquals(2105007169, model.value().get(0).properties().gpus()); - Assertions.assertEquals("hslazjdyggdtj", 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 d709a86c0493..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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\":\"uflgbhgauacdixm\",\"properties\":{\"category\":\"rs\",\"applicability\":\"Custom\",\"cores\":1835241804,\"memoryGiB\":1032355307,\"gpus\":1636214642,\"displayName\":\"zoeo\"},\"id\":\"vjhvefgwbm\",\"name\":\"jchnta\",\"type\":\"faymxbulpz\"}]}"; - - 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("hl", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("uflgbhgauacdixm", response.iterator().next().location()); - Assertions.assertEquals("rs", response.iterator().next().properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, response.iterator().next().properties().applicability()); - Assertions.assertEquals(1835241804, response.iterator().next().properties().cores()); - Assertions.assertEquals(1032355307, response.iterator().next().properties().memoryGiB()); - Assertions.assertEquals(1636214642, response.iterator().next().properties().gpus()); - Assertions.assertEquals("zoeo", 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 cb1420efd497..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryLoginTests.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.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\":[\"isdkfthwxmnteiw\",\"opvkmijcm\"],\"disableWWWAuthenticate\":false}") - .toObject(AzureActiveDirectoryLogin.class); - Assertions.assertEquals("isdkfthwxmnteiw", 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("isdkfthwxmnteiw", "opvkmijcm")).withDisableWwwAuthenticate(false); - model = BinaryData.fromObject(model).toObject(AzureActiveDirectoryLogin.class); - Assertions.assertEquals("isdkfthwxmnteiw", 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 070a4441d95d..000000000000 --- 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\":\"wgndrvynhzgpp\"}").toObject(AzureStaticWebAppsRegistration.class); - Assertions.assertEquals("wgndrvynhzgpp", model.clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureStaticWebAppsRegistration model = new AzureStaticWebAppsRegistration().withClientId("wgndrvynhzgpp"); - model = BinaryData.fromObject(model).toObject(AzureStaticWebAppsRegistration.class); - Assertions.assertEquals("wgndrvynhzgpp", 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 796a36ccea52..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsTests.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.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\":true,\"registration\":{\"clientId\":\"ktzlcuiywg\"}}") - .toObject(AzureStaticWebApps.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("ktzlcuiywg", model.registration().clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureStaticWebApps model = new AzureStaticWebApps().withEnabled(true) - .withRegistration(new AzureStaticWebAppsRegistration().withClientId("ktzlcuiywg")); - model = BinaryData.fromObject(model).toObject(AzureStaticWebApps.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("ktzlcuiywg", 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 6a849d6d1681..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.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.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\":\"qzbqjvsov\",\"properties\":{\"category\":\"kacspkw\",\"meterType\":\"zdobpxjmflbvvnch\",\"displayName\":\"cciw\"},\"id\":\"juqk\",\"name\":\"rsa\",\"type\":\"iwkuofos\"},{\"location\":\"hsauuimjmvxied\",\"properties\":{\"category\":\"idyjrrfbyaosvexc\",\"meterType\":\"npc\",\"displayName\":\"ocohslkevleg\"},\"id\":\"fbuhfmvfaxkffe\",\"name\":\"ithlvmezyvshxm\",\"type\":\"sbbzo\"},{\"location\":\"igrxwburvjxxjn\",\"properties\":{\"category\":\"dptkoenkouk\",\"meterType\":\"udwtiukbl\",\"displayName\":\"gkpocipazyxoe\"},\"id\":\"kgjn\",\"name\":\"iucgygevqzn\",\"type\":\"yp\"},{\"location\":\"bpizcdrqjsdpydn\",\"properties\":{\"category\":\"xdeoejzic\",\"meterType\":\"fsj\",\"displayName\":\"gzfbishcbk\"},\"id\":\"jdeyeamdpha\",\"name\":\"alpbuxwgipwhon\",\"type\":\"wkgshwa\"}]}") - .toObject(BillingMeterCollectionInner.class); - Assertions.assertEquals("qzbqjvsov", model.value().get(0).location()); - Assertions.assertEquals("kacspkw", model.value().get(0).properties().category()); - Assertions.assertEquals("zdobpxjmflbvvnch", model.value().get(0).properties().meterType()); - Assertions.assertEquals("cciw", 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("qzbqjvsov") - .withProperties(new BillingMeterProperties().withCategory("kacspkw").withMeterType("zdobpxjmflbvvnch") - .withDisplayName("cciw")), - new BillingMeter().withLocation("hsauuimjmvxied") - .withProperties(new BillingMeterProperties().withCategory("idyjrrfbyaosvexc").withMeterType("npc") - .withDisplayName("ocohslkevleg")), - new BillingMeter().withLocation("igrxwburvjxxjn") - .withProperties(new BillingMeterProperties().withCategory("dptkoenkouk").withMeterType("udwtiukbl") - .withDisplayName("gkpocipazyxoe")), - new BillingMeter().withLocation("bpizcdrqjsdpydn").withProperties(new BillingMeterProperties() - .withCategory("xdeoejzic").withMeterType("fsj").withDisplayName("gzfbishcbk")))); - model = BinaryData.fromObject(model).toObject(BillingMeterCollectionInner.class); - Assertions.assertEquals("qzbqjvsov", model.value().get(0).location()); - Assertions.assertEquals("kacspkw", model.value().get(0).properties().category()); - Assertions.assertEquals("zdobpxjmflbvvnch", model.value().get(0).properties().meterType()); - Assertions.assertEquals("cciw", 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 346ab94b6466..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterPropertiesTests.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.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\":\"fkbey\",\"meterType\":\"wrmjmwvvjektc\",\"displayName\":\"enhwlrs\"}") - .toObject(BillingMeterProperties.class); - Assertions.assertEquals("fkbey", model.category()); - Assertions.assertEquals("wrmjmwvvjektc", model.meterType()); - Assertions.assertEquals("enhwlrs", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingMeterProperties model = new BillingMeterProperties().withCategory("fkbey").withMeterType("wrmjmwvvjektc") - .withDisplayName("enhwlrs"); - model = BinaryData.fromObject(model).toObject(BillingMeterProperties.class); - Assertions.assertEquals("fkbey", model.category()); - Assertions.assertEquals("wrmjmwvvjektc", model.meterType()); - Assertions.assertEquals("enhwlrs", 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 bfd70b49381d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterTests.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.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\":\"ixzbinjeputtmryw\",\"properties\":{\"category\":\"oqftiyqzrnkcq\",\"meterType\":\"xlwhzlsicoh\",\"displayName\":\"qnwvlrya\"},\"id\":\"hheunmmqhgyx\",\"name\":\"konocu\",\"type\":\"oklyaxuconuq\"}") - .toObject(BillingMeter.class); - Assertions.assertEquals("ixzbinjeputtmryw", model.location()); - Assertions.assertEquals("oqftiyqzrnkcq", model.properties().category()); - Assertions.assertEquals("xlwhzlsicoh", model.properties().meterType()); - Assertions.assertEquals("qnwvlrya", model.properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingMeter model - = new BillingMeter().withLocation("ixzbinjeputtmryw").withProperties(new BillingMeterProperties() - .withCategory("oqftiyqzrnkcq").withMeterType("xlwhzlsicoh").withDisplayName("qnwvlrya")); - model = BinaryData.fromObject(model).toObject(BillingMeter.class); - Assertions.assertEquals("ixzbinjeputtmryw", model.location()); - Assertions.assertEquals("oqftiyqzrnkcq", model.properties().category()); - Assertions.assertEquals("xlwhzlsicoh", model.properties().meterType()); - Assertions.assertEquals("qnwvlrya", 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 553b35b0c887..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetWithResponseMockTests.java +++ /dev/null @@ -1,59 +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\":\"suah\",\"properties\":{\"category\":\"xjcmmzrrsc\",\"meterType\":\"i\",\"displayName\":\"drnpxqwodiff\"},\"id\":\"cjrmmua\",\"name\":\"wibvjogj\",\"type\":\"nmc\"},{\"location\":\"foyzbamwineof\",\"properties\":{\"category\":\"akpoldtvevbo\",\"meterType\":\"zhzjknyuxg\",\"displayName\":\"txpnrupza\"},\"id\":\"rdixt\",\"name\":\"ekidswyskb\",\"type\":\"uffgllukkutvlx\"}]}"; - - 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("albmqkyojwyvfk", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("suah", response.value().get(0).location()); - Assertions.assertEquals("xjcmmzrrsc", response.value().get(0).properties().category()); - Assertions.assertEquals("i", response.value().get(0).properties().meterType()); - Assertions.assertEquals("drnpxqwodiff", response.value().get(0).properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BlobStorageTokenStoreTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BlobStorageTokenStoreTests.java deleted file mode 100644 index 4ba0dc297ed0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BlobStorageTokenStoreTests.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.BlobStorageTokenStore; -import org.junit.jupiter.api.Assertions; - -public final class BlobStorageTokenStoreTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BlobStorageTokenStore model - = BinaryData.fromString("{\"sasUrlSettingName\":\"keyyi\"}").toObject(BlobStorageTokenStore.class); - Assertions.assertEquals("keyyi", model.sasUrlSettingName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BlobStorageTokenStore model = new BlobStorageTokenStore().withSasUrlSettingName("keyyi"); - model = BinaryData.fromObject(model).toObject(BlobStorageTokenStore.class); - Assertions.assertEquals("keyyi", model.sasUrlSettingName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildConfigurationTests.java deleted file mode 100644 index 3bd395011233..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildConfigurationTests.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.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BuildConfiguration; -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; -import org.junit.jupiter.api.Assertions; - -public final class BuildConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuildConfiguration model = BinaryData.fromString( - "{\"baseOs\":\"qtkoievs\",\"platform\":\"tgqr\",\"platformVersion\":\"tmuwlauwzi\",\"environmentVariables\":[{\"name\":\"mpgcjefuzmuvpbt\",\"value\":\"d\"}],\"preBuildSteps\":[{\"description\":\"p\",\"scripts\":[\"bmnzbtbhjpgl\",\"fgohdneuelfphs\",\"yhtozfikdowwqu\",\"v\"],\"httpGet\":{\"url\":\"xclvit\",\"fileName\":\"qzonosggbhcohf\",\"headers\":[\"jnkaljutiiswacff\",\"dkzzewkfvhqcrail\"]}},{\"description\":\"n\",\"scripts\":[\"uflrwd\",\"hdlxyjrxsagafcn\",\"hgw\"],\"httpGet\":{\"url\":\"pnedgf\",\"fileName\":\"vkcvqvpkeqd\",\"headers\":[\"rhvoods\",\"tbobz\",\"opcjwvnhd\"]}},{\"description\":\"wmgxcxrsl\",\"scripts\":[\"twuoegrpkhjwni\"],\"httpGet\":{\"url\":\"sluicpdggkzz\",\"fileName\":\"mbmpaxmodfvuefy\",\"headers\":[\"pfvmwyhrfou\",\"ft\"]}},{\"description\":\"kcpwiy\",\"scripts\":[\"tmnubexkpzksmon\",\"jmquxvypomgk\",\"pkwhojvpa\"],\"httpGet\":{\"url\":\"gxysmocmbqfqvm\",\"fileName\":\"xozap\",\"headers\":[\"lxprglyatddckcbc\",\"ejrjxgciqibrho\",\"xsdqrhzoymibmrqy\",\"bahwfl\"]}}]}") - .toObject(BuildConfiguration.class); - Assertions.assertEquals("qtkoievs", model.baseOs()); - Assertions.assertEquals("tgqr", model.platform()); - Assertions.assertEquals("tmuwlauwzi", model.platformVersion()); - Assertions.assertEquals("mpgcjefuzmuvpbt", model.environmentVariables().get(0).name()); - Assertions.assertEquals("d", model.environmentVariables().get(0).value()); - Assertions.assertEquals("p", model.preBuildSteps().get(0).description()); - Assertions.assertEquals("bmnzbtbhjpgl", model.preBuildSteps().get(0).scripts().get(0)); - Assertions.assertEquals("xclvit", model.preBuildSteps().get(0).httpGet().url()); - Assertions.assertEquals("qzonosggbhcohf", model.preBuildSteps().get(0).httpGet().fileName()); - Assertions.assertEquals("jnkaljutiiswacff", model.preBuildSteps().get(0).httpGet().headers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuildConfiguration model - = new BuildConfiguration().withBaseOs("qtkoievs").withPlatform("tgqr").withPlatformVersion("tmuwlauwzi") - .withEnvironmentVariables( - Arrays.asList(new EnvironmentVariable().withName("mpgcjefuzmuvpbt").withValue("d"))) - .withPreBuildSteps(Arrays.asList( - new PreBuildStep().withDescription("p") - .withScripts(Arrays.asList("bmnzbtbhjpgl", "fgohdneuelfphs", "yhtozfikdowwqu", "v")) - .withHttpGet(new HttpGet().withUrl("xclvit").withFileName("qzonosggbhcohf") - .withHeaders(Arrays.asList("jnkaljutiiswacff", "dkzzewkfvhqcrail"))), - new PreBuildStep().withDescription("n") - .withScripts(Arrays.asList("uflrwd", "hdlxyjrxsagafcn", "hgw")) - .withHttpGet(new HttpGet().withUrl("pnedgf").withFileName("vkcvqvpkeqd") - .withHeaders(Arrays.asList("rhvoods", "tbobz", "opcjwvnhd"))), - new PreBuildStep().withDescription("wmgxcxrsl").withScripts(Arrays.asList("twuoegrpkhjwni")) - .withHttpGet(new HttpGet().withUrl("sluicpdggkzz").withFileName("mbmpaxmodfvuefy") - .withHeaders(Arrays.asList("pfvmwyhrfou", "ft"))), - new PreBuildStep().withDescription("kcpwiy") - .withScripts(Arrays.asList("tmnubexkpzksmon", "jmquxvypomgk", "pkwhojvpa")) - .withHttpGet(new HttpGet().withUrl("gxysmocmbqfqvm").withFileName("xozap").withHeaders( - Arrays.asList("lxprglyatddckcbc", "ejrjxgciqibrho", "xsdqrhzoymibmrqy", "bahwfl"))))); - model = BinaryData.fromObject(model).toObject(BuildConfiguration.class); - Assertions.assertEquals("qtkoievs", model.baseOs()); - Assertions.assertEquals("tgqr", model.platform()); - Assertions.assertEquals("tmuwlauwzi", model.platformVersion()); - Assertions.assertEquals("mpgcjefuzmuvpbt", model.environmentVariables().get(0).name()); - Assertions.assertEquals("d", model.environmentVariables().get(0).value()); - Assertions.assertEquals("p", model.preBuildSteps().get(0).description()); - Assertions.assertEquals("bmnzbtbhjpgl", model.preBuildSteps().get(0).scripts().get(0)); - Assertions.assertEquals("xclvit", model.preBuildSteps().get(0).httpGet().url()); - Assertions.assertEquals("qzonosggbhcohf", model.preBuildSteps().get(0).httpGet().fileName()); - Assertions.assertEquals("jnkaljutiiswacff", model.preBuildSteps().get(0).httpGet().headers().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderCollectionTests.java deleted file mode 100644 index 19ee9362b5ac..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderCollectionTests.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.BuilderResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuilderCollection; -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; -import org.junit.jupiter.api.Assertions; - -public final class BuilderCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuilderCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"environmentId\":\"wvlqdqgb\",\"containerRegistries\":[{\"containerRegistryServer\":\"lihkaetcktvfc\",\"identityResourceId\":\"vf\"},{\"containerRegistryServer\":\"nkymuctqhjfbebrj\",\"identityResourceId\":\"xerf\"},{\"containerRegistryServer\":\"wutttxfvjrbi\",\"identityResourceId\":\"phxepcyvahf\"}]},\"identity\":{\"principalId\":\"847b4663-757a-41a8-a56a-bef3059e77aa\",\"tenantId\":\"df774d78-50b5-4a1d-adac-338d71865837\",\"type\":\"None\",\"userAssignedIdentities\":{\"uujqgidokgjljyo\":{\"principalId\":\"a7fee7c7-290a-4bae-94d9-fb07083e5965\",\"clientId\":\"0889cb62-fb77-4fdb-b1c8-2b173c8fc2be\"},\"cltbgsncghkjesz\":{\"principalId\":\"164d1a09-5a25-463b-b558-f2efc8364f6b\",\"clientId\":\"2ffaa11d-2317-4fec-86d8-1d93bf776f8a\"},\"ijhtxf\":{\"principalId\":\"3951829e-34d2-4e98-bf40-5a758a45d0e8\",\"clientId\":\"96279c01-3539-4642-84b5-ebccf5e05ff1\"},\"bfs\":{\"principalId\":\"728f80c3-ede8-4470-87e4-fe11de510296\",\"clientId\":\"8b1c2b8d-f2f2-4209-8f41-3f8c230b516b\"}}},\"location\":\"nehmpvecx\",\"tags\":{\"ukgri\":\"ebfqkkrbm\",\"fbxzpuzycisp\":\"flz\",\"y\":\"qzahmgkbrp\",\"rgvtqag\":\"hibnuqqkpika\"},\"id\":\"buynhijggm\",\"name\":\"bfs\",\"type\":\"arbu\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"environmentId\":\"pnazzm\",\"containerRegistries\":[{\"containerRegistryServer\":\"unmpxttd\",\"identityResourceId\":\"hrbnlankxmyskpbh\"},{\"containerRegistryServer\":\"nbtkcxywnytnr\",\"identityResourceId\":\"yn\"}]},\"identity\":{\"principalId\":\"99dac99b-6165-4414-8858-081afadffaee\",\"tenantId\":\"9e9e4442-9e55-454f-9121-dfd87c468189\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"zfcl\":{\"principalId\":\"97be5077-94a1-473d-baa0-da7633d0826c\",\"clientId\":\"2099c3f0-e4d9-420c-9d5b-85bace4a931d\"},\"xdbabphlwr\":{\"principalId\":\"f0472d36-d7b8-4ded-a1c3-7b4b6ccccb2a\",\"clientId\":\"e147659a-84e8-472b-80fd-0d82d0663c31\"}}},\"location\":\"fkts\",\"tags\":{\"nyyazttbtwwrqpue\":\"ucoc\",\"xibxujwbhqwalm\":\"ckzywbiexzfeyue\",\"ux\":\"zyoxaepdkzjan\",\"zt\":\"hdwbavxbniwdjs\"},\"id\":\"dbpgnxytxhp\",\"name\":\"xbzpfzab\",\"type\":\"lcuhxwtctyqiklb\"},{\"properties\":{\"provisioningState\":\"Creating\",\"environmentId\":\"lwzbhvgyugu\",\"containerRegistries\":[{\"containerRegistryServer\":\"mkfssxqukkfplgm\",\"identityResourceId\":\"sxnkjzkdeslpvlo\"},{\"containerRegistryServer\":\"wiyighxpkdw\",\"identityResourceId\":\"baiuebbaumny\"},{\"containerRegistryServer\":\"upedeojnabckhs\",\"identityResourceId\":\"txp\"}]},\"identity\":{\"principalId\":\"f84befd7-75fa-49a4-abee-cfbabdc853d1\",\"tenantId\":\"85643d46-bb48-41b8-ad99-9bc5fea1ab84\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"esap\":{\"principalId\":\"a98a3a00-f04d-4aec-bdad-24e8cea65ea8\",\"clientId\":\"5a3b38f1-76b5-4b45-ba9e-61ef317d599a\"},\"dqmh\":{\"principalId\":\"656b7cd5-d2b0-4edf-b482-37215064e168\",\"clientId\":\"c8bb6d30-8937-448a-97a2-c4ff7d398651\"},\"htldwk\":{\"principalId\":\"dd5064b4-3820-4423-834c-29b659c662b6\",\"clientId\":\"d75b71f7-777c-4b86-9fa1-82c28fab3b0d\"},\"uutkncw\":{\"principalId\":\"c059546f-c78c-47cf-9cfa-5cafa7a16def\",\"clientId\":\"7de0cf22-8535-493e-86f6-03a477389d01\"}}},\"location\":\"wsvlxotogtwrupqs\",\"tags\":{\"notyfjfcnjbkcn\":\"micykvceoveilo\"},\"id\":\"dhbt\",\"name\":\"kphywpnvjto\",\"type\":\"nermcl\"}],\"nextLink\":\"lphox\"}") - .toObject(BuilderCollection.class); - Assertions.assertEquals("nehmpvecx", model.value().get(0).location()); - Assertions.assertEquals("ebfqkkrbm", model.value().get(0).tags().get("ukgri")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("wvlqdqgb", model.value().get(0).environmentId()); - Assertions.assertEquals("lihkaetcktvfc", - model.value().get(0).containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("vf", model.value().get(0).containerRegistries().get(0).identityResourceId()); - Assertions.assertEquals("lphox", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuilderCollection model - = new BuilderCollection() - .withValue( - Arrays - .asList( - new BuilderResourceInner().withLocation("nehmpvecx") - .withTags(mapOf("ukgri", "ebfqkkrbm", "fbxzpuzycisp", "flz", "y", "qzahmgkbrp", - "rgvtqag", "hibnuqqkpika")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("uujqgidokgjljyo", new UserAssignedIdentity(), - "cltbgsncghkjesz", new UserAssignedIdentity(), "ijhtxf", - new UserAssignedIdentity(), "bfs", new UserAssignedIdentity()))) - .withEnvironmentId("wvlqdqgb") - .withContainerRegistries(Arrays.asList( - new ContainerRegistry().withContainerRegistryServer("lihkaetcktvfc") - .withIdentityResourceId("vf"), - new ContainerRegistry().withContainerRegistryServer("nkymuctqhjfbebrj") - .withIdentityResourceId("xerf"), - new ContainerRegistry().withContainerRegistryServer("wutttxfvjrbi") - .withIdentityResourceId("phxepcyvahf"))), - new BuilderResourceInner().withLocation("fkts") - .withTags(mapOf("nyyazttbtwwrqpue", "ucoc", "xibxujwbhqwalm", "ckzywbiexzfeyue", "ux", - "zyoxaepdkzjan", "zt", "hdwbavxbniwdjs")) - .withIdentity( - new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("zfcl", new UserAssignedIdentity(), - "xdbabphlwr", new UserAssignedIdentity()))) - .withEnvironmentId("pnazzm") - .withContainerRegistries(Arrays.asList( - new ContainerRegistry().withContainerRegistryServer("unmpxttd") - .withIdentityResourceId("hrbnlankxmyskpbh"), - new ContainerRegistry().withContainerRegistryServer("nbtkcxywnytnr") - .withIdentityResourceId("yn"))), - new BuilderResourceInner().withLocation("wsvlxotogtwrupqs") - .withTags(mapOf("notyfjfcnjbkcn", "micykvceoveilo")) - .withIdentity(new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("esap", new UserAssignedIdentity(), "dqmh", - new UserAssignedIdentity(), "htldwk", new UserAssignedIdentity(), "uutkncw", - new UserAssignedIdentity()))) - .withEnvironmentId("lwzbhvgyugu") - .withContainerRegistries(Arrays.asList( - new ContainerRegistry().withContainerRegistryServer("mkfssxqukkfplgm") - .withIdentityResourceId("sxnkjzkdeslpvlo"), - new ContainerRegistry().withContainerRegistryServer("wiyighxpkdw") - .withIdentityResourceId("baiuebbaumny"), - new ContainerRegistry().withContainerRegistryServer("upedeojnabckhs") - .withIdentityResourceId("txp"))))) - .withNextLink("lphox"); - model = BinaryData.fromObject(model).toObject(BuilderCollection.class); - Assertions.assertEquals("nehmpvecx", model.value().get(0).location()); - Assertions.assertEquals("ebfqkkrbm", model.value().get(0).tags().get("ukgri")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("wvlqdqgb", model.value().get(0).environmentId()); - Assertions.assertEquals("lihkaetcktvfc", - model.value().get(0).containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("vf", model.value().get(0).containerRegistries().get(0).identityResourceId()); - Assertions.assertEquals("lphox", model.nextLink()); - } - - // 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/BuilderPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderPropertiesTests.java deleted file mode 100644 index 0005ed2ef507..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderPropertiesTests.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.fluent.models.BuilderProperties; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BuilderPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuilderProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Deleting\",\"environmentId\":\"b\",\"containerRegistries\":[{\"containerRegistryServer\":\"dawkzbali\",\"identityResourceId\":\"urqhaka\"},{\"containerRegistryServer\":\"hashsfwxosow\",\"identityResourceId\":\"xcug\"},{\"containerRegistryServer\":\"cjooxdjebwpucwwf\",\"identityResourceId\":\"ovbvmeueciv\"},{\"containerRegistryServer\":\"hzceuojgjrwjue\",\"identityResourceId\":\"otwmcdyt\"}]}") - .toObject(BuilderProperties.class); - Assertions.assertEquals("b", model.environmentId()); - Assertions.assertEquals("dawkzbali", model.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("urqhaka", model.containerRegistries().get(0).identityResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuilderProperties model = new BuilderProperties().withEnvironmentId("b").withContainerRegistries(Arrays.asList( - new ContainerRegistry().withContainerRegistryServer("dawkzbali").withIdentityResourceId("urqhaka"), - new ContainerRegistry().withContainerRegistryServer("hashsfwxosow").withIdentityResourceId("xcug"), - new ContainerRegistry().withContainerRegistryServer("cjooxdjebwpucwwf") - .withIdentityResourceId("ovbvmeueciv"), - new ContainerRegistry().withContainerRegistryServer("hzceuojgjrwjue").withIdentityResourceId("otwmcdyt"))); - model = BinaryData.fromObject(model).toObject(BuilderProperties.class); - Assertions.assertEquals("b", model.environmentId()); - Assertions.assertEquals("dawkzbali", model.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("urqhaka", model.containerRegistries().get(0).identityResourceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceInnerTests.java deleted file mode 100644 index 80d64973eaba..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceInnerTests.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.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; -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; -import org.junit.jupiter.api.Assertions; - -public final class BuilderResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuilderResourceInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"environmentId\":\"pabgyeps\",\"containerRegistries\":[{\"containerRegistryServer\":\"azqugxywpmueefj\",\"identityResourceId\":\"wfqkquj\"},{\"containerRegistryServer\":\"dsuyonobgla\",\"identityResourceId\":\"cq\"},{\"containerRegistryServer\":\"tcc\",\"identityResourceId\":\"g\"},{\"containerRegistryServer\":\"udxytlmoyrx\",\"identityResourceId\":\"wfudwpzntxhdzhl\"}]},\"identity\":{\"principalId\":\"d283a77e-dc68-4ae8-9a29-91c6c96dc2b0\",\"tenantId\":\"b5f6c785-2c4d-4e2f-a0e8-4d64408cfd27\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"lhrxsbkyvpyc\":{\"principalId\":\"2490eb9b-07eb-4e06-966e-9cf27322e46a\",\"clientId\":\"fa5994e2-52a1-4105-b133-71ed814de3d2\"},\"z\":{\"principalId\":\"fd046a24-727e-48e9-9aa4-f098807f38bb\",\"clientId\":\"ab7a4713-0fc0-41a8-9005-ac1ab2176387\"},\"kafkuwbcrnwbm\":{\"principalId\":\"306b92b0-9b5e-4a2f-90ff-9628fb77bc1c\",\"clientId\":\"63448741-c49e-4827-94f1-a0095ba114de\"}}},\"location\":\"hseyvju\",\"tags\":{\"kdeemaofmxagkvtm\":\"slhs\",\"ahaquh\":\"lmqkrhahvlj\",\"aex\":\"dhmdua\"},\"id\":\"pvfadmwsrcr\",\"name\":\"vxpvgomz\",\"type\":\"fmisg\"}") - .toObject(BuilderResourceInner.class); - Assertions.assertEquals("hseyvju", model.location()); - Assertions.assertEquals("slhs", model.tags().get("kdeemaofmxagkvtm")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("pabgyeps", model.environmentId()); - Assertions.assertEquals("azqugxywpmueefj", model.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("wfqkquj", model.containerRegistries().get(0).identityResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuilderResourceInner model = new BuilderResourceInner().withLocation("hseyvju") - .withTags(mapOf("kdeemaofmxagkvtm", "slhs", "ahaquh", "lmqkrhahvlj", "aex", "dhmdua")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("lhrxsbkyvpyc", new UserAssignedIdentity(), "z", - new UserAssignedIdentity(), "kafkuwbcrnwbm", new UserAssignedIdentity()))) - .withEnvironmentId("pabgyeps") - .withContainerRegistries(Arrays.asList( - new ContainerRegistry().withContainerRegistryServer("azqugxywpmueefj") - .withIdentityResourceId("wfqkquj"), - new ContainerRegistry().withContainerRegistryServer("dsuyonobgla").withIdentityResourceId("cq"), - new ContainerRegistry().withContainerRegistryServer("tcc").withIdentityResourceId("g"), - new ContainerRegistry().withContainerRegistryServer("udxytlmoyrx") - .withIdentityResourceId("wfudwpzntxhdzhl"))); - model = BinaryData.fromObject(model).toObject(BuilderResourceInner.class); - Assertions.assertEquals("hseyvju", model.location()); - Assertions.assertEquals("slhs", model.tags().get("kdeemaofmxagkvtm")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("pabgyeps", model.environmentId()); - Assertions.assertEquals("azqugxywpmueefj", model.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("wfqkquj", model.containerRegistries().get(0).identityResourceId()); - } - - // 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/BuilderResourceUpdatePropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdatePropertiesTests.java deleted file mode 100644 index cca471d917c8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdatePropertiesTests.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.fluent.models.BuilderResourceUpdateProperties; -import org.junit.jupiter.api.Assertions; - -public final class BuilderResourceUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuilderResourceUpdateProperties model - = BinaryData.fromString("{\"environmentId\":\"zjuzgwyz\"}").toObject(BuilderResourceUpdateProperties.class); - Assertions.assertEquals("zjuzgwyz", model.environmentId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuilderResourceUpdateProperties model = new BuilderResourceUpdateProperties().withEnvironmentId("zjuzgwyz"); - model = BinaryData.fromObject(model).toObject(BuilderResourceUpdateProperties.class); - Assertions.assertEquals("zjuzgwyz", model.environmentId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdateTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdateTests.java deleted file mode 100644 index 53627eaca33b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdateTests.java +++ /dev/null @@ -1,52 +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.BuilderResourceUpdate; -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 BuilderResourceUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuilderResourceUpdate model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"84d35291-d118-4f28-95b0-c1dcc3c3a910\",\"tenantId\":\"263ffff3-91e3-4316-90cc-1884f071a054\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"dnhjdauwhvylw\":{\"principalId\":\"b77a149b-c006-4798-9e9d-df5a35b59301\",\"clientId\":\"39ba2083-5071-4bde-9214-424f126d40a2\"}}},\"tags\":{\"uwprzql\":\"dhxujznbmpo\",\"obbc\":\"eualupjmkhf\",\"tghfgblcgwxzvl\":\"wsrtjriplrbpbe\",\"egibtnmxiebww\":\"qhjk\"},\"properties\":{\"environmentId\":\"ayqcgw\"}}") - .toObject(BuilderResourceUpdate.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("dhxujznbmpo", model.tags().get("uwprzql")); - Assertions.assertEquals("ayqcgw", model.environmentId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuilderResourceUpdate model = new BuilderResourceUpdate() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("dnhjdauwhvylw", new UserAssignedIdentity()))) - .withTags(mapOf("uwprzql", "dhxujznbmpo", "obbc", "eualupjmkhf", "tghfgblcgwxzvl", "wsrtjriplrbpbe", - "egibtnmxiebww", "qhjk")) - .withEnvironmentId("ayqcgw"); - model = BinaryData.fromObject(model).toObject(BuilderResourceUpdate.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("dhxujznbmpo", model.tags().get("uwprzql")); - Assertions.assertEquals("ayqcgw", model.environmentId()); - } - - // 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/BuildersCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateMockTests.java deleted file mode 100644 index 906b03fa1bd0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateMockTests.java +++ /dev/null @@ -1,88 +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.BuilderResource; -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.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BuildersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"environmentId\":\"atmqaqkuea\",\"containerRegistries\":[{\"containerRegistryServer\":\"oeshoygzcbyfq\",\"identityResourceId\":\"kfaoytehq\"},{\"containerRegistryServer\":\"uvjmv\",\"identityResourceId\":\"mtdwcky\"},{\"containerRegistryServer\":\"roejnndl\",\"identityResourceId\":\"djus\"}]},\"identity\":{\"principalId\":\"29dd6fc0-5b2c-4cc8-9cb1-9501230a97a8\",\"tenantId\":\"5b1e8839-d481-4cb6-90ec-e581fdf6f956\",\"type\":\"None\",\"userAssignedIdentities\":{\"ceysfaqeg\":{\"principalId\":\"6cd39565-3324-42f6-98f0-583a9e522072\",\"clientId\":\"7ff600fa-8860-4231-b8b5-4d6dc00eafc2\"},\"ryshwddkvbxgk\":{\"principalId\":\"0c22e148-22ce-455b-bffb-2d4bbec3cd57\",\"clientId\":\"8c461e97-f8b7-4554-84f9-0649f58baf04\"},\"ybwptda\":{\"principalId\":\"af01ff2e-9a5d-499a-b7e8-0bf72c2ab883\",\"clientId\":\"6db5edb8-83ab-4cf7-82c0-3800f26995e0\"},\"vvlfntymtp\":{\"principalId\":\"20a56fda-56ca-42b7-85fb-ccf6bca27205\",\"clientId\":\"e465b82e-bfa2-44c4-9a2f-d84fc0233ac5\"}}},\"location\":\"wenaz\",\"tags\":{\"qalsxkd\":\"hzr\",\"vessm\":\"wqapfgsdp\",\"dqq\":\"hhkuuip\"},\"id\":\"tekva\",\"name\":\"blhtjq\",\"type\":\"qyv\"}"; - - 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)); - - BuilderResource response = manager.builders().define("jbuscg").withRegion("yqrhvyeld") - .withExistingResourceGroup("bapxkiyfjjkb").withTags(mapOf("kwiswskukjtas", "v")) - .withIdentity( - new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("ovwmbjlzqsczpgvd", new UserAssignedIdentity(), "pfdqwowftptnu", - new UserAssignedIdentity(), "kschgcgqyhle", new UserAssignedIdentity()))) - .withEnvironmentId("ioycbl") - .withContainerRegistries(Arrays.asList( - new ContainerRegistry().withContainerRegistryServer("mclujyxkyxlzgs").withIdentityResourceId("gkzz"))) - .create(); - - Assertions.assertEquals("wenaz", response.location()); - Assertions.assertEquals("hzr", response.tags().get("qalsxkd")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("atmqaqkuea", response.environmentId()); - Assertions.assertEquals("oeshoygzcbyfq", response.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("kfaoytehq", response.containerRegistries().get(0).identityResourceId()); - } - - // 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/BuildersGetByResourceGroupWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 1773ed82e36c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupWithResponseMockTests.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.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.BuilderResource; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -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 BuildersGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"provisioningState\":\"Creating\",\"environmentId\":\"fwxudgnhg\",\"containerRegistries\":[{\"containerRegistryServer\":\"rtalvnbw\",\"identityResourceId\":\"pbeme\"},{\"containerRegistryServer\":\"uclvdjj\",\"identityResourceId\":\"kyrdnqodx\"}]},\"identity\":{\"principalId\":\"bd9b5d66-1857-47d4-96d2-da4b481c35dd\",\"tenantId\":\"84cd9d11-7fea-4e15-ac57-bda25c53edac\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"nvzoqgyipemch\":{\"principalId\":\"16827f64-00c8-404f-aeea-4da9cde3c89b\",\"clientId\":\"c5ce0006-6d24-445d-92b4-833a2c7a7490\"},\"sczuejdtxptlghwz\":{\"principalId\":\"b8d8b831-a0f2-47f3-8a51-4a61f7514391\",\"clientId\":\"cc54e4b5-cc4c-4b96-8585-53dc03fcb8e8\"}}},\"location\":\"mewjjstliuhq\",\"tags\":{\"blxydkxr\":\"oaiancznvodrrs\",\"hychocokuleh\":\"vvbxiwkgfbqljnq\"},\"id\":\"rqlrqffawe\",\"name\":\"urkphyjdxravju\",\"type\":\"dbrxmrgc\"}"; - - 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)); - - BuilderResource response = manager.builders() - .getByResourceGroupWithResponse("ftabenbbklqp", "zucafeddww", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("mewjjstliuhq", response.location()); - Assertions.assertEquals("oaiancznvodrrs", response.tags().get("blxydkxr")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals("fwxudgnhg", response.environmentId()); - Assertions.assertEquals("rtalvnbw", response.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("pbeme", response.containerRegistries().get(0).identityResourceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupMockTests.java deleted file mode 100644 index 9b78786f059b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupMockTests.java +++ /dev/null @@ -1,65 +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.BuilderResource; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -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 BuildersListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"environmentId\":\"jzcfyjzptwr\",\"containerRegistries\":[{\"containerRegistryServer\":\"apqinf\",\"identityResourceId\":\"zpyglqdhmrj\"}]},\"identity\":{\"principalId\":\"c109c21e-0de6-4ec9-9e01-b23c08f50998\",\"tenantId\":\"05125a64-3f48-49a4-8407-c0dbd090d728\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"yypsjoqc\":{\"principalId\":\"9eb3f752-d5b7-4d78-b818-4f329432f5b6\",\"clientId\":\"a410d029-5e56-4090-83f9-84d3bb9258c0\"}}},\"location\":\"nkyhf\",\"tags\":{\"jhhhqxu\":\"sqxfxjelgcmpz\",\"oyvivbsiz\":\"yvca\",\"bscm\":\"sjsz\",\"v\":\"lzijiufehgmvflnw\"},\"id\":\"kxrerlniylylyfwx\",\"name\":\"utgqztwh\",\"type\":\"hmupgxyjtcdxabbu\"}]}"; - - 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.builders().listByResourceGroup("hcoeocnhzq", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("nkyhf", response.iterator().next().location()); - Assertions.assertEquals("sqxfxjelgcmpz", response.iterator().next().tags().get("jhhhqxu")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("jzcfyjzptwr", response.iterator().next().environmentId()); - Assertions.assertEquals("apqinf", - response.iterator().next().containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("zpyglqdhmrj", - response.iterator().next().containerRegistries().get(0).identityResourceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListMockTests.java deleted file mode 100644 index 14576179a9bf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.BuilderResource; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -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 BuildersListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"environmentId\":\"hvmblcouqehbhbc\",\"containerRegistries\":[{\"containerRegistryServer\":\"iryr\",\"identityResourceId\":\"ndo\"},{\"containerRegistryServer\":\"pmbltoormkfql\",\"identityResourceId\":\"xldykalsygaolnjp\"},{\"containerRegistryServer\":\"nbmjksibjgsjjxxa\",\"identityResourceId\":\"mr\"}]},\"identity\":{\"principalId\":\"1c0c7461-3309-4da8-9a13-57a29f20a97a\",\"tenantId\":\"f4d0c201-f27f-4a61-9ce1-ee809d63cbc9\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"yi\":{\"principalId\":\"8c44f5f7-1e24-45c6-8ed8-7777f6b38434\",\"clientId\":\"996c6a94-136d-48bd-826a-dfa5b00f46e1\"},\"nbm\":{\"principalId\":\"15efa945-7dba-47ff-9a63-7af495e5bce0\",\"clientId\":\"87bb6b63-12d1-4dc5-9198-4d1337032c68\"},\"jijkgqxnhmbke\":{\"principalId\":\"c3b09876-f7ea-4464-8c81-489961014d00\",\"clientId\":\"f3afd130-f471-4f6e-bccb-6be5ee9517d3\"},\"aujvaa\":{\"principalId\":\"aea57d92-76b1-4aa4-95da-0a7b69363c60\",\"clientId\":\"58f73390-0e22-4fce-a34a-5b5e0fbf1c13\"}}},\"location\":\"ggiycwkdtaawxwf\",\"tags\":{\"kratbnxwbj\":\"umrrqmbzm\",\"dgo\":\"idbirkfpkso\",\"zkye\":\"ewijymrhbguz\",\"o\":\"nfnzhhh\"},\"id\":\"mffjkutycyarn\",\"name\":\"oohguabzoghkt\",\"type\":\"pyc\"}]}"; - - 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.builders().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ggiycwkdtaawxwf", response.iterator().next().location()); - Assertions.assertEquals("umrrqmbzm", response.iterator().next().tags().get("kratbnxwbj")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("hvmblcouqehbhbc", response.iterator().next().environmentId()); - Assertions.assertEquals("iryr", - response.iterator().next().containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("ndo", response.iterator().next().containerRegistries().get(0).identityResourceId()); - } -} 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 52739b2c49ca..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.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.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\":{\"ekkezzikhlyfjh\":\"kfcktqum\"}}").toObject(CertificatePatch.class); - Assertions.assertEquals("kfcktqum", model.tags().get("ekkezzikhlyfjh")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CertificatePatch model = new CertificatePatch().withTags(mapOf("ekkezzikhlyfjh", "kfcktqum")); - model = BinaryData.fromObject(model).toObject(CertificatePatch.class); - Assertions.assertEquals("kfcktqum", model.tags().get("ekkezzikhlyfjh")); - } - - // 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 cbeb7511b7d9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,52 +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("ymjzpwdlvwtiws", "osaonhqnamppu", "tassaekewna", - 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 54fee892b5da..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.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.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\":\"i\",\"type\":\"blxgwimf\"}") - .toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("i", model.name()); - Assertions.assertEquals("blxgwimf", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityRequest model = new CheckNameAvailabilityRequest().withName("i").withType("blxgwimf"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("i", model.name()); - Assertions.assertEquals("blxgwimf", 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 6d25db82465b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.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.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\":false,\"reason\":\"Invalid\",\"message\":\"wmszkk\"}") - .toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); - Assertions.assertEquals("wmszkk", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityResponseInner model = new CheckNameAvailabilityResponseInner().withNameAvailable(false) - .withReason(CheckNameAvailabilityReason.INVALID).withMessage("wmszkk"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); - Assertions.assertEquals("wmszkk", model.message()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CircuitBreakerPolicyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CircuitBreakerPolicyTests.java deleted file mode 100644 index 552002cd6f22..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CircuitBreakerPolicyTests.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.CircuitBreakerPolicy; -import org.junit.jupiter.api.Assertions; - -public final class CircuitBreakerPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CircuitBreakerPolicy model = BinaryData - .fromString( - "{\"consecutiveErrors\":1722437661,\"intervalInSeconds\":1946289710,\"maxEjectionPercent\":158340850}") - .toObject(CircuitBreakerPolicy.class); - Assertions.assertEquals(1722437661, model.consecutiveErrors()); - Assertions.assertEquals(1946289710, model.intervalInSeconds()); - Assertions.assertEquals(158340850, model.maxEjectionPercent()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CircuitBreakerPolicy model = new CircuitBreakerPolicy().withConsecutiveErrors(1722437661) - .withIntervalInSeconds(1946289710).withMaxEjectionPercent(158340850); - model = BinaryData.fromObject(model).toObject(CircuitBreakerPolicy.class); - Assertions.assertEquals(1722437661, model.consecutiveErrors()); - Assertions.assertEquals(1946289710, model.intervalInSeconds()); - Assertions.assertEquals(158340850, model.maxEjectionPercent()); - } -} 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 aeaabdb8f080..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,52 +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("rcyrucpcunnu", "dqumoenodnai", "nhq", - 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 03908e4869ac..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests.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 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\":false,\"reason\":\"Invalid\",\"message\":\"jtfvpndpmiljpn\"}"; - - 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("zregzgyufutrwpw", "ryekzkd", - new CheckNameAvailabilityRequest().withName("eotta").withType("yos"), com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, response.reason()); - Assertions.assertEquals("jtfvpndpmiljpn", 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 8036deaffa7f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,52 +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("rhunlp", "rykycndzfqivjr", "uykbbmn", - 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 e8e274a5ebe6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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\":\"myymvqdbpbhfckdv\",\"value\":\"crcss\"},{\"name\":\"hddubbnqfbl\",\"value\":\"alehpav\"}]}"; - - 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("aglt", "xoe", "onql", 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 24f9db539107..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.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.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("hfw", "v", 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 29790bd95607..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,52 +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("xeyg", "qigijiitnspxlzde", "ygr", - 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 99c65f203b0c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppJobExecutionsInnerTests.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.ContainerAppJobExecutionsInner; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; -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\":\"uartvti\",\"id\":\"yefchnm\",\"type\":\"hmnxhkxjqi\",\"properties\":{\"status\":\"Degraded\",\"startTime\":\"2021-02-25T22:43:28Z\",\"endTime\":\"2021-08-15T18:00:46Z\",\"template\":{\"containers\":[{}],\"initContainers\":[{}]}}},{\"name\":\"wrsnewmozqvbu\",\"id\":\"ma\",\"type\":\"sycxhxzgaz\",\"properties\":{\"status\":\"Running\",\"startTime\":\"2021-09-16T19:45:24Z\",\"endTime\":\"2021-01-19T00:16:09Z\",\"template\":{\"containers\":[{},{},{},{}],\"initContainers\":[{}]}}}],\"nextLink\":\"ubowsepdfgkm\"}") - .toObject(ContainerAppJobExecutionsInner.class); - Assertions.assertEquals("uartvti", model.value().get(0).name()); - Assertions.assertEquals("yefchnm", model.value().get(0).id()); - Assertions.assertEquals("hmnxhkxjqi", model.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-25T22:43:28Z"), model.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-15T18:00:46Z"), model.value().get(0).endTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppJobExecutionsInner model = new ContainerAppJobExecutionsInner().withValue(Arrays.asList( - new JobExecutionInner().withName("uartvti").withId("yefchnm").withType("hmnxhkxjqi") - .withStartTime(OffsetDateTime.parse("2021-02-25T22:43:28Z")) - .withEndTime(OffsetDateTime.parse("2021-08-15T18:00:46Z")) - .withTemplate(new JobExecutionTemplate().withContainers(Arrays.asList(new JobExecutionContainer())) - .withInitContainers(Arrays.asList(new JobExecutionContainer()))), - new JobExecutionInner().withName("wrsnewmozqvbu").withId("ma").withType("sycxhxzgaz") - .withStartTime(OffsetDateTime.parse("2021-09-16T19:45:24Z")) - .withEndTime(OffsetDateTime.parse("2021-01-19T00:16:09Z")) - .withTemplate(new JobExecutionTemplate() - .withContainers(Arrays.asList(new JobExecutionContainer(), new JobExecutionContainer(), - new JobExecutionContainer(), new JobExecutionContainer())) - .withInitContainers(Arrays.asList(new JobExecutionContainer()))))); - model = BinaryData.fromObject(model).toObject(ContainerAppJobExecutionsInner.class); - Assertions.assertEquals("uartvti", model.value().get(0).name()); - Assertions.assertEquals("yefchnm", model.value().get(0).id()); - Assertions.assertEquals("hmnxhkxjqi", model.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-25T22:43:28Z"), model.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-15T18:00:46Z"), model.value().get(0).endTime()); - } -} 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 546d6b8d32bd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.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.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\":\"lihhyuspskasdvlm\",\"value\":\"wdgzxulucv\"}") - .toObject(ContainerAppProbeHttpGetHttpHeadersItem.class); - Assertions.assertEquals("lihhyuspskasdvlm", model.name()); - Assertions.assertEquals("wdgzxulucv", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeHttpGetHttpHeadersItem model - = new ContainerAppProbeHttpGetHttpHeadersItem().withName("lihhyuspskasdvlm").withValue("wdgzxulucv"); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeHttpGetHttpHeadersItem.class); - Assertions.assertEquals("lihhyuspskasdvlm", model.name()); - Assertions.assertEquals("wdgzxulucv", 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 0a450bfe15d9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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\":\"shfssnrbgyef\",\"httpHeaders\":[{\"name\":\"sgaojfmwncot\",\"value\":\"rfh\"},{\"name\":\"rctym\",\"value\":\"xoftpipiwyczu\"}],\"path\":\"a\",\"port\":850210589,\"scheme\":\"HTTP\"}") - .toObject(ContainerAppProbeHttpGet.class); - Assertions.assertEquals("shfssnrbgyef", model.host()); - Assertions.assertEquals("sgaojfmwncot", model.httpHeaders().get(0).name()); - Assertions.assertEquals("rfh", model.httpHeaders().get(0).value()); - Assertions.assertEquals("a", model.path()); - Assertions.assertEquals(850210589, model.port()); - Assertions.assertEquals(Scheme.HTTP, model.scheme()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeHttpGet model - = new ContainerAppProbeHttpGet().withHost("shfssnrbgyef") - .withHttpHeaders(Arrays.asList( - new ContainerAppProbeHttpGetHttpHeadersItem().withName("sgaojfmwncot").withValue("rfh"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("rctym").withValue("xoftpipiwyczu"))) - .withPath("a").withPort(850210589).withScheme(Scheme.HTTP); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeHttpGet.class); - Assertions.assertEquals("shfssnrbgyef", model.host()); - Assertions.assertEquals("sgaojfmwncot", model.httpHeaders().get(0).name()); - Assertions.assertEquals("rfh", model.httpHeaders().get(0).value()); - Assertions.assertEquals("a", model.path()); - Assertions.assertEquals(850210589, 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 9acc70016448..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTcpSocketTests.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.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\":\"mrsreuzvxurisjnh\",\"port\":1189641650}") - .toObject(ContainerAppProbeTcpSocket.class); - Assertions.assertEquals("mrsreuzvxurisjnh", model.host()); - Assertions.assertEquals(1189641650, model.port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeTcpSocket model - = new ContainerAppProbeTcpSocket().withHost("mrsreuzvxurisjnh").withPort(1189641650); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeTcpSocket.class); - Assertions.assertEquals("mrsreuzvxurisjnh", model.host()); - Assertions.assertEquals(1189641650, 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 61093c41d2fd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTests.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.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\":1290029311,\"httpGet\":{\"host\":\"ycnunvjsrtk\",\"httpHeaders\":[{\"name\":\"nopqgikyzirtx\",\"value\":\"yuxzejntpsewgi\"},{\"name\":\"ilqu\",\"value\":\"rydxtqm\"},{\"name\":\"eoxorggufhyao\",\"value\":\"tbghhavgrvkf\"},{\"name\":\"ovjzhpjbibgjmfx\",\"value\":\"mv\"}],\"path\":\"luyovwxnbkfezzx\",\"port\":357757853,\"scheme\":\"HTTPS\"},\"initialDelaySeconds\":1673017156,\"periodSeconds\":215949715,\"successThreshold\":1640359024,\"tcpSocket\":{\"host\":\"bzbomvzzbtdcqvpn\",\"port\":1622829877},\"terminationGracePeriodSeconds\":2588743107415946739,\"timeoutSeconds\":277819924,\"type\":\"Startup\"}") - .toObject(ContainerAppProbe.class); - Assertions.assertEquals(1290029311, model.failureThreshold()); - Assertions.assertEquals("ycnunvjsrtk", model.httpGet().host()); - Assertions.assertEquals("nopqgikyzirtx", model.httpGet().httpHeaders().get(0).name()); - Assertions.assertEquals("yuxzejntpsewgi", model.httpGet().httpHeaders().get(0).value()); - Assertions.assertEquals("luyovwxnbkfezzx", model.httpGet().path()); - Assertions.assertEquals(357757853, model.httpGet().port()); - Assertions.assertEquals(Scheme.HTTPS, model.httpGet().scheme()); - Assertions.assertEquals(1673017156, model.initialDelaySeconds()); - Assertions.assertEquals(215949715, model.periodSeconds()); - Assertions.assertEquals(1640359024, model.successThreshold()); - Assertions.assertEquals("bzbomvzzbtdcqvpn", model.tcpSocket().host()); - Assertions.assertEquals(1622829877, model.tcpSocket().port()); - Assertions.assertEquals(2588743107415946739L, model.terminationGracePeriodSeconds()); - Assertions.assertEquals(277819924, model.timeoutSeconds()); - Assertions.assertEquals(Type.STARTUP, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbe model = new ContainerAppProbe().withFailureThreshold(1290029311) - .withHttpGet(new ContainerAppProbeHttpGet().withHost("ycnunvjsrtk") - .withHttpHeaders(Arrays.asList( - new ContainerAppProbeHttpGetHttpHeadersItem().withName("nopqgikyzirtx").withValue("yuxzejntpsewgi"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("ilqu").withValue("rydxtqm"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("eoxorggufhyao").withValue("tbghhavgrvkf"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("ovjzhpjbibgjmfx").withValue("mv"))) - .withPath("luyovwxnbkfezzx").withPort(357757853).withScheme(Scheme.HTTPS)) - .withInitialDelaySeconds(1673017156).withPeriodSeconds(215949715).withSuccessThreshold(1640359024) - .withTcpSocket(new ContainerAppProbeTcpSocket().withHost("bzbomvzzbtdcqvpn").withPort(1622829877)) - .withTerminationGracePeriodSeconds(2588743107415946739L).withTimeoutSeconds(277819924) - .withType(Type.STARTUP); - model = BinaryData.fromObject(model).toObject(ContainerAppProbe.class); - Assertions.assertEquals(1290029311, model.failureThreshold()); - Assertions.assertEquals("ycnunvjsrtk", model.httpGet().host()); - Assertions.assertEquals("nopqgikyzirtx", model.httpGet().httpHeaders().get(0).name()); - Assertions.assertEquals("yuxzejntpsewgi", model.httpGet().httpHeaders().get(0).value()); - Assertions.assertEquals("luyovwxnbkfezzx", model.httpGet().path()); - Assertions.assertEquals(357757853, model.httpGet().port()); - Assertions.assertEquals(Scheme.HTTPS, model.httpGet().scheme()); - Assertions.assertEquals(1673017156, model.initialDelaySeconds()); - Assertions.assertEquals(215949715, model.periodSeconds()); - Assertions.assertEquals(1640359024, model.successThreshold()); - Assertions.assertEquals("bzbomvzzbtdcqvpn", model.tcpSocket().host()); - Assertions.assertEquals(1622829877, model.tcpSocket().port()); - Assertions.assertEquals(2588743107415946739L, model.terminationGracePeriodSeconds()); - Assertions.assertEquals(277819924, 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 3bbb3e8099b1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteWithResponseMockTests.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.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("d", "kkyihzt", "eq", 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 1801b268202b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.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.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("o", "sxxh", 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 75ea345b4e86..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorWithResponseMockTests.java +++ /dev/null @@ -1,69 +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\":\"xxgfbbmtlpqagyn\",\"name\":\"prnzc\",\"description\":\"incryqxzx\",\"author\":\"zi\",\"category\":\"qimiymqr\",\"supportTopicList\":[{\"id\":\"hfupetasvvoqsbpk\",\"pesId\":\"anfkgxsyaowuzow\"},{\"id\":\"ohdkcprgukx\",\"pesId\":\"tiochlutixmqr\"}],\"analysisTypes\":[\"izcbfzmcrunfhiuc\",\"mfbcpaqktkrum\",\"u\",\"dkyzbfvxov\"],\"type\":\"xiuxqggvqrnhy\",\"score\":87.82275},\"dataset\":[{\"table\":{\"tableName\":\"ggjh\",\"columns\":[{},{},{}],\"rows\":[\"dataqrkijpeuq\",\"datasdxeqztvxwmwwmjs\",\"dataen\",\"datawwa\"]},\"renderingProperties\":{\"type\":308965260,\"title\":\"qioulndhzyoeojht\",\"description\":\"lhsvidmytzlnglxp\",\"isVisible\":true}}],\"status\":{\"message\":\"anfbc\",\"statusId\":536650888},\"dataProviderMetadata\":{\"providerName\":\"ywv\",\"propertyBag\":[{\"name\":\"vjrktpgaeukyawoh\",\"value\":\"w\"},{\"name\":\"nucsk\",\"value\":\"sidsjtd\"}]}},\"id\":\"bninjgazlsvbzfc\",\"name\":\"uoeedwjcci\",\"type\":\"lhsyekrdrenxolr\"}"; - - 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("kkld", "rcwfcmfcnrjajq", "atxjtiel", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("izcbfzmcrunfhiuc", response.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("ggjh", response.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(308965260, response.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("qioulndhzyoeojht", - response.properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("lhsvidmytzlnglxp", - response.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, response.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("anfbc", response.properties().status().message()); - Assertions.assertEquals(536650888, response.properties().status().statusId()); - Assertions.assertEquals("ywv", response.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("vjrktpgaeukyawoh", - response.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("w", 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 fc0c158dadd8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.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.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\":\"zarhzvqnsqktcmbj\",\"name\":\"zoslpkybtgl\",\"description\":\"zp\",\"author\":\"jsqjcemqbm\",\"category\":\"vqar\",\"supportTopicList\":[{\"id\":\"qreblui\",\"pesId\":\"bwxsfgtdm\"},{\"id\":\"xekr\",\"pesId\":\"k\"}],\"analysisTypes\":[\"ud\",\"twaokb\"],\"type\":\"lyttaaknwfr\",\"score\":69.09618},\"dataset\":[{\"table\":{\"tableName\":\"dujdigatoleksc\",\"columns\":[{},{},{}],\"rows\":[\"datanqimwbzxpdcldp\",\"dataawnsnlaimou\",\"dataw\",\"datasqmu\"]},\"renderingProperties\":{\"type\":2118230542,\"title\":\"ibicz\",\"description\":\"swswjrkbq\",\"isVisible\":true}},{\"table\":{\"tableName\":\"qqvyfscyrfw\",\"columns\":[{},{}],\"rows\":[\"dataogfuyzwvbhlim\",\"datayqe\",\"datar\"]},\"renderingProperties\":{\"type\":1779759130,\"title\":\"kcdrdaasaxxobsm\",\"description\":\"wiyjvzuko\",\"isVisible\":false}}],\"status\":{\"message\":\"nvzmlnkoywsx\",\"statusId\":1909708055},\"dataProviderMetadata\":{\"providerName\":\"qqax\",\"propertyBag\":[{\"name\":\"mc\",\"value\":\"dndoabhjxw\"}]}},\"id\":\"weuipmpvksmi\",\"name\":\"nsqxtltc\",\"type\":\"krdpqgfhyrfr\"}]}"; - - 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("gmihzpimcqr", - "nxtminklog", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ud", response.iterator().next().properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("dujdigatoleksc", - response.iterator().next().properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(2118230542, - response.iterator().next().properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("ibicz", - response.iterator().next().properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("swswjrkbq", - response.iterator().next().properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, - response.iterator().next().properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("nvzmlnkoywsx", response.iterator().next().properties().status().message()); - Assertions.assertEquals(1909708055, response.iterator().next().properties().status().statusId()); - Assertions.assertEquals("qqax", response.iterator().next().properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("mc", - response.iterator().next().properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("dndoabhjxw", - 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 a6042c4543bc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests.java +++ /dev/null @@ -1,65 +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-11-27T21:15:44Z\",\"runningState\":\"NotRunning\",\"runningStateDetails\":\"epdjxqeskoyn\",\"containers\":[{\"name\":\"pckaewse\",\"containerId\":\"eskwxeg\",\"ready\":false,\"started\":false,\"restartCount\":665890978,\"runningState\":\"Terminated\",\"runningStateDetails\":\"tmjtsghp\",\"logStreamEndpoint\":\"bcpzarpzeqacdldt\",\"execEndpoint\":\"pypefcpczshnuq\"},{\"name\":\"aizu\",\"containerId\":\"kh\",\"ready\":false,\"started\":true,\"restartCount\":1048467054,\"runningState\":\"Running\",\"runningStateDetails\":\"vtvegwqiukvzw\",\"logStreamEndpoint\":\"wtthaokgksk\",\"execEndpoint\":\"vb\"},{\"name\":\"hajqfuk\",\"containerId\":\"expgeumilhwu\",\"ready\":false,\"started\":true,\"restartCount\":1014412406,\"runningState\":\"Terminated\",\"runningStateDetails\":\"ofninbdbz\",\"logStreamEndpoint\":\"cw\",\"execEndpoint\":\"rsmpcbbprtuga\"}],\"initContainers\":[{\"name\":\"cyksivmfo\",\"containerId\":\"rt\",\"ready\":true,\"started\":true,\"restartCount\":1811675094,\"runningState\":\"Running\",\"runningStateDetails\":\"cwjjxsgmbawvif\",\"logStreamEndpoint\":\"kecifhocjxwklo\",\"execEndpoint\":\"rvtxvcmufunlc\"},{\"name\":\"xvi\",\"containerId\":\"eyngjg\",\"ready\":false,\"started\":false,\"restartCount\":563018487,\"runningState\":\"Running\",\"runningStateDetails\":\"pmcrdcuelj\",\"logStreamEndpoint\":\"ahxm\",\"execEndpoint\":\"ryarvsxzqb\"}]},\"id\":\"cjkay\",\"name\":\"pth\",\"type\":\"odubtlmjt\"}"; - - 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("cvumepjpbi", "nzpphepife", - "leqirccjclykcgxv", "pjlvczuoda", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("pckaewse", response.containers().get(0).name()); - Assertions.assertEquals("eskwxeg", response.containers().get(0).containerId()); - Assertions.assertEquals(false, response.containers().get(0).ready()); - Assertions.assertEquals(false, response.containers().get(0).started()); - Assertions.assertEquals(665890978, response.containers().get(0).restartCount()); - Assertions.assertEquals("cyksivmfo", response.initContainers().get(0).name()); - Assertions.assertEquals("rt", response.initContainers().get(0).containerId()); - Assertions.assertEquals(true, response.initContainers().get(0).ready()); - Assertions.assertEquals(true, response.initContainers().get(0).started()); - Assertions.assertEquals(1811675094, 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 28d4a830b230..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasWithResponseMockTests.java +++ /dev/null @@ -1,55 +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-01-16T05:14:58Z\",\"runningState\":\"Running\",\"runningStateDetails\":\"vjnzdpvocojhpcna\",\"containers\":[{}],\"initContainers\":[{},{},{},{}]},\"id\":\"ggytexvzilmhivz\",\"name\":\"wwwncknr\",\"type\":\"dajlskzpt\"},{\"properties\":{\"createdTime\":\"2021-09-18T03:15:46Z\",\"runningState\":\"NotRunning\",\"runningStateDetails\":\"cyrthxqlehm\",\"containers\":[{}],\"initContainers\":[{},{},{}]},\"id\":\"n\",\"name\":\"ehokamvfej\",\"type\":\"qnttmbq\"},{\"properties\":{\"createdTime\":\"2021-02-03T14:51:39Z\",\"runningState\":\"Unknown\",\"runningStateDetails\":\"okpysthhzagj\",\"containers\":[{},{},{}],\"initContainers\":[{},{},{}]},\"id\":\"hgenuzejgvkveb\",\"name\":\"qszllrz\",\"type\":\"smmd\"}]}"; - - 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("blioskkfmkmf", "jxyxgb", "kqvjcteoedlr", 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 382a79bd1379..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionWithResponseMockTests.java +++ /dev/null @@ -1,52 +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("htkbtnq", "rngl", "mbiipsnawwlqk", - 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 9ac9853466e6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests.java +++ /dev/null @@ -1,52 +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("nxhhl", "xricctkwmuqq", "ajxeiygle", - 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 623f6e937a24..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionWithResponseMockTests.java +++ /dev/null @@ -1,52 +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("rwvaexhdc", "rceqnkbrupob", "hdmljz", - 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 be01b831fcb9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java +++ /dev/null @@ -1,52 +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("lpfliwoyn", "uuzhw", "ladpcmhjha", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryTests.java deleted file mode 100644 index 04215d89f660..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryTests.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.ContainerRegistry; -import org.junit.jupiter.api.Assertions; - -public final class ContainerRegistryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerRegistry model - = BinaryData.fromString("{\"containerRegistryServer\":\"x\",\"identityResourceId\":\"it\"}") - .toObject(ContainerRegistry.class); - Assertions.assertEquals("x", model.containerRegistryServer()); - Assertions.assertEquals("it", model.identityResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerRegistry model = new ContainerRegistry().withContainerRegistryServer("x").withIdentityResourceId("it"); - model = BinaryData.fromObject(model).toObject(ContainerRegistry.class); - Assertions.assertEquals("x", model.containerRegistryServer()); - Assertions.assertEquals("it", model.identityResourceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryWithCustomImageTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryWithCustomImageTests.java deleted file mode 100644 index afff40faacf6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryWithCustomImageTests.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.ContainerRegistryWithCustomImage; -import org.junit.jupiter.api.Assertions; - -public final class ContainerRegistryWithCustomImageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerRegistryWithCustomImage model - = BinaryData.fromString("{\"server\":\"bpodxunkbebxm\",\"image\":\"yyntwl\"}") - .toObject(ContainerRegistryWithCustomImage.class); - Assertions.assertEquals("bpodxunkbebxm", model.server()); - Assertions.assertEquals("yyntwl", model.image()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerRegistryWithCustomImage model - = new ContainerRegistryWithCustomImage().withServer("bpodxunkbebxm").withImage("yyntwl"); - model = BinaryData.fromObject(model).toObject(ContainerRegistryWithCustomImage.class); - Assertions.assertEquals("bpodxunkbebxm", model.server()); - Assertions.assertEquals("yyntwl", model.image()); - } -} 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 650b5f062a0a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.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.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\":95.55475275329178,\"memory\":\"hcexdrrvqa\",\"ephemeralStorage\":\"kghtpwijnh\"}") - .toObject(ContainerResources.class); - Assertions.assertEquals(95.55475275329178D, model.cpu()); - Assertions.assertEquals("hcexdrrvqa", model.memory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerResources model = new ContainerResources().withCpu(95.55475275329178D).withMemory("hcexdrrvqa"); - model = BinaryData.fromObject(model).toObject(ContainerResources.class); - Assertions.assertEquals(95.55475275329178D, model.cpu()); - Assertions.assertEquals("hcexdrrvqa", 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 84c98c134e83..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.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.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\":\"IdentityProviderDerived\",\"timeToExpiration\":\"dlwtgrhpdj\"}") - .toObject(CookieExpiration.class); - Assertions.assertEquals(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, model.convention()); - Assertions.assertEquals("dlwtgrhpdj", model.timeToExpiration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CookieExpiration model = new CookieExpiration() - .withConvention(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED).withTimeToExpiration("dlwtgrhpdj"); - model = BinaryData.fromObject(model).toObject(CookieExpiration.class); - Assertions.assertEquals(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, model.convention()); - Assertions.assertEquals("dlwtgrhpdj", 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 df779637ad7d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.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.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\":\"owqkdwytisi\",\"bindingType\":\"Disabled\",\"certificateId\":\"gpikpzimejza\"}") - .toObject(CustomDomain.class); - Assertions.assertEquals("owqkdwytisi", model.name()); - Assertions.assertEquals(BindingType.DISABLED, model.bindingType()); - Assertions.assertEquals("gpikpzimejza", model.certificateId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomDomain model = new CustomDomain().withName("owqkdwytisi").withBindingType(BindingType.DISABLED) - .withCertificateId("gpikpzimejza"); - model = BinaryData.fromObject(model).toObject(CustomDomain.class); - Assertions.assertEquals("owqkdwytisi", model.name()); - Assertions.assertEquals(BindingType.DISABLED, model.bindingType()); - Assertions.assertEquals("gpikpzimejza", model.certificateId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCollectionTests.java deleted file mode 100644 index 30423923b704..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCollectionTests.java +++ /dev/null @@ -1,144 +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.DaprComponentResiliencyPolicyInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPoliciesCollection; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPoliciesCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPoliciesCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1701983547,\"retryBackOff\":{}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1998431294},\"circuitBreakerPolicy\":{\"consecutiveErrors\":672713653,\"timeoutInSeconds\":1300202975,\"intervalInSeconds\":64736512}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":499319607,\"retryBackOff\":{}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":972204015},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1265182150,\"timeoutInSeconds\":112594464,\"intervalInSeconds\":9633412}}},\"id\":\"kkhminqcymczngn\",\"name\":\"dxxewuninv\",\"type\":\"db\"},{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":709462942,\"retryBackOff\":{}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1900039321},\"circuitBreakerPolicy\":{\"consecutiveErrors\":313351461,\"timeoutInSeconds\":720636191,\"intervalInSeconds\":1857605955}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":217232947,\"retryBackOff\":{}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":485950763},\"circuitBreakerPolicy\":{\"consecutiveErrors\":334709748,\"timeoutInSeconds\":297911426,\"intervalInSeconds\":1148214254}}},\"id\":\"napxbannovv\",\"name\":\"xc\",\"type\":\"ytprwnwvroev\"},{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1307302388,\"retryBackOff\":{}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":67510907},\"circuitBreakerPolicy\":{\"consecutiveErrors\":491107905,\"timeoutInSeconds\":725083050,\"intervalInSeconds\":1312539760}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":810647712,\"retryBackOff\":{}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1031456845},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1458275962,\"timeoutInSeconds\":952405971,\"intervalInSeconds\":1220621790}}},\"id\":\"d\",\"name\":\"nazpmk\",\"type\":\"lmv\"},{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":343155487,\"retryBackOff\":{}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1939182119},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1553253878,\"timeoutInSeconds\":1749137224,\"intervalInSeconds\":1704256415}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":632448787,\"retryBackOff\":{}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1848154538},\"circuitBreakerPolicy\":{\"consecutiveErrors\":530417864,\"timeoutInSeconds\":540353819,\"intervalInSeconds\":796010051}}},\"id\":\"zqcyknap\",\"name\":\"ofyuicd\",\"type\":\"zb\"}],\"nextLink\":\"bwwg\"}") - .toObject(DaprComponentResiliencyPoliciesCollection.class); - Assertions.assertEquals(1701983547, model.value().get(0).inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1998431294, - model.value().get(0).inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(672713653, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1300202975, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(64736512, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(499319607, model.value().get(0).outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(972204015, - model.value().get(0).outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1265182150, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(112594464, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(9633412, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPoliciesCollection model - = new DaprComponentResiliencyPoliciesCollection().withValue(Arrays.asList( - new DaprComponentResiliencyPolicyInner() - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1701983547) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration())) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1998431294)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(672713653).withTimeoutInSeconds(1300202975) - .withIntervalInSeconds(64736512))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(499319607) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration())) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(972204015)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(1265182150).withTimeoutInSeconds(112594464) - .withIntervalInSeconds(9633412))), - new DaprComponentResiliencyPolicyInner() - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(709462942) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration())) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1900039321)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(313351461).withTimeoutInSeconds(720636191) - .withIntervalInSeconds(1857605955))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(217232947) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration())) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(485950763)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(334709748).withTimeoutInSeconds(297911426) - .withIntervalInSeconds(1148214254))), - new DaprComponentResiliencyPolicyInner() - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1307302388) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration())) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(67510907)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(491107905).withTimeoutInSeconds(725083050) - .withIntervalInSeconds(1312539760))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(810647712) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration())) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1031456845)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(1458275962).withTimeoutInSeconds(952405971) - .withIntervalInSeconds(1220621790))), - new DaprComponentResiliencyPolicyInner() - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(343155487) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration())) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1939182119)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(1553253878).withTimeoutInSeconds(1749137224) - .withIntervalInSeconds(1704256415))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(632448787) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration())) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1848154538)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(530417864).withTimeoutInSeconds(540353819) - .withIntervalInSeconds(796010051))))); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPoliciesCollection.class); - Assertions.assertEquals(1701983547, model.value().get(0).inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1998431294, - model.value().get(0).inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(672713653, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1300202975, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(64736512, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(499319607, model.value().get(0).outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(972204015, - model.value().get(0).outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1265182150, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(112594464, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(9633412, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 4fefee0af707..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,97 +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.DaprComponentResiliencyPolicy; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -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 DaprComponentResiliencyPoliciesCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":2061685284,\"retryBackOff\":{\"initialDelayInMilliseconds\":76340315,\"maxIntervalInMilliseconds\":1313860717}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1186020907},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1701022036,\"timeoutInSeconds\":2062030350,\"intervalInSeconds\":700693046}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":562282561,\"retryBackOff\":{\"initialDelayInMilliseconds\":644167930,\"maxIntervalInMilliseconds\":1581599883}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":285262475},\"circuitBreakerPolicy\":{\"consecutiveErrors\":620670470,\"timeoutInSeconds\":1906572737,\"intervalInSeconds\":445835887}}},\"id\":\"jod\",\"name\":\"cbjqqwmtqsm\",\"type\":\"xsazuxejgw\"}"; - - 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)); - - DaprComponentResiliencyPolicy response = manager.daprComponentResiliencyPolicies().define("vctkbbx") - .withExistingDaprComponent("wetjtdrhutf", "oadtxopgehpadkmd", "gssz") - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(989359747) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(1895023582).withMaxIntervalInMilliseconds(1275197408))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1486832256)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(18849329).withTimeoutInSeconds(946198346).withIntervalInSeconds(758730321))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(380797824) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(187800600).withMaxIntervalInMilliseconds(1759604216))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1843031385)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(221407560).withTimeoutInSeconds(2145155757).withIntervalInSeconds(20348867))) - .create(); - - Assertions.assertEquals(2061685284, response.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(76340315, - response.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1313860717, - response.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1186020907, response.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1701022036, response.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(2062030350, response.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(700693046, response.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(562282561, response.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(644167930, - response.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1581599883, - response.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(285262475, response.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(620670470, response.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1906572737, response.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(445835887, response.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteWithResponseMockTests.java deleted file mode 100644 index ac65275659d9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,52 +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 DaprComponentResiliencyPoliciesDeleteWithResponseMockTests { - @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.daprComponentResiliencyPolicies().deleteWithResponse("itbfjtdy", "tnp", "facqo", "cqrq", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetWithResponseMockTests.java deleted file mode 100644 index 16792a762d38..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetWithResponseMockTests.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.DaprComponentResiliencyPolicy; -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 DaprComponentResiliencyPoliciesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":2069524060,\"retryBackOff\":{\"initialDelayInMilliseconds\":104080595,\"maxIntervalInMilliseconds\":336537069}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":52257926},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1868056089,\"timeoutInSeconds\":702156768,\"intervalInSeconds\":1966996701}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1592793613,\"retryBackOff\":{\"initialDelayInMilliseconds\":964008937,\"maxIntervalInMilliseconds\":1025699882}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":190570552},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1736402043,\"timeoutInSeconds\":1964383171,\"intervalInSeconds\":822001690}}},\"id\":\"proqk\",\"name\":\"mfxm\",\"type\":\"vprstv\"}"; - - 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)); - - DaprComponentResiliencyPolicy response - = manager.daprComponentResiliencyPolicies().getWithResponse("ajpxecxqnwhscoza", "mvgxsmpknpwir", "ljfewxqo", - "oxudnmckap", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals(2069524060, response.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(104080595, - response.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(336537069, - response.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(52257926, response.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1868056089, response.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(702156768, response.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1966996701, response.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(1592793613, response.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(964008937, - response.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1025699882, - response.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(190570552, response.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1736402043, response.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1964383171, response.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(822001690, response.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListMockTests.java deleted file mode 100644 index 762bc4efbb24..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListMockTests.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.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.DaprComponentResiliencyPolicy; -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 DaprComponentResiliencyPoliciesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":741089432,\"retryBackOff\":{\"initialDelayInMilliseconds\":1379724649,\"maxIntervalInMilliseconds\":433842501}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":2087912773},\"circuitBreakerPolicy\":{\"consecutiveErrors\":206815663,\"timeoutInSeconds\":495264872,\"intervalInSeconds\":910596652}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":529500532,\"retryBackOff\":{\"initialDelayInMilliseconds\":330883602,\"maxIntervalInMilliseconds\":1649946980}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":2137785308},\"circuitBreakerPolicy\":{\"consecutiveErrors\":550103154,\"timeoutInSeconds\":1960286905,\"intervalInSeconds\":781281199}}},\"id\":\"naoaqymhccto\",\"name\":\"uowyrnskbyhqu\",\"type\":\"czygxv\"}]}"; - - 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.daprComponentResiliencyPolicies() - .list("qdnzyza", "atuwqkokbc", "othymgobl", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(741089432, response.iterator().next().inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1379724649, - response.iterator().next().inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(433842501, - response.iterator().next().inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(2087912773, - response.iterator().next().inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(206815663, - response.iterator().next().inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(495264872, - response.iterator().next().inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(910596652, - response.iterator().next().inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(529500532, response.iterator().next().outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(330883602, - response.iterator().next().outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1649946980, - response.iterator().next().outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(2137785308, - response.iterator().next().outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(550103154, - response.iterator().next().outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1960286905, - response.iterator().next().outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(781281199, - response.iterator().next().outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfigurationTests.java deleted file mode 100644 index 86047c5217ae..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfigurationTests.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.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyCircuitBreakerPolicyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration model = BinaryData - .fromString( - "{\"consecutiveErrors\":1053497499,\"timeoutInSeconds\":729007822,\"intervalInSeconds\":367318900}") - .toObject(DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.class); - Assertions.assertEquals(1053497499, model.consecutiveErrors()); - Assertions.assertEquals(729007822, model.timeoutInSeconds()); - Assertions.assertEquals(367318900, model.intervalInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration model - = new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(1053497499) - .withTimeoutInSeconds(729007822).withIntervalInSeconds(367318900); - model = BinaryData.fromObject(model) - .toObject(DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.class); - Assertions.assertEquals(1053497499, model.consecutiveErrors()); - Assertions.assertEquals(729007822, model.timeoutInSeconds()); - Assertions.assertEquals(367318900, model.intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyConfigurationTests.java deleted file mode 100644 index 6e0eae0eb525..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyConfigurationTests.java +++ /dev/null @@ -1,50 +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.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyConfiguration model = BinaryData.fromString( - "{\"httpRetryPolicy\":{\"maxRetries\":36314711,\"retryBackOff\":{\"initialDelayInMilliseconds\":715935859,\"maxIntervalInMilliseconds\":2047901283}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1840957180},\"circuitBreakerPolicy\":{\"consecutiveErrors\":304822445,\"timeoutInSeconds\":1524765987,\"intervalInSeconds\":1267462998}}") - .toObject(DaprComponentResiliencyPolicyConfiguration.class); - Assertions.assertEquals(36314711, model.httpRetryPolicy().maxRetries()); - Assertions.assertEquals(715935859, model.httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(2047901283, model.httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1840957180, model.timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(304822445, model.circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1524765987, model.circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1267462998, model.circuitBreakerPolicy().intervalInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyConfiguration model = new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(36314711) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(715935859).withMaxIntervalInMilliseconds(2047901283))) - .withTimeoutPolicy( - new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(1840957180)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(304822445).withTimeoutInSeconds(1524765987).withIntervalInSeconds(1267462998)); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyConfiguration.class); - Assertions.assertEquals(36314711, model.httpRetryPolicy().maxRetries()); - Assertions.assertEquals(715935859, model.httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(2047901283, model.httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1840957180, model.timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(304822445, model.circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1524765987, model.circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1267462998, model.circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryBackOffConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryBackOffConfigurationTests.java deleted file mode 100644 index 8febc17720aa..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryBackOffConfigurationTests.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.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyHttpRetryBackOffConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration model = BinaryData - .fromString("{\"initialDelayInMilliseconds\":1297889112,\"maxIntervalInMilliseconds\":1150159087}") - .toObject(DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.class); - Assertions.assertEquals(1297889112, model.initialDelayInMilliseconds()); - Assertions.assertEquals(1150159087, model.maxIntervalInMilliseconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration model - = new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(1297889112).withMaxIntervalInMilliseconds(1150159087); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.class); - Assertions.assertEquals(1297889112, model.initialDelayInMilliseconds()); - Assertions.assertEquals(1150159087, model.maxIntervalInMilliseconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryPolicyConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryPolicyConfigurationTests.java deleted file mode 100644 index 0c2cdc232246..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryPolicyConfigurationTests.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.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyHttpRetryPolicyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration model = BinaryData.fromString( - "{\"maxRetries\":1923932304,\"retryBackOff\":{\"initialDelayInMilliseconds\":366697291,\"maxIntervalInMilliseconds\":1294543038}}") - .toObject(DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.class); - Assertions.assertEquals(1923932304, model.maxRetries()); - Assertions.assertEquals(366697291, model.retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1294543038, model.retryBackOff().maxIntervalInMilliseconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration model - = new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1923932304) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(366697291).withMaxIntervalInMilliseconds(1294543038)); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.class); - Assertions.assertEquals(1923932304, model.maxRetries()); - Assertions.assertEquals(366697291, model.retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1294543038, model.retryBackOff().maxIntervalInMilliseconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyInnerTests.java deleted file mode 100644 index 5a1d972a017f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyInnerTests.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.DaprComponentResiliencyPolicyInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyInner model = BinaryData.fromString( - "{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1801029414,\"retryBackOff\":{\"initialDelayInMilliseconds\":728731016,\"maxIntervalInMilliseconds\":1056355405}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":2137652282},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1436158527,\"timeoutInSeconds\":1159295504,\"intervalInSeconds\":881600617}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":2065822308,\"retryBackOff\":{\"initialDelayInMilliseconds\":643996998,\"maxIntervalInMilliseconds\":1253377600}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":798651388},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1601507048,\"timeoutInSeconds\":64161749,\"intervalInSeconds\":919572814}}},\"id\":\"immoiroqboshbrag\",\"name\":\"pyyrmfs\",\"type\":\"bpav\"}") - .toObject(DaprComponentResiliencyPolicyInner.class); - Assertions.assertEquals(1801029414, model.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(728731016, - model.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1056355405, - model.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(2137652282, model.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1436158527, model.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1159295504, model.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(881600617, model.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(2065822308, model.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(643996998, - model.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1253377600, - model.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(798651388, model.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1601507048, model.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(64161749, model.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(919572814, model.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyInner model = new DaprComponentResiliencyPolicyInner() - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1801029414) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(728731016).withMaxIntervalInMilliseconds(1056355405))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(2137652282)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(1436158527).withTimeoutInSeconds(1159295504) - .withIntervalInSeconds(881600617))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(2065822308) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(643996998).withMaxIntervalInMilliseconds(1253377600))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(798651388)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(1601507048).withTimeoutInSeconds(64161749) - .withIntervalInSeconds(919572814))); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyInner.class); - Assertions.assertEquals(1801029414, model.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(728731016, - model.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1056355405, - model.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(2137652282, model.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1436158527, model.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1159295504, model.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(881600617, model.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(2065822308, model.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(643996998, - model.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1253377600, - model.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(798651388, model.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1601507048, model.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(64161749, model.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(919572814, model.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyPropertiesTests.java deleted file mode 100644 index e6b3dbf066a8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyPropertiesTests.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.DaprComponentResiliencyPolicyProperties; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyProperties model = BinaryData.fromString( - "{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1818158355,\"retryBackOff\":{\"initialDelayInMilliseconds\":1487017150,\"maxIntervalInMilliseconds\":267572624}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1237918766},\"circuitBreakerPolicy\":{\"consecutiveErrors\":745209495,\"timeoutInSeconds\":353739432,\"intervalInSeconds\":1569477780}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1931546764,\"retryBackOff\":{\"initialDelayInMilliseconds\":1973714604,\"maxIntervalInMilliseconds\":1422758538}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1903849017},\"circuitBreakerPolicy\":{\"consecutiveErrors\":344097144,\"timeoutInSeconds\":1836074224,\"intervalInSeconds\":913638656}}}") - .toObject(DaprComponentResiliencyPolicyProperties.class); - Assertions.assertEquals(1818158355, model.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1487017150, - model.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(267572624, - model.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1237918766, model.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(745209495, model.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(353739432, model.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1569477780, model.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(1931546764, model.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1973714604, - model.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1422758538, - model.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1903849017, model.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(344097144, model.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1836074224, model.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(913638656, model.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyProperties model = new DaprComponentResiliencyPolicyProperties() - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1818158355) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(1487017150).withMaxIntervalInMilliseconds(267572624))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1237918766)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(745209495).withTimeoutInSeconds(353739432) - .withIntervalInSeconds(1569477780))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1931546764) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(1973714604).withMaxIntervalInMilliseconds(1422758538))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1903849017)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(344097144).withTimeoutInSeconds(1836074224) - .withIntervalInSeconds(913638656))); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyProperties.class); - Assertions.assertEquals(1818158355, model.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1487017150, - model.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(267572624, - model.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1237918766, model.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(745209495, model.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(353739432, model.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1569477780, model.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(1931546764, model.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1973714604, - model.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1422758538, - model.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1903849017, model.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(344097144, model.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1836074224, model.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(913638656, model.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyTimeoutPolicyConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyTimeoutPolicyConfigurationTests.java deleted file mode 100644 index d5c553bd706e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyTimeoutPolicyConfigurationTests.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.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyTimeoutPolicyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyTimeoutPolicyConfiguration model - = BinaryData.fromString("{\"responseTimeoutInSeconds\":417226641}") - .toObject(DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.class); - Assertions.assertEquals(417226641, model.responseTimeoutInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyTimeoutPolicyConfiguration model - = new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(417226641); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.class); - Assertions.assertEquals(417226641, model.responseTimeoutInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentServiceBindingTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentServiceBindingTests.java deleted file mode 100644 index 493189dba9d6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentServiceBindingTests.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.DaprComponentServiceBinding; -import com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentServiceBindingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentServiceBinding model = BinaryData.fromString( - "{\"name\":\"owpulpq\",\"serviceId\":\"ylsyxkqjnsje\",\"metadata\":{\"name\":\"iagxsdszuempsbz\",\"value\":\"z\"}}") - .toObject(DaprComponentServiceBinding.class); - Assertions.assertEquals("owpulpq", model.name()); - Assertions.assertEquals("ylsyxkqjnsje", model.serviceId()); - Assertions.assertEquals("iagxsdszuempsbz", model.metadata().name()); - Assertions.assertEquals("z", model.metadata().value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentServiceBinding model - = new DaprComponentServiceBinding().withName("owpulpq").withServiceId("ylsyxkqjnsje") - .withMetadata(new DaprServiceBindMetadata().withName("iagxsdszuempsbz").withValue("z")); - model = BinaryData.fromObject(model).toObject(DaprComponentServiceBinding.class); - Assertions.assertEquals("owpulpq", model.name()); - Assertions.assertEquals("ylsyxkqjnsje", model.serviceId()); - Assertions.assertEquals("iagxsdszuempsbz", model.metadata().name()); - Assertions.assertEquals("z", model.metadata().value()); - } -} 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 1e715b47922f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,52 +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("abalfdxaglz", "ytlbtlqhopxouvm", "siflikyypzkgxf", - 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 61dcbf5a6ff1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsWithResponseMockTests.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.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\":\"h\",\"value\":\"pter\"}]}"; - - 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("fmy", "qsdb", "oksz", 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 342b528c00a3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprConfigurationTests.java +++ /dev/null @@ -1,21 +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\":\"jed\"}").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 2b872446772d..000000000000 --- 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\":\"bqwcsdbnwdcf\",\"value\":\"cqdpfuv\"}").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 c4dcd23aa143..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.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.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\":\"lw\",\"value\":\"ztzp\"},{\"name\":\"ncckw\",\"value\":\"zqwhxxbuyqaxzfeq\"},{\"name\":\"ppriol\",\"value\":\"rjaltolmncw\"}]}") - .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/DaprServiceBindMetadataTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprServiceBindMetadataTests.java deleted file mode 100644 index 6a5ef8046091..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprServiceBindMetadataTests.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.DaprServiceBindMetadata; -import org.junit.jupiter.api.Assertions; - -public final class DaprServiceBindMetadataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprServiceBindMetadata model = BinaryData.fromString("{\"name\":\"yvpnqicvinvkjj\",\"value\":\"xrbuukzclew\"}") - .toObject(DaprServiceBindMetadata.class); - Assertions.assertEquals("yvpnqicvinvkjj", model.name()); - Assertions.assertEquals("xrbuukzclew", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprServiceBindMetadata model - = new DaprServiceBindMetadata().withName("yvpnqicvinvkjj").withValue("xrbuukzclew"); - model = BinaryData.fromObject(model).toObject(DaprServiceBindMetadata.class); - Assertions.assertEquals("yvpnqicvinvkjj", model.name()); - Assertions.assertEquals("xrbuukzclew", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionBulkSubscribeOptionsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionBulkSubscribeOptionsTests.java deleted file mode 100644 index 9b28d6282e10..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionBulkSubscribeOptionsTests.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.DaprSubscriptionBulkSubscribeOptions; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionBulkSubscribeOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionBulkSubscribeOptions model = BinaryData - .fromString("{\"enabled\":false,\"maxMessagesCount\":2076319922,\"maxAwaitDurationMs\":1797276638}") - .toObject(DaprSubscriptionBulkSubscribeOptions.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals(2076319922, model.maxMessagesCount()); - Assertions.assertEquals(1797276638, model.maxAwaitDurationMs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionBulkSubscribeOptions model = new DaprSubscriptionBulkSubscribeOptions().withEnabled(false) - .withMaxMessagesCount(2076319922).withMaxAwaitDurationMs(1797276638); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionBulkSubscribeOptions.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals(2076319922, model.maxMessagesCount()); - Assertions.assertEquals(1797276638, model.maxAwaitDurationMs()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionInnerTests.java deleted file mode 100644 index 9fc23bde2ddc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionInnerTests.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.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionInner model = BinaryData.fromString( - "{\"properties\":{\"pubsubName\":\"zvlnsnnjz\",\"topic\":\"afolpymwamxqzrag\",\"deadLetterTopic\":\"dphtv\",\"routes\":{\"rules\":[{\"match\":\"vl\",\"path\":\"c\"}],\"default\":\"srlzknmzlan\"},\"scopes\":[\"dwv\",\"phcnzqtpj\",\"mqrhvthl\"],\"metadata\":{\"hzdtxetlgydlh\":\"dcxsmlz\",\"b\":\"vlnnpx\",\"gjekglklby\":\"fiqgeaar\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":2131258889,\"maxAwaitDurationMs\":1571149104}},\"id\":\"zegjonfhjirwgdn\",\"name\":\"z\",\"type\":\"rfkspzhz\"}") - .toObject(DaprSubscriptionInner.class); - Assertions.assertEquals("zvlnsnnjz", model.pubsubName()); - Assertions.assertEquals("afolpymwamxqzrag", model.topic()); - Assertions.assertEquals("dphtv", model.deadLetterTopic()); - Assertions.assertEquals("vl", model.routes().rules().get(0).match()); - Assertions.assertEquals("c", model.routes().rules().get(0).path()); - Assertions.assertEquals("srlzknmzlan", model.routes().defaultProperty()); - Assertions.assertEquals("dwv", model.scopes().get(0)); - Assertions.assertEquals("dcxsmlz", model.metadata().get("hzdtxetlgydlh")); - Assertions.assertEquals(false, model.bulkSubscribe().enabled()); - Assertions.assertEquals(2131258889, model.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(1571149104, model.bulkSubscribe().maxAwaitDurationMs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionInner model = new DaprSubscriptionInner().withPubsubName("zvlnsnnjz") - .withTopic("afolpymwamxqzrag").withDeadLetterTopic("dphtv") - .withRoutes(new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule().withMatch("vl").withPath("c"))) - .withDefaultProperty("srlzknmzlan")) - .withScopes(Arrays.asList("dwv", "phcnzqtpj", "mqrhvthl")) - .withMetadata(mapOf("hzdtxetlgydlh", "dcxsmlz", "b", "vlnnpx", "gjekglklby", "fiqgeaar")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(false) - .withMaxMessagesCount(2131258889).withMaxAwaitDurationMs(1571149104)); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionInner.class); - Assertions.assertEquals("zvlnsnnjz", model.pubsubName()); - Assertions.assertEquals("afolpymwamxqzrag", model.topic()); - Assertions.assertEquals("dphtv", model.deadLetterTopic()); - Assertions.assertEquals("vl", model.routes().rules().get(0).match()); - Assertions.assertEquals("c", model.routes().rules().get(0).path()); - Assertions.assertEquals("srlzknmzlan", model.routes().defaultProperty()); - Assertions.assertEquals("dwv", model.scopes().get(0)); - Assertions.assertEquals("dcxsmlz", model.metadata().get("hzdtxetlgydlh")); - Assertions.assertEquals(false, model.bulkSubscribe().enabled()); - Assertions.assertEquals(2131258889, model.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(1571149104, model.bulkSubscribe().maxAwaitDurationMs()); - } - - // 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/DaprSubscriptionPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionPropertiesTests.java deleted file mode 100644 index b6c8a1b4883e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionPropertiesTests.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.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionProperties; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionProperties model = BinaryData.fromString( - "{\"pubsubName\":\"ksjcitdigs\",\"topic\":\"dglj\",\"deadLetterTopic\":\"keuachtomf\",\"routes\":{\"rules\":[{\"match\":\"wfpfmdgycx\",\"path\":\"skw\"},{\"match\":\"jjyslurlps\",\"path\":\"kvp\"},{\"match\":\"wqslsrhmpqvw\",\"path\":\"kondcb\"},{\"match\":\"imuvqejosovyrrl\",\"path\":\"esi\"}],\"default\":\"qtljqobbpihehc\"},\"scopes\":[\"bmrqbrjbbmp\",\"dlvykfrex\",\"rseqwjksghudgz\"],\"metadata\":{\"u\":\"gjggsv\",\"kmdyomkxfbvfbh\":\"kxibdafh\",\"rhpw\":\"y\",\"o\":\"gddeimaw\"},\"bulkSubscribe\":{\"enabled\":true,\"maxMessagesCount\":1582308433,\"maxAwaitDurationMs\":166613008}}") - .toObject(DaprSubscriptionProperties.class); - Assertions.assertEquals("ksjcitdigs", model.pubsubName()); - Assertions.assertEquals("dglj", model.topic()); - Assertions.assertEquals("keuachtomf", model.deadLetterTopic()); - Assertions.assertEquals("wfpfmdgycx", model.routes().rules().get(0).match()); - Assertions.assertEquals("skw", model.routes().rules().get(0).path()); - Assertions.assertEquals("qtljqobbpihehc", model.routes().defaultProperty()); - Assertions.assertEquals("bmrqbrjbbmp", model.scopes().get(0)); - Assertions.assertEquals("gjggsv", model.metadata().get("u")); - Assertions.assertEquals(true, model.bulkSubscribe().enabled()); - Assertions.assertEquals(1582308433, model.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(166613008, model.bulkSubscribe().maxAwaitDurationMs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionProperties model = new DaprSubscriptionProperties().withPubsubName("ksjcitdigs") - .withTopic("dglj").withDeadLetterTopic("keuachtomf") - .withRoutes(new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule().withMatch("wfpfmdgycx").withPath("skw"), - new DaprSubscriptionRouteRule().withMatch("jjyslurlps").withPath("kvp"), - new DaprSubscriptionRouteRule().withMatch("wqslsrhmpqvw").withPath("kondcb"), - new DaprSubscriptionRouteRule().withMatch("imuvqejosovyrrl").withPath("esi"))) - .withDefaultProperty("qtljqobbpihehc")) - .withScopes(Arrays.asList("bmrqbrjbbmp", "dlvykfrex", "rseqwjksghudgz")) - .withMetadata(mapOf("u", "gjggsv", "kmdyomkxfbvfbh", "kxibdafh", "rhpw", "y", "o", "gddeimaw")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(true) - .withMaxMessagesCount(1582308433).withMaxAwaitDurationMs(166613008)); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionProperties.class); - Assertions.assertEquals("ksjcitdigs", model.pubsubName()); - Assertions.assertEquals("dglj", model.topic()); - Assertions.assertEquals("keuachtomf", model.deadLetterTopic()); - Assertions.assertEquals("wfpfmdgycx", model.routes().rules().get(0).match()); - Assertions.assertEquals("skw", model.routes().rules().get(0).path()); - Assertions.assertEquals("qtljqobbpihehc", model.routes().defaultProperty()); - Assertions.assertEquals("bmrqbrjbbmp", model.scopes().get(0)); - Assertions.assertEquals("gjggsv", model.metadata().get("u")); - Assertions.assertEquals(true, model.bulkSubscribe().enabled()); - Assertions.assertEquals(1582308433, model.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(166613008, model.bulkSubscribe().maxAwaitDurationMs()); - } - - // 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/DaprSubscriptionRouteRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRouteRuleTests.java deleted file mode 100644 index af04eb16faf5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRouteRuleTests.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.DaprSubscriptionRouteRule; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionRouteRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionRouteRule model = BinaryData.fromString("{\"match\":\"n\",\"path\":\"aoyankcoeqswa\"}") - .toObject(DaprSubscriptionRouteRule.class); - Assertions.assertEquals("n", model.match()); - Assertions.assertEquals("aoyankcoeqswa", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionRouteRule model = new DaprSubscriptionRouteRule().withMatch("n").withPath("aoyankcoeqswa"); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionRouteRule.class); - Assertions.assertEquals("n", model.match()); - Assertions.assertEquals("aoyankcoeqswa", model.path()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRoutesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRoutesTests.java deleted file mode 100644 index 3bedba6279c6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRoutesTests.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.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionRoutesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionRoutes model = BinaryData.fromString( - "{\"rules\":[{\"match\":\"jcazt\",\"path\":\"snsqowxwcoml\"},{\"match\":\"ytwvczcswkacve\",\"path\":\"fdv\"}],\"default\":\"hbwrnfxtgddpqth\"}") - .toObject(DaprSubscriptionRoutes.class); - Assertions.assertEquals("jcazt", model.rules().get(0).match()); - Assertions.assertEquals("snsqowxwcoml", model.rules().get(0).path()); - Assertions.assertEquals("hbwrnfxtgddpqth", model.defaultProperty()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionRoutes model = new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule().withMatch("jcazt").withPath("snsqowxwcoml"), - new DaprSubscriptionRouteRule().withMatch("ytwvczcswkacve").withPath("fdv"))) - .withDefaultProperty("hbwrnfxtgddpqth"); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionRoutes.class); - Assertions.assertEquals("jcazt", model.rules().get(0).match()); - Assertions.assertEquals("snsqowxwcoml", model.rules().get(0).path()); - Assertions.assertEquals("hbwrnfxtgddpqth", model.defaultProperty()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCollectionTests.java deleted file mode 100644 index 42ef1ef68013..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCollectionTests.java +++ /dev/null @@ -1,107 +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.DaprSubscriptionInner; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionsCollection; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionsCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionsCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"pubsubName\":\"rmoucsofl\",\"topic\":\"uviyfcaabeo\",\"deadLetterTopic\":\"bh\",\"routes\":{\"rules\":[{}],\"default\":\"uqibsxtkcu\"},\"scopes\":[\"sfar\"],\"metadata\":{\"gf\":\"owlkjxnqpv\"},\"bulkSubscribe\":{\"enabled\":true,\"maxMessagesCount\":889840232,\"maxAwaitDurationMs\":1864942425}},\"id\":\"mdksaoa\",\"name\":\"cluqvo\",\"type\":\"mycjimryvwgcwwp\"},{\"properties\":{\"pubsubName\":\"gwe\",\"topic\":\"dsxwefoh\",\"deadLetterTopic\":\"bvopwndyqle\",\"routes\":{\"rules\":[{},{},{}],\"default\":\"mtkhlowkxxpvbr\"},\"scopes\":[\"mzsyzfhotl\",\"ikcyyc\"],\"metadata\":{\"uic\":\"sjlpjrtwszhv\",\"ubhvj\":\"hvtrrmhwrbfdpyf\",\"memhooclutnpq\":\"lrocuyzlwh\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":339637531,\"maxAwaitDurationMs\":1132519096}},\"id\":\"ykyujxsg\",\"name\":\"hsrrryejylmbkz\",\"type\":\"dnigrfihot\"},{\"properties\":{\"pubsubName\":\"lpxuzzjgnrefq\",\"topic\":\"qotoihiqakydiwfb\",\"deadLetterTopic\":\"wpzdqtvhcspo\",\"routes\":{\"rules\":[{},{},{}],\"default\":\"sipi\"},\"scopes\":[\"bebjfu\",\"bmoichd\"],\"metadata\":{\"iqsowsaaelc\":\"fpubntnbatz\",\"mjvlgfgg\":\"ttcjuhplrvkmjc\",\"sfuztlvtmv\":\"vkyylizrzbjpsf\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":891535208,\"maxAwaitDurationMs\":563395516}},\"id\":\"hukoveofizrv\",\"name\":\"f\",\"type\":\"mjm\"},{\"properties\":{\"pubsubName\":\"yzgib\",\"topic\":\"ujr\",\"deadLetterTopic\":\"fojuidjpuuyj\",\"routes\":{\"rules\":[{},{},{},{}],\"default\":\"kzoeovvtzejetj\"},\"scopes\":[\"tikyj\"],\"metadata\":{\"rhtgvgzpcrrkol\":\"dbqzolxrzvhqjw\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":817860491,\"maxAwaitDurationMs\":660756224}},\"id\":\"okcdxfzzzwyjaf\",\"name\":\"tlhguynuchl\",\"type\":\"mltx\"}],\"nextLink\":\"hmoz\"}") - .toObject(DaprSubscriptionsCollection.class); - Assertions.assertEquals("rmoucsofl", model.value().get(0).pubsubName()); - Assertions.assertEquals("uviyfcaabeo", model.value().get(0).topic()); - Assertions.assertEquals("bh", model.value().get(0).deadLetterTopic()); - Assertions.assertEquals("uqibsxtkcu", model.value().get(0).routes().defaultProperty()); - Assertions.assertEquals("sfar", model.value().get(0).scopes().get(0)); - Assertions.assertEquals("owlkjxnqpv", model.value().get(0).metadata().get("gf")); - Assertions.assertEquals(true, model.value().get(0).bulkSubscribe().enabled()); - Assertions.assertEquals(889840232, model.value().get(0).bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(1864942425, model.value().get(0).bulkSubscribe().maxAwaitDurationMs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionsCollection model - = new DaprSubscriptionsCollection() - .withValue(Arrays.asList( - new DaprSubscriptionInner().withPubsubName("rmoucsofl").withTopic("uviyfcaabeo") - .withDeadLetterTopic("bh") - .withRoutes( - new DaprSubscriptionRoutes().withRules(Arrays.asList(new DaprSubscriptionRouteRule())) - .withDefaultProperty("uqibsxtkcu")) - .withScopes(Arrays.asList("sfar")).withMetadata( - mapOf("gf", "owlkjxnqpv")) - .withBulkSubscribe( - new DaprSubscriptionBulkSubscribeOptions().withEnabled(true).withMaxMessagesCount(889840232) - .withMaxAwaitDurationMs(1864942425)), - new DaprSubscriptionInner().withPubsubName("gwe").withTopic("dsxwefoh") - .withDeadLetterTopic("bvopwndyqle") - .withRoutes( - new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule(), - new DaprSubscriptionRouteRule(), new DaprSubscriptionRouteRule())) - .withDefaultProperty("mtkhlowkxxpvbr")) - .withScopes(Arrays.asList("mzsyzfhotl", "ikcyyc")) - .withMetadata( - mapOf("uic", "sjlpjrtwszhv", "ubhvj", "hvtrrmhwrbfdpyf", "memhooclutnpq", "lrocuyzlwh")) - .withBulkSubscribe( - new DaprSubscriptionBulkSubscribeOptions().withEnabled(false).withMaxMessagesCount( - 339637531).withMaxAwaitDurationMs(1132519096)), - new DaprSubscriptionInner().withPubsubName("lpxuzzjgnrefq").withTopic("qotoihiqakydiwfb") - .withDeadLetterTopic("wpzdqtvhcspo") - .withRoutes( - new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule(), - new DaprSubscriptionRouteRule(), new DaprSubscriptionRouteRule())) - .withDefaultProperty("sipi")) - .withScopes(Arrays.asList("bebjfu", "bmoichd")) - .withMetadata(mapOf("iqsowsaaelc", "fpubntnbatz", "mjvlgfgg", "ttcjuhplrvkmjc", "sfuztlvtmv", - "vkyylizrzbjpsf")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(false) - .withMaxMessagesCount(891535208).withMaxAwaitDurationMs(563395516)), - new DaprSubscriptionInner().withPubsubName("yzgib").withTopic("ujr") - .withDeadLetterTopic("fojuidjpuuyj") - .withRoutes(new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule(), new DaprSubscriptionRouteRule(), - new DaprSubscriptionRouteRule(), new DaprSubscriptionRouteRule())) - .withDefaultProperty("kzoeovvtzejetj")) - .withScopes(Arrays.asList("tikyj")).withMetadata(mapOf("rhtgvgzpcrrkol", "dbqzolxrzvhqjw")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(false) - .withMaxMessagesCount(817860491).withMaxAwaitDurationMs(660756224)))); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionsCollection.class); - Assertions.assertEquals("rmoucsofl", model.value().get(0).pubsubName()); - Assertions.assertEquals("uviyfcaabeo", model.value().get(0).topic()); - Assertions.assertEquals("bh", model.value().get(0).deadLetterTopic()); - Assertions.assertEquals("uqibsxtkcu", model.value().get(0).routes().defaultProperty()); - Assertions.assertEquals("sfar", model.value().get(0).scopes().get(0)); - Assertions.assertEquals("owlkjxnqpv", model.value().get(0).metadata().get("gf")); - Assertions.assertEquals(true, model.value().get(0).bulkSubscribe().enabled()); - Assertions.assertEquals(889840232, model.value().get(0).bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(1864942425, model.value().get(0).bulkSubscribe().maxAwaitDurationMs()); - } - - // 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/DaprSubscriptionsCreateOrUpdateWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 6c1b443c66f2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,94 +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.DaprSubscription; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DaprSubscriptionsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"pubsubName\":\"jiotif\",\"topic\":\"bcngkegxc\",\"deadLetterTopic\":\"xbbfetwil\",\"routes\":{\"rules\":[{\"match\":\"pdxqlfrolqownkiu\",\"path\":\"ewnahwkxjjmzt\"},{\"match\":\"mso\",\"path\":\"tmvecdhdyswcrptv\"}],\"default\":\"jczxvlgsrg\"},\"scopes\":[\"izrpywlptyuqhrl\",\"cs\",\"ykpfu\",\"fixcnpcfykkpy\"],\"metadata\":{\"wrpcfpcfjfwzlgza\":\"awmpjprd\",\"amnni\":\"kgyepe\",\"z\":\"mdiawpzx\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":335893529,\"maxAwaitDurationMs\":825702294}},\"id\":\"uos\",\"name\":\"wqpsqaz\",\"type\":\"hqodv\"}"; - - 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)); - - DaprSubscription response - = manager.daprSubscriptions().define("wennin").withExistingManagedEnvironment("xquddrw", "cljbrhlhpvzad") - .withPubsubName("xrzfrmvztiucwvi").withTopic("lukh").withDeadLetterTopic("cqx") - .withRoutes(new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule().withMatch("a").withPath("qcbpokstsinv"))) - .withDefaultProperty("ovjyhd")) - .withScopes(Arrays.asList("rdvcehqwhit", "nmxgnm")) - .withMetadata(mapOf("kjnbkbdhlltqstq", "buwvorba", "vagzkheuba", "qsygxiynec", "pqcckqiawzlz", "lxu", - "r", "laslgacizux")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(false) - .withMaxMessagesCount(1749126168).withMaxAwaitDurationMs(1501943232)) - .create(); - - Assertions.assertEquals("jiotif", response.pubsubName()); - Assertions.assertEquals("bcngkegxc", response.topic()); - Assertions.assertEquals("xbbfetwil", response.deadLetterTopic()); - Assertions.assertEquals("pdxqlfrolqownkiu", response.routes().rules().get(0).match()); - Assertions.assertEquals("ewnahwkxjjmzt", response.routes().rules().get(0).path()); - Assertions.assertEquals("jczxvlgsrg", response.routes().defaultProperty()); - Assertions.assertEquals("izrpywlptyuqhrl", response.scopes().get(0)); - Assertions.assertEquals("awmpjprd", response.metadata().get("wrpcfpcfjfwzlgza")); - Assertions.assertEquals(false, response.bulkSubscribe().enabled()); - Assertions.assertEquals(335893529, response.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(825702294, response.bulkSubscribe().maxAwaitDurationMs()); - } - - // 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/DaprSubscriptionsDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteWithResponseMockTests.java deleted file mode 100644 index cbdf3dd6e62b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,52 +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 DaprSubscriptionsDeleteWithResponseMockTests { - @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.daprSubscriptions().deleteWithResponse("c", "wnujvqynvav", "tmdmuqohhihr", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetWithResponseMockTests.java deleted file mode 100644 index 68ef1a7b2471..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetWithResponseMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.DaprSubscription; -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 DaprSubscriptionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"pubsubName\":\"suaawj\",\"topic\":\"xwjnfcz\",\"deadLetterTopic\":\"nii\",\"routes\":{\"rules\":[{\"match\":\"ba\",\"path\":\"sjtgirnbgmgmddo\"},{\"match\":\"mynltwmpftmfoeaj\",\"path\":\"syxwetamfdd\"}],\"default\":\"lkpzwbhnrecchd\"},\"scopes\":[\"muhkahm\",\"edbiucvkhhwmjpjb\",\"eunxcqrrihufoi\",\"ppiybxv\"],\"metadata\":{\"zvkunhdi\":\"uzpbgkzcscpi\",\"cfqp\":\"juktirzkaugpucd\",\"rjlvzklkvbgi\":\"wgofmhx\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":86596689,\"maxAwaitDurationMs\":1162128652}},\"id\":\"bishjvpzaptuo\",\"name\":\"kaoizjixw\",\"type\":\"gcdiyk\"}"; - - 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)); - - DaprSubscription response = manager.daprSubscriptions() - .getWithResponse("btimpkjblor", "s", "hqhud", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("suaawj", response.pubsubName()); - Assertions.assertEquals("xwjnfcz", response.topic()); - Assertions.assertEquals("nii", response.deadLetterTopic()); - Assertions.assertEquals("ba", response.routes().rules().get(0).match()); - Assertions.assertEquals("sjtgirnbgmgmddo", response.routes().rules().get(0).path()); - Assertions.assertEquals("lkpzwbhnrecchd", response.routes().defaultProperty()); - Assertions.assertEquals("muhkahm", response.scopes().get(0)); - Assertions.assertEquals("uzpbgkzcscpi", response.metadata().get("zvkunhdi")); - Assertions.assertEquals(false, response.bulkSubscribe().enabled()); - Assertions.assertEquals(86596689, response.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(1162128652, response.bulkSubscribe().maxAwaitDurationMs()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListMockTests.java deleted file mode 100644 index a26bc89bdf8d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListMockTests.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.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.DaprSubscription; -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 DaprSubscriptionsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"pubsubName\":\"sdgzyy\",\"topic\":\"oxlvocptvdxxheig\",\"deadLetterTopic\":\"ilwzghj\",\"routes\":{\"rules\":[{\"match\":\"bzzbwayb\",\"path\":\"d\"}],\"default\":\"bgymqt\"},\"scopes\":[\"reojxrjnbsc\",\"nx\",\"vi\",\"neychbjizq\"],\"metadata\":{\"ipmlnfyzavf\":\"nwdxzedpqlrfbor\",\"aq\":\"bypicdbkpdj\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":2041682008,\"maxAwaitDurationMs\":1356872563}},\"id\":\"onjhxshthmgpczqu\",\"name\":\"ptkbvcpxtzhi\",\"type\":\"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)); - - PagedIterable response - = manager.daprSubscriptions().list("iuwkirkskwzts", "etjygowifcqpolz", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("sdgzyy", response.iterator().next().pubsubName()); - Assertions.assertEquals("oxlvocptvdxxheig", response.iterator().next().topic()); - Assertions.assertEquals("ilwzghj", response.iterator().next().deadLetterTopic()); - Assertions.assertEquals("bzzbwayb", response.iterator().next().routes().rules().get(0).match()); - Assertions.assertEquals("d", response.iterator().next().routes().rules().get(0).path()); - Assertions.assertEquals("bgymqt", response.iterator().next().routes().defaultProperty()); - Assertions.assertEquals("reojxrjnbsc", response.iterator().next().scopes().get(0)); - Assertions.assertEquals("nwdxzedpqlrfbor", response.iterator().next().metadata().get("ipmlnfyzavf")); - Assertions.assertEquals(false, response.iterator().next().bulkSubscribe().enabled()); - Assertions.assertEquals(2041682008, response.iterator().next().bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(1356872563, response.iterator().next().bulkSubscribe().maxAwaitDurationMs()); - } -} 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 0feb7db9d933..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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\":true,\"appId\":\"kfwynw\",\"appProtocol\":\"grpc\",\"appPort\":885107915,\"httpReadBufferSize\":1353261360,\"httpMaxRequestSize\":1479821561,\"logLevel\":\"warn\",\"enableApiLogging\":false}") - .toObject(Dapr.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("kfwynw", model.appId()); - Assertions.assertEquals(AppProtocol.GRPC, model.appProtocol()); - Assertions.assertEquals(885107915, model.appPort()); - Assertions.assertEquals(1353261360, model.httpReadBufferSize()); - Assertions.assertEquals(1479821561, model.httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.WARN, model.logLevel()); - Assertions.assertEquals(false, model.enableApiLogging()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Dapr model = new Dapr().withEnabled(true).withAppId("kfwynw").withAppProtocol(AppProtocol.GRPC) - .withAppPort(885107915).withHttpReadBufferSize(1353261360).withHttpMaxRequestSize(1479821561) - .withLogLevel(LogLevel.WARN).withEnableApiLogging(false); - model = BinaryData.fromObject(model).toObject(Dapr.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("kfwynw", model.appId()); - Assertions.assertEquals(AppProtocol.GRPC, model.appProtocol()); - Assertions.assertEquals(885107915, model.appPort()); - Assertions.assertEquals(1353261360, model.httpReadBufferSize()); - Assertions.assertEquals(1479821561, model.httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.WARN, model.logLevel()); - Assertions.assertEquals(false, 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 1ca655a96628..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.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.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\":[\"hbzhfepg\",\"gqexzlocxs\",\"paierh\"],\"identities\":[\"sglumma\",\"tjaodxobnb\"]},\"allowedApplications\":[\"qp\"]}") - .toObject(DefaultAuthorizationPolicy.class); - Assertions.assertEquals("hbzhfepg", model.allowedPrincipals().groups().get(0)); - Assertions.assertEquals("sglumma", model.allowedPrincipals().identities().get(0)); - Assertions.assertEquals("qp", model.allowedApplications().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultAuthorizationPolicy model - = new DefaultAuthorizationPolicy() - .withAllowedPrincipals( - new AllowedPrincipals().withGroups(Arrays.asList("hbzhfepg", "gqexzlocxs", "paierh")) - .withIdentities(Arrays.asList("sglumma", "tjaodxobnb"))) - .withAllowedApplications(Arrays.asList("qp")); - model = BinaryData.fromObject(model).toObject(DefaultAuthorizationPolicy.class); - Assertions.assertEquals("hbzhfepg", model.allowedPrincipals().groups().get(0)); - Assertions.assertEquals("sglumma", model.allowedPrincipals().identities().get(0)); - Assertions.assertEquals("qp", 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 1b9c62c0f6b7..000000000000 --- 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\":\"qulngsntnbybkzgc\"}").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 b7337a343a0d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.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.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\":\"ifrygzn\",\"value\":\"axri\"}") - .toObject(DiagnosticDataProviderMetadataPropertyBagItem.class); - Assertions.assertEquals("ifrygzn", model.name()); - Assertions.assertEquals("axri", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataProviderMetadataPropertyBagItem model - = new DiagnosticDataProviderMetadataPropertyBagItem().withName("ifrygzn").withValue("axri"); - model = BinaryData.fromObject(model).toObject(DiagnosticDataProviderMetadataPropertyBagItem.class); - Assertions.assertEquals("ifrygzn", model.name()); - Assertions.assertEquals("axri", 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 b0e24a5ad71b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataTests.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.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\":\"b\",\"propertyBag\":[{\"name\":\"hv\",\"value\":\"lkvn\"},{\"name\":\"lrigjkskyri\",\"value\":\"vzidsxwaab\"}]}") - .toObject(DiagnosticDataProviderMetadata.class); - Assertions.assertEquals("b", model.providerName()); - Assertions.assertEquals("hv", model.propertyBag().get(0).name()); - Assertions.assertEquals("lkvn", model.propertyBag().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataProviderMetadata model = new DiagnosticDataProviderMetadata().withProviderName("b") - .withPropertyBag(Arrays.asList( - new DiagnosticDataProviderMetadataPropertyBagItem().withName("hv").withValue("lkvn"), - new DiagnosticDataProviderMetadataPropertyBagItem().withName("lrigjkskyri").withValue("vzidsxwaab"))); - model = BinaryData.fromObject(model).toObject(DiagnosticDataProviderMetadata.class); - Assertions.assertEquals("b", model.providerName()); - Assertions.assertEquals("hv", model.propertyBag().get(0).name()); - Assertions.assertEquals("lkvn", 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 a7c905a0bf2e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseColumnTests.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.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\":\"waz\",\"dataType\":\"qnmcjngzqdqx\",\"columnType\":\"jw\"}") - .toObject(DiagnosticDataTableResponseColumn.class); - Assertions.assertEquals("waz", model.columnName()); - Assertions.assertEquals("qnmcjngzqdqx", model.dataType()); - Assertions.assertEquals("jw", model.columnType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataTableResponseColumn model = new DiagnosticDataTableResponseColumn().withColumnName("waz") - .withDataType("qnmcjngzqdqx").withColumnType("jw"); - model = BinaryData.fromObject(model).toObject(DiagnosticDataTableResponseColumn.class); - Assertions.assertEquals("waz", model.columnName()); - Assertions.assertEquals("qnmcjngzqdqx", model.dataType()); - Assertions.assertEquals("jw", 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 8efb2fbdfcb6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseObjectTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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\":\"tmzlbiojlv\",\"columns\":[{\"columnName\":\"bpneqvcwwyyurm\",\"dataType\":\"hppr\",\"columnType\":\"snmokayzej\"},{\"columnName\":\"lbkpb\",\"dataType\":\"cpilj\",\"columnType\":\"hzvechndbnwieho\"},{\"columnName\":\"wjwiuub\",\"dataType\":\"fqsfa\",\"columnType\":\"qtferrqwexjkmf\"},{\"columnName\":\"pjwogqqno\",\"dataType\":\"udcdabtqwpwyawb\",\"columnType\":\"sqbuc\"}],\"rows\":[\"datakyexaoguyaipi\",\"datasdaultxij\",\"dataum\"]}") - .toObject(DiagnosticDataTableResponseObject.class); - Assertions.assertEquals("tmzlbiojlv", model.tableName()); - Assertions.assertEquals("bpneqvcwwyyurm", model.columns().get(0).columnName()); - Assertions.assertEquals("hppr", model.columns().get(0).dataType()); - Assertions.assertEquals("snmokayzej", model.columns().get(0).columnType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataTableResponseObject model = new DiagnosticDataTableResponseObject().withTableName("tmzlbiojlv") - .withColumns(Arrays.asList( - new DiagnosticDataTableResponseColumn().withColumnName("bpneqvcwwyyurm").withDataType("hppr") - .withColumnType("snmokayzej"), - new DiagnosticDataTableResponseColumn().withColumnName("lbkpb").withDataType("cpilj") - .withColumnType("hzvechndbnwieho"), - new DiagnosticDataTableResponseColumn().withColumnName("wjwiuub").withDataType("fqsfa") - .withColumnType("qtferrqwexjkmf"), - new DiagnosticDataTableResponseColumn().withColumnName("pjwogqqno").withDataType("udcdabtqwpwyawb") - .withColumnType("sqbuc"))) - .withRows(Arrays.asList("datakyexaoguyaipi", "datasdaultxij", "dataum")); - model = BinaryData.fromObject(model).toObject(DiagnosticDataTableResponseObject.class); - Assertions.assertEquals("tmzlbiojlv", model.tableName()); - Assertions.assertEquals("bpneqvcwwyyurm", model.columns().get(0).columnName()); - Assertions.assertEquals("hppr", model.columns().get(0).dataType()); - Assertions.assertEquals("snmokayzej", 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 ed630e867c94..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticRenderingTests.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.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\":673657894,\"title\":\"usfzsvtuikzha\",\"description\":\"glcfhmlrqryxyn\",\"isVisible\":true}") - .toObject(DiagnosticRendering.class); - Assertions.assertEquals(673657894, model.type()); - Assertions.assertEquals("usfzsvtuikzha", model.title()); - Assertions.assertEquals("glcfhmlrqryxyn", model.description()); - Assertions.assertEquals(true, model.isVisible()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticRendering model = new DiagnosticRendering().withType(673657894).withTitle("usfzsvtuikzha") - .withDescription("glcfhmlrqryxyn").withIsVisible(true); - model = BinaryData.fromObject(model).toObject(DiagnosticRendering.class); - Assertions.assertEquals(673657894, model.type()); - Assertions.assertEquals("usfzsvtuikzha", model.title()); - Assertions.assertEquals("glcfhmlrqryxyn", 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 f3775dd9fd2a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.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.DiagnosticSupportTopic; - -public final class DiagnosticSupportTopicTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticSupportTopic model = BinaryData.fromString("{\"id\":\"opv\",\"pesId\":\"dbzqgqqihed\"}") - .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 c7738824b28f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.java +++ /dev/null @@ -1,119 +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\":\"nzqodfvpg\",\"name\":\"oxgsgbpfgzdjtx\",\"description\":\"flbqvgaq\",\"author\":\"gafcqu\",\"category\":\"dvetnws\",\"supportTopicList\":[{}],\"analysisTypes\":[\"wlduyc\",\"uzhyrmewipmvekdx\",\"kuqgsjjxundxgket\",\"zhhzjhfjmhvvmu\"],\"type\":\"pmuneqsx\",\"score\":97.42455},\"dataset\":[{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}}],\"status\":{\"message\":\"sasbhu\",\"statusId\":1639205644},\"dataProviderMetadata\":{\"providerName\":\"yue\",\"propertyBag\":[{},{},{}]}},\"id\":\"nsqyrpfoobrltt\",\"name\":\"msjnygqdnfw\",\"type\":\"zdzgtilaxhnfhqly\"},{\"properties\":{\"metadata\":{\"id\":\"uwivkxoy\",\"name\":\"nbixxrti\",\"description\":\"cpwpg\",\"author\":\"rc\",\"category\":\"tso\",\"supportTopicList\":[{},{}],\"analysisTypes\":[\"nxpmyyefrpmpdnq\",\"skawaoqvmmb\",\"pqfrtqlkz\"],\"type\":\"gnitgvkxlzyq\",\"score\":34.082},\"dataset\":[{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}}],\"status\":{\"message\":\"cansymoyqhlwigd\",\"statusId\":247334898},\"dataProviderMetadata\":{\"providerName\":\"xgomfajuwa\",\"propertyBag\":[{},{},{},{}]}},\"id\":\"aeyyg\",\"name\":\"xakjsqzhzb\",\"type\":\"zkgimsid\"},{\"properties\":{\"metadata\":{\"id\":\"cddyvvjsk\",\"name\":\"mocwa\",\"description\":\"qgatjeaahhvjhhn\",\"author\":\"zybbj\",\"category\":\"dj\",\"supportTopicList\":[{},{}],\"analysisTypes\":[\"yxvxevblbjed\",\"ljlageuaulxu\",\"smjbnkppxyn\",\"nlsvxeiz\"],\"type\":\"wklnsrmffeyc\",\"score\":18.504536},\"dataset\":[{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}}],\"status\":{\"message\":\"ammxqi\",\"statusId\":1876834385},\"dataProviderMetadata\":{\"providerName\":\"ddrtkgdojb\",\"propertyBag\":[{},{},{}]}},\"id\":\"vrefdeesv\",\"name\":\"cuijpxt\",\"type\":\"s\"},{\"properties\":{\"metadata\":{\"id\":\"tujwsawdd\",\"name\":\"babxvitit\",\"description\":\"zeexavoxtfgle\",\"author\":\"m\",\"category\":\"bwpypqtgsfjacb\",\"supportTopicList\":[{},{}],\"analysisTypes\":[\"udbxv\"],\"type\":\"htnsi\",\"score\":69.404366},\"dataset\":[{\"table\":{},\"renderingProperties\":{}}],\"status\":{\"message\":\"ckdlpag\",\"statusId\":1885722966},\"dataProviderMetadata\":{\"providerName\":\"a\",\"propertyBag\":[{},{},{}]}},\"id\":\"xwmdboxd\",\"name\":\"gsftufqobrjlnacg\",\"type\":\"ckknhxkizvy\"}],\"nextLink\":\"rzvul\"}") - .toObject(DiagnosticsCollectionInner.class); - Assertions.assertEquals("wlduyc", model.value().get(0).properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("sasbhu", model.value().get(0).properties().status().message()); - Assertions.assertEquals(1639205644, model.value().get(0).properties().status().statusId()); - Assertions.assertEquals("yue", 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("wlduyc", "uzhyrmewipmvekdx", "kuqgsjjxundxgket", - "zhhzjhfjmhvvmu"))) - .withDataset(Arrays.asList( - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()))) - .withStatus(new DiagnosticsStatus().withMessage("sasbhu").withStatusId(1639205644)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata().withProviderName( - "yue").withPropertyBag( - Arrays.asList(new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem())))), - new DiagnosticsInner() - .withProperties( - new DiagnosticsProperties() - .withMetadata(new DiagnosticsDefinition() - .withSupportTopicList( - Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("nxpmyyefrpmpdnq", "skawaoqvmmb", "pqfrtqlkz"))) - .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("cansymoyqhlwigd").withStatusId( - 247334898)) - .withDataProviderMetadata(new DiagnosticDataProviderMetadata() - .withProviderName("xgomfajuwa") - .withPropertyBag(Arrays.asList(new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem())))), - new DiagnosticsInner() - .withProperties(new DiagnosticsProperties() - .withMetadata(new DiagnosticsDefinition() - .withSupportTopicList( - Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes( - Arrays.asList("yxvxevblbjed", "ljlageuaulxu", "smjbnkppxyn", "nlsvxeiz"))) - .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("ammxqi").withStatusId(1876834385)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata().withProviderName("ddrtkgdojb") - .withPropertyBag(Arrays.asList(new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem())))), - new DiagnosticsInner().withProperties(new DiagnosticsProperties() - .withMetadata(new DiagnosticsDefinition() - .withSupportTopicList( - Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("udbxv"))) - .withDataset(Arrays - .asList(new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()))) - .withStatus(new DiagnosticsStatus().withMessage("ckdlpag").withStatusId(1885722966)) - .withDataProviderMetadata(new DiagnosticDataProviderMetadata().withProviderName("a") - .withPropertyBag(Arrays.asList(new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem())))))); - model = BinaryData.fromObject(model).toObject(DiagnosticsCollectionInner.class); - Assertions.assertEquals("wlduyc", model.value().get(0).properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("sasbhu", model.value().get(0).properties().status().message()); - Assertions.assertEquals(1639205644, model.value().get(0).properties().status().statusId()); - Assertions.assertEquals("yue", 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 030f1d800655..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java +++ /dev/null @@ -1,57 +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\":\"wthmkyib\",\"columns\":[{\"columnName\":\"hsgqc\",\"dataType\":\"hohsd\",\"columnType\":\"cdzsu\"},{\"columnName\":\"ohdxbzlmcmu\",\"dataType\":\"cvhd\",\"columnType\":\"v\"},{\"columnName\":\"qxeysko\",\"dataType\":\"zinkfkbgbzbowxeq\",\"columnType\":\"ljmygvkzqkjjeokb\"},{\"columnName\":\"fezrx\",\"dataType\":\"zurtleipqxbkwvz\",\"columnType\":\"zvd\"}],\"rows\":[\"datad\"]},\"renderingProperties\":{\"type\":1814010794,\"title\":\"pnodawopqhe\",\"description\":\"ptmcgsbostzelnd\",\"isVisible\":false}}") - .toObject(DiagnosticsDataApiResponse.class); - Assertions.assertEquals("wthmkyib", model.table().tableName()); - Assertions.assertEquals("hsgqc", model.table().columns().get(0).columnName()); - Assertions.assertEquals("hohsd", model.table().columns().get(0).dataType()); - Assertions.assertEquals("cdzsu", model.table().columns().get(0).columnType()); - Assertions.assertEquals(1814010794, model.renderingProperties().type()); - Assertions.assertEquals("pnodawopqhe", model.renderingProperties().title()); - Assertions.assertEquals("ptmcgsbostzelnd", 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("wthmkyib") - .withColumns(Arrays.asList( - new DiagnosticDataTableResponseColumn().withColumnName("hsgqc").withDataType("hohsd") - .withColumnType("cdzsu"), - new DiagnosticDataTableResponseColumn().withColumnName("ohdxbzlmcmu").withDataType("cvhd") - .withColumnType("v"), - new DiagnosticDataTableResponseColumn().withColumnName("qxeysko").withDataType("zinkfkbgbzbowxeq") - .withColumnType("ljmygvkzqkjjeokb"), - new DiagnosticDataTableResponseColumn().withColumnName("fezrx").withDataType("zurtleipqxbkwvz") - .withColumnType("zvd"))) - .withRows(Arrays.asList("datad"))) - .withRenderingProperties(new DiagnosticRendering().withType(1814010794).withTitle("pnodawopqhe") - .withDescription("ptmcgsbostzelnd").withIsVisible(false)); - model = BinaryData.fromObject(model).toObject(DiagnosticsDataApiResponse.class); - Assertions.assertEquals("wthmkyib", model.table().tableName()); - Assertions.assertEquals("hsgqc", model.table().columns().get(0).columnName()); - Assertions.assertEquals("hohsd", model.table().columns().get(0).dataType()); - Assertions.assertEquals("cdzsu", model.table().columns().get(0).columnType()); - Assertions.assertEquals(1814010794, model.renderingProperties().type()); - Assertions.assertEquals("pnodawopqhe", model.renderingProperties().title()); - Assertions.assertEquals("ptmcgsbostzelnd", 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 d4271ef45f59..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.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.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\":\"hlqhykprlpy\",\"name\":\"uciqdsme\",\"description\":\"itdfuxtyasiib\",\"author\":\"ybnnustg\",\"category\":\"jh\",\"supportTopicList\":[{\"id\":\"xhcmavmqfoudo\",\"pesId\":\"cgyypro\"}],\"analysisTypes\":[\"pundmbxhug\",\"mjkavlgorbmft\",\"mdtzfjltfvnzc\"],\"type\":\"t\",\"score\":1.86252}") - .toObject(DiagnosticsDefinition.class); - Assertions.assertEquals("pundmbxhug", model.analysisTypes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsDefinition model - = new DiagnosticsDefinition().withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("pundmbxhug", "mjkavlgorbmft", "mdtzfjltfvnzc")); - model = BinaryData.fromObject(model).toObject(DiagnosticsDefinition.class); - Assertions.assertEquals("pundmbxhug", 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 e6d2d26a529b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsInnerTests.java +++ /dev/null @@ -1,94 +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\":\"eranokqgukkjqnv\",\"name\":\"oylaxxul\",\"description\":\"isdos\",\"author\":\"b\",\"category\":\"vgjrwhr\",\"supportTopicList\":[{\"id\":\"ytdc\",\"pesId\":\"gc\"}],\"analysisTypes\":[\"fnwmbtmvpdvj\"],\"type\":\"ttzaefed\",\"score\":85.42932},\"dataset\":[{\"table\":{\"tableName\":\"hk\",\"columns\":[{},{},{}],\"rows\":[\"dataqnsdfzpbgtgky\"]},\"renderingProperties\":{\"type\":50734303,\"title\":\"rjeuut\",\"description\":\"xezw\",\"isVisible\":true}},{\"table\":{\"tableName\":\"bwnhhtql\",\"columns\":[{},{},{},{}],\"rows\":[\"datapipifh\",\"dataf\",\"dataoajvgcxtxjcs\"]},\"renderingProperties\":{\"type\":1665237289,\"title\":\"dltug\",\"description\":\"esmkssjhoiftxfkf\",\"isVisible\":false}},{\"table\":{\"tableName\":\"hpt\",\"columns\":[{},{},{},{}],\"rows\":[\"databiqtgdq\",\"datahm\",\"datawsldrizetpwbr\"]},\"renderingProperties\":{\"type\":1155046174,\"title\":\"bphbqzmizakakank\",\"description\":\"dnjzh\",\"isVisible\":true}}],\"status\":{\"message\":\"hjlmu\",\"statusId\":29560725},\"dataProviderMetadata\":{\"providerName\":\"imrsopteecjmei\",\"propertyBag\":[{\"name\":\"vasylwxdzau\",\"value\":\"eoohguufuzboyj\"},{\"name\":\"hwtzolb\",\"value\":\"mwmdxmebwjscjpa\"},{\"name\":\"xveabf\",\"value\":\"nmwmqtibx\"},{\"name\":\"jddtvqct\",\"value\":\"dija\"}]}},\"id\":\"kmr\",\"name\":\"ieekpndzaa\",\"type\":\"mudqmeq\"}") - .toObject(DiagnosticsInner.class); - Assertions.assertEquals("fnwmbtmvpdvj", model.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("hk", model.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(50734303, model.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("rjeuut", model.properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("xezw", model.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, model.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("hjlmu", model.properties().status().message()); - Assertions.assertEquals(29560725, model.properties().status().statusId()); - Assertions.assertEquals("imrsopteecjmei", model.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("vasylwxdzau", model.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("eoohguufuzboyj", - 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("fnwmbtmvpdvj"))) - .withDataset(Arrays.asList( - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("hk") - .withColumns(Arrays.asList(new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn(), new DiagnosticDataTableResponseColumn())) - .withRows(Arrays.asList("dataqnsdfzpbgtgky"))) - .withRenderingProperties(new DiagnosticRendering().withType(50734303).withTitle("rjeuut") - .withDescription("xezw").withIsVisible(true)), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("bwnhhtql") - .withColumns(Arrays.asList(new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn(), new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn())) - .withRows(Arrays.asList("datapipifh", "dataf", "dataoajvgcxtxjcs"))) - .withRenderingProperties(new DiagnosticRendering().withType(1665237289).withTitle("dltug") - .withDescription("esmkssjhoiftxfkf").withIsVisible(false)), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("hpt") - .withColumns(Arrays.asList(new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn(), new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn())) - .withRows(Arrays.asList("databiqtgdq", "datahm", "datawsldrizetpwbr"))) - .withRenderingProperties(new DiagnosticRendering().withType(1155046174) - .withTitle("bphbqzmizakakank").withDescription("dnjzh").withIsVisible(true)))) - .withStatus(new DiagnosticsStatus().withMessage("hjlmu").withStatusId(29560725)) - .withDataProviderMetadata(new DiagnosticDataProviderMetadata().withProviderName("imrsopteecjmei") - .withPropertyBag(Arrays.asList( - new DiagnosticDataProviderMetadataPropertyBagItem().withName("vasylwxdzau") - .withValue("eoohguufuzboyj"), - new DiagnosticDataProviderMetadataPropertyBagItem().withName("hwtzolb") - .withValue("mwmdxmebwjscjpa"), - new DiagnosticDataProviderMetadataPropertyBagItem().withName("xveabf").withValue("nmwmqtibx"), - new DiagnosticDataProviderMetadataPropertyBagItem().withName("jddtvqct").withValue("dija"))))); - model = BinaryData.fromObject(model).toObject(DiagnosticsInner.class); - Assertions.assertEquals("fnwmbtmvpdvj", model.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("hk", model.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(50734303, model.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("rjeuut", model.properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("xezw", model.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, model.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("hjlmu", model.properties().status().message()); - Assertions.assertEquals(29560725, model.properties().status().statusId()); - Assertions.assertEquals("imrsopteecjmei", model.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("vasylwxdzau", model.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("eoohguufuzboyj", - 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 3f5416c74a0f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java +++ /dev/null @@ -1,107 +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\":\"pibudqwyxebeybpm\",\"name\":\"nrtffyaqi\",\"description\":\"hheioqaqhvseuf\",\"author\":\"yrxpdlcgqls\",\"category\":\"mjqfrddgamquhio\",\"supportTopicList\":[{\"id\":\"uivfcdis\",\"pesId\":\"rnxzh\"},{\"id\":\"exrxzbujrtrhq\",\"pesId\":\"revkhgnlnzo\"},{\"id\":\"lrpiqywnc\",\"pesId\":\"tszcofizehtdhgb\"},{\"id\":\"vreljea\",\"pesId\":\"rvzmlovuana\"}],\"analysisTypes\":[\"xlpm\",\"erbdk\",\"lvidizozs\"],\"type\":\"ccxjm\",\"score\":89.4738},\"dataset\":[{\"table\":{\"tableName\":\"n\",\"columns\":[{\"columnName\":\"uwwltvuqjctz\",\"dataType\":\"keifzzhmkdasv\",\"columnType\":\"yhbxcudchxgs\"}],\"rows\":[\"dataldforobwj\",\"datavizbfhfo\",\"datavacqpbtuodxesz\"]},\"renderingProperties\":{\"type\":1654037219,\"title\":\"awumuaslzkwrrwo\",\"description\":\"qucwyhahnom\",\"isVisible\":true}},{\"table\":{\"tableName\":\"uh\",\"columns\":[{\"columnName\":\"uurutlwexxwlalni\",\"dataType\":\"zsrzpgepq\",\"columnType\":\"bb\"},{\"columnName\":\"pgdakchzyvli\",\"dataType\":\"nrkcxkj\",\"columnType\":\"nxm\"}],\"rows\":[\"dataxs\",\"dataqrntv\",\"datawijpsttexoqqpwc\"]},\"renderingProperties\":{\"type\":402556977,\"title\":\"hruncuwmq\",\"description\":\"kcdqzhlct\",\"isVisible\":true}},{\"table\":{\"tableName\":\"ndy\",\"columns\":[{\"columnName\":\"rqbnjjrc\",\"dataType\":\"gydcw\",\"columnType\":\"xjumvq\"},{\"columnName\":\"lihrraiouaubr\",\"dataType\":\"loqxfuojrngif\",\"columnType\":\"z\"}],\"rows\":[\"dataccbiuimzdlyjdfq\",\"datamkyoqufdvruzsl\",\"dataojhp\"]},\"renderingProperties\":{\"type\":320738899,\"title\":\"dxotng\",\"description\":\"gugey\",\"isVisible\":false}},{\"table\":{\"tableName\":\"kyuizabsnmfpp\",\"columns\":[{\"columnName\":\"evy\",\"dataType\":\"hsgz\",\"columnType\":\"zbgomfgbeg\"}],\"rows\":[\"dataleohibetnluankr\",\"datafxeeebtijvacvbm\"]},\"renderingProperties\":{\"type\":1802665958,\"title\":\"xl\",\"description\":\"rnwxacevehjkuyxo\",\"isVisible\":false}}],\"status\":{\"message\":\"qltfaey\",\"statusId\":277162772},\"dataProviderMetadata\":{\"providerName\":\"gv\",\"propertyBag\":[{\"name\":\"gh\",\"value\":\"ypoq\"}]}}") - .toObject(DiagnosticsProperties.class); - Assertions.assertEquals("xlpm", model.metadata().analysisTypes().get(0)); - Assertions.assertEquals("n", model.dataset().get(0).table().tableName()); - Assertions.assertEquals("uwwltvuqjctz", model.dataset().get(0).table().columns().get(0).columnName()); - Assertions.assertEquals("keifzzhmkdasv", model.dataset().get(0).table().columns().get(0).dataType()); - Assertions.assertEquals("yhbxcudchxgs", model.dataset().get(0).table().columns().get(0).columnType()); - Assertions.assertEquals(1654037219, model.dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("awumuaslzkwrrwo", model.dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("qucwyhahnom", model.dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, model.dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("qltfaey", model.status().message()); - Assertions.assertEquals(277162772, model.status().statusId()); - Assertions.assertEquals("gv", model.dataProviderMetadata().providerName()); - Assertions.assertEquals("gh", model.dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("ypoq", 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(), new DiagnosticSupportTopic(), - new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("xlpm", "erbdk", "lvidizozs"))) - .withDataset(Arrays.asList( - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("n") - .withColumns( - Arrays.asList(new DiagnosticDataTableResponseColumn().withColumnName("uwwltvuqjctz") - .withDataType("keifzzhmkdasv").withColumnType("yhbxcudchxgs"))) - .withRows(Arrays.asList("dataldforobwj", "datavizbfhfo", "datavacqpbtuodxesz"))) - .withRenderingProperties(new DiagnosticRendering().withType(1654037219) - .withTitle("awumuaslzkwrrwo").withDescription("qucwyhahnom").withIsVisible(true)), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("uh") - .withColumns(Arrays.asList( - new DiagnosticDataTableResponseColumn().withColumnName("uurutlwexxwlalni") - .withDataType("zsrzpgepq").withColumnType("bb"), - new DiagnosticDataTableResponseColumn().withColumnName("pgdakchzyvli") - .withDataType("nrkcxkj").withColumnType("nxm"))) - .withRows(Arrays.asList("dataxs", "dataqrntv", "datawijpsttexoqqpwc"))) - .withRenderingProperties(new DiagnosticRendering().withType(402556977).withTitle("hruncuwmq") - .withDescription("kcdqzhlct").withIsVisible(true)), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("ndy") - .withColumns(Arrays.asList( - new DiagnosticDataTableResponseColumn().withColumnName("rqbnjjrc").withDataType("gydcw") - .withColumnType("xjumvq"), - new DiagnosticDataTableResponseColumn().withColumnName("lihrraiouaubr") - .withDataType("loqxfuojrngif").withColumnType("z"))) - .withRows(Arrays.asList("dataccbiuimzdlyjdfq", "datamkyoqufdvruzsl", "dataojhp"))) - .withRenderingProperties(new DiagnosticRendering().withType(320738899).withTitle("dxotng") - .withDescription("gugey").withIsVisible(false)), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("kyuizabsnmfpp") - .withColumns(Arrays.asList(new DiagnosticDataTableResponseColumn().withColumnName("evy") - .withDataType("hsgz").withColumnType("zbgomfgbeg"))) - .withRows(Arrays.asList("dataleohibetnluankr", "datafxeeebtijvacvbm"))) - .withRenderingProperties(new DiagnosticRendering().withType(1802665958).withTitle("xl") - .withDescription("rnwxacevehjkuyxo").withIsVisible(false)))) - .withStatus(new DiagnosticsStatus().withMessage("qltfaey").withStatusId(277162772)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata().withProviderName("gv").withPropertyBag(Arrays - .asList(new DiagnosticDataProviderMetadataPropertyBagItem().withName("gh").withValue("ypoq")))); - model = BinaryData.fromObject(model).toObject(DiagnosticsProperties.class); - Assertions.assertEquals("xlpm", model.metadata().analysisTypes().get(0)); - Assertions.assertEquals("n", model.dataset().get(0).table().tableName()); - Assertions.assertEquals("uwwltvuqjctz", model.dataset().get(0).table().columns().get(0).columnName()); - Assertions.assertEquals("keifzzhmkdasv", model.dataset().get(0).table().columns().get(0).dataType()); - Assertions.assertEquals("yhbxcudchxgs", model.dataset().get(0).table().columns().get(0).columnType()); - Assertions.assertEquals(1654037219, model.dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("awumuaslzkwrrwo", model.dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("qucwyhahnom", model.dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, model.dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("qltfaey", model.status().message()); - Assertions.assertEquals(277162772, model.status().statusId()); - Assertions.assertEquals("gv", model.dataProviderMetadata().providerName()); - Assertions.assertEquals("gh", model.dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("ypoq", 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 8f497b3cec3e..000000000000 --- 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\":\"dpsovwxznptgo\",\"statusId\":935021144}") - .toObject(DiagnosticsStatus.class); - Assertions.assertEquals("dpsovwxznptgo", model.message()); - Assertions.assertEquals(935021144, model.statusId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsStatus model = new DiagnosticsStatus().withMessage("dpsovwxznptgo").withStatusId(935021144); - model = BinaryData.fromObject(model).toObject(DiagnosticsStatus.class); - Assertions.assertEquals("dpsovwxznptgo", model.message()); - Assertions.assertEquals(935021144, model.statusId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentConfigurationPropertyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentConfigurationPropertyTests.java deleted file mode 100644 index f29915ca3f90..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentConfigurationPropertyTests.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.DotNetComponentConfigurationProperty; -import org.junit.jupiter.api.Assertions; - -public final class DotNetComponentConfigurationPropertyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DotNetComponentConfigurationProperty model - = BinaryData.fromString("{\"propertyName\":\"gjlgvvpase\",\"value\":\"gbuxantuygdh\"}") - .toObject(DotNetComponentConfigurationProperty.class); - Assertions.assertEquals("gjlgvvpase", model.propertyName()); - Assertions.assertEquals("gbuxantuygdh", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DotNetComponentConfigurationProperty model - = new DotNetComponentConfigurationProperty().withPropertyName("gjlgvvpase").withValue("gbuxantuygdh"); - model = BinaryData.fromObject(model).toObject(DotNetComponentConfigurationProperty.class); - Assertions.assertEquals("gjlgvvpase", model.propertyName()); - Assertions.assertEquals("gbuxantuygdh", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentInnerTests.java deleted file mode 100644 index e27a5336ff69..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentInnerTests.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.fluent.models.DotNetComponentInner; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DotNetComponentInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DotNetComponentInner model = BinaryData.fromString( - "{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Deleting\",\"configurations\":[{\"propertyName\":\"rx\",\"value\":\"sojklinhmdptys\"},{\"propertyName\":\"qsgnzxojpsl\",\"value\":\"jgpliuf\"},{\"propertyName\":\"woyxqvapcohhou\",\"value\":\"pqojxcx\"}],\"serviceBinds\":[{\"name\":\"cgdz\",\"serviceId\":\"nr\"},{\"name\":\"cawetzqddt\",\"serviceId\":\"fljhznamtua\"},{\"name\":\"zwcjjncqtj\",\"serviceId\":\"izvg\"}]},\"id\":\"atzuuv\",\"name\":\"xngre\",\"type\":\"wggahttzlswvaj\"}") - .toObject(DotNetComponentInner.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, model.componentType()); - Assertions.assertEquals("rx", model.configurations().get(0).propertyName()); - Assertions.assertEquals("sojklinhmdptys", model.configurations().get(0).value()); - Assertions.assertEquals("cgdz", model.serviceBinds().get(0).name()); - Assertions.assertEquals("nr", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DotNetComponentInner model = new DotNetComponentInner().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("rx").withValue("sojklinhmdptys"), - new DotNetComponentConfigurationProperty().withPropertyName("qsgnzxojpsl").withValue("jgpliuf"), - new DotNetComponentConfigurationProperty().withPropertyName("woyxqvapcohhou").withValue("pqojxcx"))) - .withServiceBinds(Arrays.asList(new DotNetComponentServiceBind().withName("cgdz").withServiceId("nr"), - new DotNetComponentServiceBind().withName("cawetzqddt").withServiceId("fljhznamtua"), - new DotNetComponentServiceBind().withName("zwcjjncqtj").withServiceId("izvg"))); - model = BinaryData.fromObject(model).toObject(DotNetComponentInner.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, model.componentType()); - Assertions.assertEquals("rx", model.configurations().get(0).propertyName()); - Assertions.assertEquals("sojklinhmdptys", model.configurations().get(0).value()); - Assertions.assertEquals("cgdz", model.serviceBinds().get(0).name()); - Assertions.assertEquals("nr", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentPropertiesTests.java deleted file mode 100644 index 813190824ddf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentPropertiesTests.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.fluent.models.DotNetComponentProperties; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DotNetComponentPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DotNetComponentProperties model = BinaryData.fromString( - "{\"componentType\":\"AspireResourceServerApi\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"qzasunwqrjzfrgqh\",\"value\":\"hcmbuocnjrohmbp\"},{\"propertyName\":\"yx\",\"value\":\"eblydyv\"}],\"serviceBinds\":[{\"name\":\"rocxnehvs\",\"serviceId\":\"odlfpyapucygvo\"},{\"name\":\"yunssx\",\"serviceId\":\"hi\"}]}") - .toObject(DotNetComponentProperties.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_RESOURCE_SERVER_API, model.componentType()); - Assertions.assertEquals("qzasunwqrjzfrgqh", model.configurations().get(0).propertyName()); - Assertions.assertEquals("hcmbuocnjrohmbp", model.configurations().get(0).value()); - Assertions.assertEquals("rocxnehvs", model.serviceBinds().get(0).name()); - Assertions.assertEquals("odlfpyapucygvo", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DotNetComponentProperties model = new DotNetComponentProperties() - .withComponentType(DotNetComponentType.ASPIRE_RESOURCE_SERVER_API) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("qzasunwqrjzfrgqh") - .withValue("hcmbuocnjrohmbp"), - new DotNetComponentConfigurationProperty().withPropertyName("yx").withValue("eblydyv"))) - .withServiceBinds( - Arrays.asList(new DotNetComponentServiceBind().withName("rocxnehvs").withServiceId("odlfpyapucygvo"), - new DotNetComponentServiceBind().withName("yunssx").withServiceId("hi"))); - model = BinaryData.fromObject(model).toObject(DotNetComponentProperties.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_RESOURCE_SERVER_API, model.componentType()); - Assertions.assertEquals("qzasunwqrjzfrgqh", model.configurations().get(0).propertyName()); - Assertions.assertEquals("hcmbuocnjrohmbp", model.configurations().get(0).value()); - Assertions.assertEquals("rocxnehvs", model.serviceBinds().get(0).name()); - Assertions.assertEquals("odlfpyapucygvo", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentServiceBindTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentServiceBindTests.java deleted file mode 100644 index c988c2e53267..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentServiceBindTests.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.DotNetComponentServiceBind; -import org.junit.jupiter.api.Assertions; - -public final class DotNetComponentServiceBindTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DotNetComponentServiceBind model = BinaryData.fromString("{\"name\":\"qipir\",\"serviceId\":\"wrq\"}") - .toObject(DotNetComponentServiceBind.class); - Assertions.assertEquals("qipir", model.name()); - Assertions.assertEquals("wrq", model.serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DotNetComponentServiceBind model = new DotNetComponentServiceBind().withName("qipir").withServiceId("wrq"); - model = BinaryData.fromObject(model).toObject(DotNetComponentServiceBind.class); - Assertions.assertEquals("qipir", model.name()); - Assertions.assertEquals("wrq", model.serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCollectionTests.java deleted file mode 100644 index b7bb2687921e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCollectionTests.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.fluent.models.DotNetComponentInner; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentsCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DotNetComponentsCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DotNetComponentsCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"xigdhxiidlope\",\"value\":\"wdpyq\"}],\"serviceBinds\":[{\"name\":\"ubmdnafcbqwre\",\"serviceId\":\"ela\"},{\"name\":\"cigeleohdbvqvw\",\"serviceId\":\"jopwbeonrlkwz\"}]},\"id\":\"ybxc\",\"name\":\"akxcptsoqfyiaseq\",\"type\":\"hkrttzrazis\"}],\"nextLink\":\"kiuemv\"}") - .toObject(DotNetComponentsCollection.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, model.value().get(0).componentType()); - Assertions.assertEquals("xigdhxiidlope", model.value().get(0).configurations().get(0).propertyName()); - Assertions.assertEquals("wdpyq", model.value().get(0).configurations().get(0).value()); - Assertions.assertEquals("ubmdnafcbqwre", model.value().get(0).serviceBinds().get(0).name()); - Assertions.assertEquals("ela", model.value().get(0).serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DotNetComponentsCollection model = new DotNetComponentsCollection() - .withValue(Arrays.asList(new DotNetComponentInner().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("xigdhxiidlope").withValue("wdpyq"))) - .withServiceBinds( - Arrays.asList(new DotNetComponentServiceBind().withName("ubmdnafcbqwre").withServiceId("ela"), - new DotNetComponentServiceBind().withName("cigeleohdbvqvw").withServiceId("jopwbeonrlkwz"))))); - model = BinaryData.fromObject(model).toObject(DotNetComponentsCollection.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, model.value().get(0).componentType()); - Assertions.assertEquals("xigdhxiidlope", model.value().get(0).configurations().get(0).propertyName()); - Assertions.assertEquals("wdpyq", model.value().get(0).configurations().get(0).value()); - Assertions.assertEquals("ubmdnafcbqwre", model.value().get(0).serviceBinds().get(0).name()); - Assertions.assertEquals("ela", model.value().get(0).serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateMockTests.java deleted file mode 100644 index eaca56b8abc3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DotNetComponent; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DotNetComponentsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"qbbewfcuqfpyyxm\",\"value\":\"mtmvwituwey\"}],\"serviceBinds\":[{\"name\":\"cybwfuppoxprcm\",\"serviceId\":\"uujxdii\"},{\"name\":\"oxrezsvavlrxik\",\"serviceId\":\"oywlunpipcwyb\"},{\"name\":\"fncn\",\"serviceId\":\"tpf\"}]},\"id\":\"aebwfwhxorpwa\",\"name\":\"tzwugexojfccy\",\"type\":\"h\"}"; - - 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)); - - DotNetComponent response = manager.dotNetComponents().define("bibiwks") - .withExistingManagedEnvironment("ajqzj", "alec").withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("zvoikvntwczf").withValue("ushlcxpblalh"), - new DotNetComponentConfigurationProperty().withPropertyName("zpfkis").withValue("idqzsaaoqdsgpto"), - new DotNetComponentConfigurationProperty().withPropertyName("jq").withValue("afcnlrtb"), - new DotNetComponentConfigurationProperty().withPropertyName("jzzca").withValue("jolb"))) - .withServiceBinds( - Arrays.asList(new DotNetComponentServiceBind().withName("twieopexelxqdwr").withServiceId("yil"), - new DotNetComponentServiceBind().withName("ibkgxyxyau").withServiceId("eddobmcnltm"), - new DotNetComponentServiceBind().withName("tkujsqycm").withServiceId("xfabl"), - new DotNetComponentServiceBind().withName("pwbmwhria").withServiceId("wrycgnwpl"))) - .create(); - - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, response.componentType()); - Assertions.assertEquals("qbbewfcuqfpyyxm", response.configurations().get(0).propertyName()); - Assertions.assertEquals("mtmvwituwey", response.configurations().get(0).value()); - Assertions.assertEquals("cybwfuppoxprcm", response.serviceBinds().get(0).name()); - Assertions.assertEquals("uujxdii", response.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetWithResponseMockTests.java deleted file mode 100644 index 61d5b7692e8a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetWithResponseMockTests.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 com.azure.resourcemanager.appcontainers.models.DotNetComponent; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -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 DotNetComponentsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"componentType\":\"AspireResourceServerApi\",\"provisioningState\":\"Deleting\",\"configurations\":[{\"propertyName\":\"oxinunjlzkdr\",\"value\":\"qsxytqqtcmiw\"},{\"propertyName\":\"is\",\"value\":\"mey\"}],\"serviceBinds\":[{\"name\":\"m\",\"serviceId\":\"jyh\"},{\"name\":\"p\",\"serviceId\":\"rryklleynqan\"}]},\"id\":\"igglclwalhvub\",\"name\":\"gzphetxd\",\"type\":\"cmyc\"}"; - - 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)); - - DotNetComponent response = manager.dotNetComponents() - .getWithResponse("zlhhfix", "cfculzj", "mhpfywvy", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals(DotNetComponentType.ASPIRE_RESOURCE_SERVER_API, response.componentType()); - Assertions.assertEquals("oxinunjlzkdr", response.configurations().get(0).propertyName()); - Assertions.assertEquals("qsxytqqtcmiw", response.configurations().get(0).value()); - Assertions.assertEquals("m", response.serviceBinds().get(0).name()); - Assertions.assertEquals("jyh", response.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListMockTests.java deleted file mode 100644 index 63366437f67a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListMockTests.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.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.DotNetComponent; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -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 DotNetComponentsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Canceled\",\"configurations\":[{\"propertyName\":\"ixyqhfnkvy\",\"value\":\"qqdseipnquwzxhrp\"},{\"propertyName\":\"odlhkfktl\",\"value\":\"dsobjopnouhbq\"},{\"propertyName\":\"kqxs\",\"value\":\"uzyigfcvcewbwqhd\"}],\"serviceBinds\":[{\"name\":\"atm\",\"serviceId\":\"c\"},{\"name\":\"zdfsqxhyqmr\",\"serviceId\":\"parn\"}]},\"id\":\"grszrbwtdrcwg\",\"name\":\"w\",\"type\":\"l\"}]}"; - - 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.dotNetComponents().list("ceov", "gzwhsxyrujmtik", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, response.iterator().next().componentType()); - Assertions.assertEquals("ixyqhfnkvy", response.iterator().next().configurations().get(0).propertyName()); - Assertions.assertEquals("qqdseipnquwzxhrp", response.iterator().next().configurations().get(0).value()); - Assertions.assertEquals("atm", response.iterator().next().serviceBinds().get(0).name()); - Assertions.assertEquals("c", response.iterator().next().serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVariableTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVariableTests.java deleted file mode 100644 index e1434bf5a7d4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVariableTests.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.EnvironmentVariable; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentVariableTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentVariable model = BinaryData.fromString("{\"name\":\"szdtmhrkwof\",\"value\":\"yvoqa\"}") - .toObject(EnvironmentVariable.class); - Assertions.assertEquals("szdtmhrkwof", model.name()); - Assertions.assertEquals("yvoqa", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVariable model = new EnvironmentVariable().withName("szdtmhrkwof").withValue("yvoqa"); - model = BinaryData.fromObject(model).toObject(EnvironmentVariable.class); - Assertions.assertEquals("szdtmhrkwof", model.name()); - Assertions.assertEquals("yvoqa", model.value()); - } -} 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 2ef2ffb9678a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.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.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\":\"gsyocogj\",\"type\":\"CustomLocation\"}") - .toObject(ExtendedLocation.class); - Assertions.assertEquals("gsyocogj", model.name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtendedLocation model - = new ExtendedLocation().withName("gsyocogj").withType(ExtendedLocationTypes.CUSTOM_LOCATION); - model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); - Assertions.assertEquals("gsyocogj", 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 f181e726332b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.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.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\":\"Custom\",\"customHostHeaderName\":\"yfsoppu\",\"customProtoHeaderName\":\"esnzwde\"}") - .toObject(ForwardProxy.class); - Assertions.assertEquals(ForwardProxyConvention.CUSTOM, model.convention()); - Assertions.assertEquals("yfsoppu", model.customHostHeaderName()); - Assertions.assertEquals("esnzwde", model.customProtoHeaderName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ForwardProxy model = new ForwardProxy().withConvention(ForwardProxyConvention.CUSTOM) - .withCustomHostHeaderName("yfsoppu").withCustomProtoHeaderName("esnzwde"); - model = BinaryData.fromObject(model).toObject(ForwardProxy.class); - Assertions.assertEquals(ForwardProxyConvention.CUSTOM, model.convention()); - Assertions.assertEquals("yfsoppu", model.customHostHeaderName()); - Assertions.assertEquals("esnzwde", 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 110f45d9daee..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.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.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\":\"RedirectToLoginPage\",\"redirectToProvider\":\"rkujy\",\"excludedPaths\":[\"eju\"]}") - .toObject(GlobalValidation.class); - Assertions.assertEquals(UnauthenticatedClientActionV2.REDIRECT_TO_LOGIN_PAGE, - model.unauthenticatedClientAction()); - Assertions.assertEquals("rkujy", model.redirectToProvider()); - Assertions.assertEquals("eju", model.excludedPaths().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GlobalValidation model = new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.REDIRECT_TO_LOGIN_PAGE) - .withRedirectToProvider("rkujy").withExcludedPaths(Arrays.asList("eju")); - model = BinaryData.fromObject(model).toObject(GlobalValidation.class); - Assertions.assertEquals(UnauthenticatedClientActionV2.REDIRECT_TO_LOGIN_PAGE, - model.unauthenticatedClientAction()); - Assertions.assertEquals("rkujy", model.redirectToProvider()); - Assertions.assertEquals("eju", model.excludedPaths().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchMatchTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchMatchTests.java deleted file mode 100644 index 515a6c0da528..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchMatchTests.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.fluent.models.HeaderMatchMatch; -import org.junit.jupiter.api.Assertions; - -public final class HeaderMatchMatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HeaderMatchMatch model = BinaryData.fromString( - "{\"exactMatch\":\"wjzrnfygxgisp\",\"prefixMatch\":\"vtz\",\"suffixMatch\":\"ufubl\",\"regexMatch\":\"fxqeof\"}") - .toObject(HeaderMatchMatch.class); - Assertions.assertEquals("wjzrnfygxgisp", model.exactMatch()); - Assertions.assertEquals("vtz", model.prefixMatch()); - Assertions.assertEquals("ufubl", model.suffixMatch()); - Assertions.assertEquals("fxqeof", model.regexMatch()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HeaderMatchMatch model = new HeaderMatchMatch().withExactMatch("wjzrnfygxgisp").withPrefixMatch("vtz") - .withSuffixMatch("ufubl").withRegexMatch("fxqeof"); - model = BinaryData.fromObject(model).toObject(HeaderMatchMatch.class); - Assertions.assertEquals("wjzrnfygxgisp", model.exactMatch()); - Assertions.assertEquals("vtz", model.prefixMatch()); - Assertions.assertEquals("ufubl", model.suffixMatch()); - Assertions.assertEquals("fxqeof", model.regexMatch()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchTests.java deleted file mode 100644 index 4e1a115aee8d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchTests.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.HeaderMatch; -import org.junit.jupiter.api.Assertions; - -public final class HeaderMatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HeaderMatch model = BinaryData.fromString( - "{\"header\":\"uybbkpodep\",\"match\":{\"exactMatch\":\"inuvamiheogn\",\"prefixMatch\":\"xzxtheo\",\"suffixMatch\":\"si\",\"regexMatch\":\"evcciqihnhun\"}}") - .toObject(HeaderMatch.class); - Assertions.assertEquals("uybbkpodep", model.headerProperty()); - Assertions.assertEquals("inuvamiheogn", model.exactMatch()); - Assertions.assertEquals("xzxtheo", model.prefixMatch()); - Assertions.assertEquals("si", model.suffixMatch()); - Assertions.assertEquals("evcciqihnhun", model.regexMatch()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HeaderMatch model = new HeaderMatch().withHeaderProperty("uybbkpodep").withExactMatch("inuvamiheogn") - .withPrefixMatch("xzxtheo").withSuffixMatch("si").withRegexMatch("evcciqihnhun"); - model = BinaryData.fromObject(model).toObject(HeaderMatch.class); - Assertions.assertEquals("uybbkpodep", model.headerProperty()); - Assertions.assertEquals("inuvamiheogn", model.exactMatch()); - Assertions.assertEquals("xzxtheo", model.prefixMatch()); - Assertions.assertEquals("si", model.suffixMatch()); - Assertions.assertEquals("evcciqihnhun", model.regexMatch()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpConnectionPoolTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpConnectionPoolTests.java deleted file mode 100644 index 5662a4ebc19c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpConnectionPoolTests.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.HttpConnectionPool; -import org.junit.jupiter.api.Assertions; - -public final class HttpConnectionPoolTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpConnectionPool model - = BinaryData.fromString("{\"http1MaxPendingRequests\":5903092,\"http2MaxRequests\":1154409847}") - .toObject(HttpConnectionPool.class); - Assertions.assertEquals(5903092, model.http1MaxPendingRequests()); - Assertions.assertEquals(1154409847, model.http2MaxRequests()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpConnectionPool model - = new HttpConnectionPool().withHttp1MaxPendingRequests(5903092).withHttp2MaxRequests(1154409847); - model = BinaryData.fromObject(model).toObject(HttpConnectionPool.class); - Assertions.assertEquals(5903092, model.http1MaxPendingRequests()); - Assertions.assertEquals(1154409847, model.http2MaxRequests()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpGetTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpGetTests.java deleted file mode 100644 index a6cf972503e0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpGetTests.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.HttpGet; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class HttpGetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpGet model = BinaryData - .fromString( - "{\"url\":\"auvfbtkuwhhmhyk\",\"fileName\":\"oxafn\",\"headers\":[\"pichkoymkcdy\",\"bpkkpwdre\"]}") - .toObject(HttpGet.class); - Assertions.assertEquals("auvfbtkuwhhmhyk", model.url()); - Assertions.assertEquals("oxafn", model.fileName()); - Assertions.assertEquals("pichkoymkcdy", model.headers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpGet model = new HttpGet().withUrl("auvfbtkuwhhmhyk").withFileName("oxafn") - .withHeaders(Arrays.asList("pichkoymkcdy", "bpkkpwdre")); - model = BinaryData.fromObject(model).toObject(HttpGet.class); - Assertions.assertEquals("auvfbtkuwhhmhyk", model.url()); - Assertions.assertEquals("oxafn", model.fileName()); - Assertions.assertEquals("pichkoymkcdy", model.headers().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpRetryPolicyRetryBackOffTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpRetryPolicyRetryBackOffTests.java deleted file mode 100644 index 42af511c7a7a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpRetryPolicyRetryBackOffTests.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.HttpRetryPolicyRetryBackOff; -import org.junit.jupiter.api.Assertions; - -public final class HttpRetryPolicyRetryBackOffTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpRetryPolicyRetryBackOff model = BinaryData.fromString( - "{\"initialDelayInMilliseconds\":2232295730634911769,\"maxIntervalInMilliseconds\":8368000594620652423}") - .toObject(HttpRetryPolicyRetryBackOff.class); - Assertions.assertEquals(2232295730634911769L, model.initialDelayInMilliseconds()); - Assertions.assertEquals(8368000594620652423L, model.maxIntervalInMilliseconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpRetryPolicyRetryBackOff model = new HttpRetryPolicyRetryBackOff() - .withInitialDelayInMilliseconds(2232295730634911769L).withMaxIntervalInMilliseconds(8368000594620652423L); - model = BinaryData.fromObject(model).toObject(HttpRetryPolicyRetryBackOff.class); - Assertions.assertEquals(2232295730634911769L, model.initialDelayInMilliseconds()); - Assertions.assertEquals(8368000594620652423L, model.maxIntervalInMilliseconds()); - } -} 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 f55fbf7cff92..000000000000 --- 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\":\"gacftadeh\"}").toObject(HttpSettingsRoutes.class); - Assertions.assertEquals("gacftadeh", model.apiPrefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpSettingsRoutes model = new HttpSettingsRoutes().withApiPrefix("gacftadeh"); - model = BinaryData.fromObject(model).toObject(HttpSettingsRoutes.class); - Assertions.assertEquals("gacftadeh", 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 7d131968d937..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsTests.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.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\":\"jzzvdud\"},\"forwardProxy\":{\"convention\":\"NoProxy\",\"customHostHeaderName\":\"fhotw\",\"customProtoHeaderName\":\"ynpwlbj\"}}") - .toObject(HttpSettings.class); - Assertions.assertEquals(false, model.requireHttps()); - Assertions.assertEquals("jzzvdud", model.routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.forwardProxy().convention()); - Assertions.assertEquals("fhotw", model.forwardProxy().customHostHeaderName()); - Assertions.assertEquals("ynpwlbj", model.forwardProxy().customProtoHeaderName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpSettings model - = new HttpSettings().withRequireHttps(false).withRoutes(new HttpSettingsRoutes().withApiPrefix("jzzvdud")) - .withForwardProxy(new ForwardProxy().withConvention(ForwardProxyConvention.NO_PROXY) - .withCustomHostHeaderName("fhotw").withCustomProtoHeaderName("ynpwlbj")); - model = BinaryData.fromObject(model).toObject(HttpSettings.class); - Assertions.assertEquals(false, model.requireHttps()); - Assertions.assertEquals("jzzvdud", model.routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.forwardProxy().convention()); - Assertions.assertEquals("fhotw", model.forwardProxy().customHostHeaderName()); - Assertions.assertEquals("ynpwlbj", model.forwardProxy().customProtoHeaderName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressPortMappingTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressPortMappingTests.java deleted file mode 100644 index 71de6b53f387..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressPortMappingTests.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.IngressPortMapping; -import org.junit.jupiter.api.Assertions; - -public final class IngressPortMappingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IngressPortMapping model - = BinaryData.fromString("{\"external\":true,\"targetPort\":2060980520,\"exposedPort\":200260047}") - .toObject(IngressPortMapping.class); - Assertions.assertEquals(true, model.external()); - Assertions.assertEquals(2060980520, model.targetPort()); - Assertions.assertEquals(200260047, model.exposedPort()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IngressPortMapping model - = new IngressPortMapping().withExternal(true).withTargetPort(2060980520).withExposedPort(200260047); - model = BinaryData.fromObject(model).toObject(IngressPortMapping.class); - Assertions.assertEquals(true, model.external()); - Assertions.assertEquals(2060980520, model.targetPort()); - Assertions.assertEquals(200260047, model.exposedPort()); - } -} 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 f5793c8ace6b..000000000000 --- 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\":\"none\"}").toObject(IngressStickySessions.class); - Assertions.assertEquals(Affinity.NONE, model.affinity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IngressStickySessions model = new IngressStickySessions().withAffinity(Affinity.NONE); - model = BinaryData.fromObject(model).toObject(IngressStickySessions.class); - Assertions.assertEquals(Affinity.NONE, 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 468f27b140ff..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.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.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\":\"lfzxiavrmbzonoki\",\"description\":\"jq\",\"ipAddressRange\":\"irgzp\",\"action\":\"Deny\"}") - .toObject(IpSecurityRestrictionRule.class); - Assertions.assertEquals("lfzxiavrmbzonoki", model.name()); - Assertions.assertEquals("jq", model.description()); - Assertions.assertEquals("irgzp", model.ipAddressRange()); - Assertions.assertEquals(Action.DENY, model.action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpSecurityRestrictionRule model = new IpSecurityRestrictionRule().withName("lfzxiavrmbzonoki") - .withDescription("jq").withIpAddressRange("irgzp").withAction(Action.DENY); - model = BinaryData.fromObject(model).toObject(IpSecurityRestrictionRule.class); - Assertions.assertEquals("lfzxiavrmbzonoki", model.name()); - Assertions.assertEquals("jq", model.description()); - Assertions.assertEquals("irgzp", model.ipAddressRange()); - Assertions.assertEquals(Action.DENY, model.action()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentConfigurationPropertyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentConfigurationPropertyTests.java deleted file mode 100644 index 08a4978c304c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentConfigurationPropertyTests.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.JavaComponentConfigurationProperty; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentConfigurationPropertyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentConfigurationProperty model - = BinaryData.fromString("{\"propertyName\":\"ltn\",\"value\":\"dhqoawj\"}") - .toObject(JavaComponentConfigurationProperty.class); - Assertions.assertEquals("ltn", model.propertyName()); - Assertions.assertEquals("dhqoawj", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentConfigurationProperty model - = new JavaComponentConfigurationProperty().withPropertyName("ltn").withValue("dhqoawj"); - model = BinaryData.fromObject(model).toObject(JavaComponentConfigurationProperty.class); - Assertions.assertEquals("ltn", model.propertyName()); - Assertions.assertEquals("dhqoawj", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentInnerTests.java deleted file mode 100644 index 3a1c3198ceca..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentInnerTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentInner model = BinaryData.fromString( - "{\"properties\":{\"componentType\":\"SpringBootAdmin\",\"provisioningState\":\"Canceled\",\"configurations\":[{\"propertyName\":\"p\",\"value\":\"kdqzrdzsylo\"}],\"serviceBinds\":[{\"name\":\"rc\",\"serviceId\":\"ydmxzj\"},{\"name\":\"p\",\"serviceId\":\"aurkihcirlde\"},{\"name\":\"rdcoxnbkkj\",\"serviceId\":\"urnnqbnqbpiz\"},{\"name\":\"ltgrdogypxrxv\",\"serviceId\":\"ihwuhvctafsrbxrb\"}]},\"id\":\"li\",\"name\":\"wxihs\",\"type\":\"nxw\"}") - .toObject(JavaComponentInner.class); - Assertions.assertEquals(JavaComponentType.SPRING_BOOT_ADMIN, model.componentType()); - Assertions.assertEquals("p", model.configurations().get(0).propertyName()); - Assertions.assertEquals("kdqzrdzsylo", model.configurations().get(0).value()); - Assertions.assertEquals("rc", model.serviceBinds().get(0).name()); - Assertions.assertEquals("ydmxzj", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentInner model = new JavaComponentInner().withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) - .withConfigurations( - Arrays.asList(new JavaComponentConfigurationProperty().withPropertyName("p").withValue("kdqzrdzsylo"))) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("rc").withServiceId("ydmxzj"), - new JavaComponentServiceBind().withName("p").withServiceId("aurkihcirlde"), - new JavaComponentServiceBind().withName("rdcoxnbkkj").withServiceId("urnnqbnqbpiz"), - new JavaComponentServiceBind().withName("ltgrdogypxrxv").withServiceId("ihwuhvctafsrbxrb"))); - model = BinaryData.fromObject(model).toObject(JavaComponentInner.class); - Assertions.assertEquals(JavaComponentType.SPRING_BOOT_ADMIN, model.componentType()); - Assertions.assertEquals("p", model.configurations().get(0).propertyName()); - Assertions.assertEquals("kdqzrdzsylo", model.configurations().get(0).value()); - Assertions.assertEquals("rc", model.serviceBinds().get(0).name()); - Assertions.assertEquals("ydmxzj", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentPropertiesTests.java deleted file mode 100644 index a72e3d59057f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentPropertiesTests.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.fluent.models.JavaComponentProperties; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentProperties model = BinaryData.fromString( - "{\"componentType\":\"SpringCloudConfig\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"aklsbsbq\",\"value\":\"agwwrxaom\"}],\"serviceBinds\":[{\"name\":\"lrrcz\",\"serviceId\":\"k\"}]}") - .toObject(JavaComponentProperties.class); - Assertions.assertEquals(JavaComponentType.SPRING_CLOUD_CONFIG, model.componentType()); - Assertions.assertEquals("aklsbsbq", model.configurations().get(0).propertyName()); - Assertions.assertEquals("agwwrxaom", model.configurations().get(0).value()); - Assertions.assertEquals("lrrcz", model.serviceBinds().get(0).name()); - Assertions.assertEquals("k", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentProperties model - = new JavaComponentProperties().withComponentType(JavaComponentType.SPRING_CLOUD_CONFIG) - .withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("aklsbsbq").withValue("agwwrxaom"))) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("lrrcz").withServiceId("k"))); - model = BinaryData.fromObject(model).toObject(JavaComponentProperties.class); - Assertions.assertEquals(JavaComponentType.SPRING_CLOUD_CONFIG, model.componentType()); - Assertions.assertEquals("aklsbsbq", model.configurations().get(0).propertyName()); - Assertions.assertEquals("agwwrxaom", model.configurations().get(0).value()); - Assertions.assertEquals("lrrcz", model.serviceBinds().get(0).name()); - Assertions.assertEquals("k", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentServiceBindTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentServiceBindTests.java deleted file mode 100644 index 218d76e5d695..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentServiceBindTests.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.JavaComponentServiceBind; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentServiceBindTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentServiceBind model = BinaryData.fromString("{\"name\":\"yueayfbpcmsp\",\"serviceId\":\"yrrueqth\"}") - .toObject(JavaComponentServiceBind.class); - Assertions.assertEquals("yueayfbpcmsp", model.name()); - Assertions.assertEquals("yrrueqth", model.serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentServiceBind model - = new JavaComponentServiceBind().withName("yueayfbpcmsp").withServiceId("yrrueqth"); - model = BinaryData.fromObject(model).toObject(JavaComponentServiceBind.class); - Assertions.assertEquals("yueayfbpcmsp", model.name()); - Assertions.assertEquals("yrrueqth", model.serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCollectionTests.java deleted file mode 100644 index 3b76ca16ca1b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCollectionTests.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.fluent.models.JavaComponentInner; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; -import com.azure.resourcemanager.appcontainers.models.JavaComponentsCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentsCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentsCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"componentType\":\"SpringBootAdmin\",\"provisioningState\":\"Failed\",\"configurations\":[{\"propertyName\":\"jwuive\",\"value\":\"cgyee\"}],\"serviceBinds\":[{\"name\":\"qbpsmg\",\"serviceId\":\"guamlj\"}]},\"id\":\"rgmsplzga\",\"name\":\"fcshh\",\"type\":\"new\"},{\"properties\":{\"componentType\":\"SpringCloudConfig\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"nxrjkixtwbtaoy\",\"value\":\"yghs\"}],\"serviceBinds\":[{\"name\":\"lhkgmnsghp\",\"serviceId\":\"cphdrwjjkhvyo\"}]},\"id\":\"c\",\"name\":\"u\",\"type\":\"vxnqmhrpqpd\"}],\"nextLink\":\"mkoisqcssf\"}") - .toObject(JavaComponentsCollection.class); - Assertions.assertEquals(JavaComponentType.SPRING_BOOT_ADMIN, model.value().get(0).componentType()); - Assertions.assertEquals("jwuive", model.value().get(0).configurations().get(0).propertyName()); - Assertions.assertEquals("cgyee", model.value().get(0).configurations().get(0).value()); - Assertions.assertEquals("qbpsmg", model.value().get(0).serviceBinds().get(0).name()); - Assertions.assertEquals("guamlj", model.value().get(0).serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentsCollection model - = new JavaComponentsCollection() - .withValue( - Arrays - .asList( - new JavaComponentInner().withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) - .withConfigurations(Arrays.asList(new JavaComponentConfigurationProperty() - .withPropertyName("jwuive").withValue("cgyee"))) - .withServiceBinds(Arrays - .asList(new JavaComponentServiceBind().withName("qbpsmg").withServiceId("guamlj"))), - new JavaComponentInner().withComponentType(JavaComponentType.SPRING_CLOUD_CONFIG) - .withConfigurations(Arrays.asList(new JavaComponentConfigurationProperty() - .withPropertyName("nxrjkixtwbtaoy").withValue("yghs"))) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("lhkgmnsghp") - .withServiceId("cphdrwjjkhvyo"))))); - model = BinaryData.fromObject(model).toObject(JavaComponentsCollection.class); - Assertions.assertEquals(JavaComponentType.SPRING_BOOT_ADMIN, model.value().get(0).componentType()); - Assertions.assertEquals("jwuive", model.value().get(0).configurations().get(0).propertyName()); - Assertions.assertEquals("cgyee", model.value().get(0).configurations().get(0).value()); - Assertions.assertEquals("qbpsmg", model.value().get(0).serviceBinds().get(0).name()); - Assertions.assertEquals("guamlj", model.value().get(0).serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateMockTests.java deleted file mode 100644 index 746ef359e6b3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateMockTests.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.JavaComponent; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JavaComponentsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"componentType\":\"SpringCloudEureka\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"wmmkfq\",\"value\":\"iqulwwtrjmeq\"},{\"propertyName\":\"yhzok\",\"value\":\"yuoh\"},{\"propertyName\":\"nsnaajphmp\",\"value\":\"jnglpwsad\"},{\"propertyName\":\"jsumxpezcoio\",\"value\":\"rmfqzwq\"}],\"serviceBinds\":[{\"name\":\"eedcnwmywx\",\"serviceId\":\"zkvemy\"},{\"name\":\"pczaqpqif\",\"serviceId\":\"m\"},{\"name\":\"rwtx\",\"serviceId\":\"isamonatniz\"}]},\"id\":\"r\",\"name\":\"qsqjghrmthsplwst\",\"type\":\"xsrgxfqpan\"}"; - - 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)); - - JavaComponent response = manager.javaComponents().define("tpjfojiunrlshxuk") - .withExistingManagedEnvironment("misvpztd", "vykpxkqe") - .withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) - .withConfigurations( - Arrays.asList(new JavaComponentConfigurationProperty().withPropertyName("oancdrco").withValue("vx"), - new JavaComponentConfigurationProperty().withPropertyName("dxonckbn").withValue("lfxlupibaqzizxzp"), - new JavaComponentConfigurationProperty().withPropertyName("eghlw").withValue("ogvgfklqiyn"), - new JavaComponentConfigurationProperty().withPropertyName("eqelsb").withValue("dstrkzxsgtz"))) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("rds").withServiceId("vpimyndnoxa"), - new JavaComponentServiceBind().withName("rqaqotn").withServiceId("xolousdv"), - new JavaComponentServiceBind().withName("ptqmawzjdrpiz").withServiceId("l"))) - .create(); - - Assertions.assertEquals(JavaComponentType.SPRING_CLOUD_EUREKA, response.componentType()); - Assertions.assertEquals("wmmkfq", response.configurations().get(0).propertyName()); - Assertions.assertEquals("iqulwwtrjmeq", response.configurations().get(0).value()); - Assertions.assertEquals("eedcnwmywx", response.serviceBinds().get(0).name()); - Assertions.assertEquals("zkvemy", response.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetWithResponseMockTests.java deleted file mode 100644 index bf495efd54f7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetWithResponseMockTests.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.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.JavaComponent; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; -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 JavaComponentsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"componentType\":\"SpringCloudEureka\",\"provisioningState\":\"Canceled\",\"configurations\":[{\"propertyName\":\"sc\",\"value\":\"ydzjemexm\"},{\"propertyName\":\"kvmuwrxlniwmcp\",\"value\":\"rdlhvdvmiphbe\"},{\"propertyName\":\"qjzmhkdcl\",\"value\":\"roczfmuner\"}],\"serviceBinds\":[{\"name\":\"xzs\",\"serviceId\":\"zezbzu\"},{\"name\":\"dlevzskejcgw\",\"serviceId\":\"gqkstyecupyu\"},{\"name\":\"p\",\"serviceId\":\"davsjcfmazpz\"},{\"name\":\"wuzvcmcokxize\",\"serviceId\":\"vfrjwu\"}]},\"id\":\"o\",\"name\":\"zvajbvbnkrdem\",\"type\":\"idackzidgzwdyd\"}"; - - 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)); - - JavaComponent response = manager.javaComponents() - .getWithResponse("zqazvb", "arkptgongruatsyi", "sjqhenigbeqngu", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(JavaComponentType.SPRING_CLOUD_EUREKA, response.componentType()); - Assertions.assertEquals("sc", response.configurations().get(0).propertyName()); - Assertions.assertEquals("ydzjemexm", response.configurations().get(0).value()); - Assertions.assertEquals("xzs", response.serviceBinds().get(0).name()); - Assertions.assertEquals("zezbzu", response.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListMockTests.java deleted file mode 100644 index b1d025f1f7e8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListMockTests.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.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.JavaComponent; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; -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 JavaComponentsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"componentType\":\"SpringCloudConfig\",\"provisioningState\":\"InProgress\",\"configurations\":[{\"propertyName\":\"rshzzbgullcxiqqz\",\"value\":\"oxdu\"},{\"propertyName\":\"amglrouig\",\"value\":\"fivjqterdqqigdy\"}],\"serviceBinds\":[{\"name\":\"p\",\"serviceId\":\"rwqirvtktyhhmvf\"},{\"name\":\"apj\",\"serviceId\":\"odmkrrwepgqv\"},{\"name\":\"kqlujqgira\",\"serviceId\":\"lyvxchp\"}]},\"id\":\"ctsfaeuhwwsknst\",\"name\":\"zuzhasup\",\"type\":\"lppdpgz\"}]}"; - - 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.javaComponents().list("oq", "dedecfiwh", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(JavaComponentType.SPRING_CLOUD_CONFIG, response.iterator().next().componentType()); - Assertions.assertEquals("rshzzbgullcxiqqz", response.iterator().next().configurations().get(0).propertyName()); - Assertions.assertEquals("oxdu", response.iterator().next().configurations().get(0).value()); - Assertions.assertEquals("p", response.iterator().next().serviceBinds().get(0).name()); - Assertions.assertEquals("rwqirvtktyhhmvf", response.iterator().next().serviceBinds().get(0).serviceId()); - } -} 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 d038c4d341ef..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationManualTriggerConfigTests.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.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\":666781891,\"parallelism\":385989453}") - .toObject(JobConfigurationManualTriggerConfig.class); - Assertions.assertEquals(666781891, model.replicaCompletionCount()); - Assertions.assertEquals(385989453, model.parallelism()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobConfigurationManualTriggerConfig model = new JobConfigurationManualTriggerConfig() - .withReplicaCompletionCount(666781891).withParallelism(385989453); - model = BinaryData.fromObject(model).toObject(JobConfigurationManualTriggerConfig.class); - Assertions.assertEquals(666781891, model.replicaCompletionCount()); - Assertions.assertEquals(385989453, 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 b510e6f962db..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationScheduleTriggerConfigTests.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.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\":530591598,\"cronExpression\":\"rds\",\"parallelism\":1544209565}") - .toObject(JobConfigurationScheduleTriggerConfig.class); - Assertions.assertEquals(530591598, model.replicaCompletionCount()); - Assertions.assertEquals("rds", model.cronExpression()); - Assertions.assertEquals(1544209565, model.parallelism()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobConfigurationScheduleTriggerConfig model = new JobConfigurationScheduleTriggerConfig() - .withReplicaCompletionCount(530591598).withCronExpression("rds").withParallelism(1544209565); - model = BinaryData.fromObject(model).toObject(JobConfigurationScheduleTriggerConfig.class); - Assertions.assertEquals(530591598, model.replicaCompletionCount()); - Assertions.assertEquals("rds", model.cronExpression()); - Assertions.assertEquals(1544209565, 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 a21e9edc9774..000000000000 --- 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\":\"olvdnd\",\"id\":\"auo\"}").toObject(JobExecutionBaseInner.class); - Assertions.assertEquals("olvdnd", model.name()); - Assertions.assertEquals("auo", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobExecutionBaseInner model = new JobExecutionBaseInner().withName("olvdnd").withId("auo"); - model = BinaryData.fromObject(model).toObject(JobExecutionBaseInner.class); - Assertions.assertEquals("olvdnd", model.name()); - Assertions.assertEquals("auo", model.id()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionInnerTests.java deleted file mode 100644 index 6dd1b13a2971..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionInnerTests.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.util.BinaryData; -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 JobExecutionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobExecutionInner model = BinaryData.fromString( - "{\"name\":\"herngb\",\"id\":\"juahokqto\",\"type\":\"auxofshfph\",\"properties\":{\"status\":\"Unknown\",\"startTime\":\"2021-02-08T14:31:19Z\",\"endTime\":\"2021-11-07T16:30:06Z\",\"template\":{\"containers\":[{\"image\":\"ywhslwkojpllndnp\",\"name\":\"rpqaf\",\"command\":[\"gsnnf\"],\"args\":[\"tefypococtfjgti\"],\"env\":[{},{}],\"resources\":{\"cpu\":43.561702255466116,\"memory\":\"urmlmuo\",\"ephemeralStorage\":\"lbau\"}}],\"initContainers\":[{\"image\":\"ionszonwp\",\"name\":\"ajinnixjawrtmjfj\",\"command\":[\"cxlzhcoxovnekh\",\"nlusfnrd\",\"jxtxrdc\",\"tjvidt\"],\"args\":[\"puslvyj\"],\"env\":[{},{},{},{}],\"resources\":{\"cpu\":39.025050688905914,\"memory\":\"iziesfuughtuq\",\"ephemeralStorage\":\"cjxeygt\"}},{\"image\":\"xu\",\"name\":\"buew\",\"command\":[\"wnjlxu\"],\"args\":[\"wpusxjbaqehg\",\"dohzjq\"],\"env\":[{},{}],\"resources\":{\"cpu\":77.02751783750413,\"memory\":\"bxncnwfepbnw\",\"ephemeralStorage\":\"m\"}},{\"image\":\"gcgbjb\",\"name\":\"lfgtdysnaquflqbc\",\"command\":[\"amz\",\"rwd\",\"qzeqyjleziunjxdf\"],\"args\":[\"tkw\",\"eg\"],\"env\":[{},{}],\"resources\":{\"cpu\":57.4131663862715,\"memory\":\"qa\",\"ephemeralStorage\":\"jvpilguooqja\"}}]}}}") - .toObject(JobExecutionInner.class); - Assertions.assertEquals("herngb", model.name()); - Assertions.assertEquals("juahokqto", model.id()); - Assertions.assertEquals("auxofshfph", model.type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-08T14:31:19Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T16:30:06Z"), model.endTime()); - Assertions.assertEquals("ywhslwkojpllndnp", model.template().containers().get(0).image()); - Assertions.assertEquals("rpqaf", model.template().containers().get(0).name()); - Assertions.assertEquals("gsnnf", model.template().containers().get(0).command().get(0)); - Assertions.assertEquals("tefypococtfjgti", model.template().containers().get(0).args().get(0)); - Assertions.assertEquals(43.561702255466116D, model.template().containers().get(0).resources().cpu()); - Assertions.assertEquals("urmlmuo", model.template().containers().get(0).resources().memory()); - Assertions.assertEquals("ionszonwp", model.template().initContainers().get(0).image()); - Assertions.assertEquals("ajinnixjawrtmjfj", model.template().initContainers().get(0).name()); - Assertions.assertEquals("cxlzhcoxovnekh", model.template().initContainers().get(0).command().get(0)); - Assertions.assertEquals("puslvyj", model.template().initContainers().get(0).args().get(0)); - Assertions.assertEquals(39.025050688905914D, model.template().initContainers().get(0).resources().cpu()); - Assertions.assertEquals("iziesfuughtuq", model.template().initContainers().get(0).resources().memory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobExecutionInner model - = new JobExecutionInner().withName("herngb").withId("juahokqto").withType("auxofshfph") - .withStartTime(OffsetDateTime.parse("2021-02-08T14:31:19Z")).withEndTime( - OffsetDateTime.parse("2021-11-07T16:30:06Z")) - .withTemplate( - new JobExecutionTemplate() - .withContainers( - Arrays.asList(new JobExecutionContainer().withImage("ywhslwkojpllndnp").withName("rpqaf") - .withCommand(Arrays.asList("gsnnf")).withArgs(Arrays.asList("tefypococtfjgti")) - .withEnv(Arrays.asList(new EnvironmentVar(), new EnvironmentVar())) - .withResources(new ContainerResources().withCpu(43.561702255466116D) - .withMemory("urmlmuo")))) - .withInitContainers(Arrays.asList( - new JobExecutionContainer().withImage("ionszonwp").withName("ajinnixjawrtmjfj") - .withCommand(Arrays.asList("cxlzhcoxovnekh", "nlusfnrd", "jxtxrdc", "tjvidt")) - .withArgs(Arrays.asList("puslvyj")) - .withEnv(Arrays.asList(new EnvironmentVar(), new EnvironmentVar(), new EnvironmentVar(), - new EnvironmentVar())) - .withResources( - new ContainerResources().withCpu(39.025050688905914D).withMemory("iziesfuughtuq")), - new JobExecutionContainer().withImage("xu").withName("buew") - .withCommand(Arrays.asList("wnjlxu")).withArgs(Arrays.asList("wpusxjbaqehg", "dohzjq")) - .withEnv(Arrays.asList(new EnvironmentVar(), new EnvironmentVar())).withResources( - new ContainerResources().withCpu(77.02751783750413D).withMemory("bxncnwfepbnw")), - new JobExecutionContainer().withImage("gcgbjb").withName("lfgtdysnaquflqbc") - .withCommand(Arrays.asList("amz", "rwd", "qzeqyjleziunjxdf")) - .withArgs(Arrays.asList("tkw", "eg")) - .withEnv(Arrays.asList(new EnvironmentVar(), new EnvironmentVar())) - .withResources(new ContainerResources().withCpu(57.4131663862715D).withMemory("qa"))))); - model = BinaryData.fromObject(model).toObject(JobExecutionInner.class); - Assertions.assertEquals("herngb", model.name()); - Assertions.assertEquals("juahokqto", model.id()); - Assertions.assertEquals("auxofshfph", model.type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-08T14:31:19Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T16:30:06Z"), model.endTime()); - Assertions.assertEquals("ywhslwkojpllndnp", model.template().containers().get(0).image()); - Assertions.assertEquals("rpqaf", model.template().containers().get(0).name()); - Assertions.assertEquals("gsnnf", model.template().containers().get(0).command().get(0)); - Assertions.assertEquals("tefypococtfjgti", model.template().containers().get(0).args().get(0)); - Assertions.assertEquals(43.561702255466116D, model.template().containers().get(0).resources().cpu()); - Assertions.assertEquals("urmlmuo", model.template().containers().get(0).resources().memory()); - Assertions.assertEquals("ionszonwp", model.template().initContainers().get(0).image()); - Assertions.assertEquals("ajinnixjawrtmjfj", model.template().initContainers().get(0).name()); - Assertions.assertEquals("cxlzhcoxovnekh", model.template().initContainers().get(0).command().get(0)); - Assertions.assertEquals("puslvyj", model.template().initContainers().get(0).args().get(0)); - Assertions.assertEquals(39.025050688905914D, model.template().initContainers().get(0).resources().cpu()); - Assertions.assertEquals("iziesfuughtuq", model.template().initContainers().get(0).resources().memory()); - } -} 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 7c1ebb65d5d7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteMockTests.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.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("reyxelyicghf", "rufssjyg", 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 973a22a95154..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListMockTests.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.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\":\"gnnbzrtf\",\"id\":\"dzuubjtvgjsxm\",\"type\":\"jjvavdpww\",\"properties\":{\"status\":\"Degraded\",\"startTime\":\"2021-08-09T18:08:13Z\",\"endTime\":\"2021-10-21T08:59:09Z\",\"template\":{\"containers\":[{\"image\":\"ofw\",\"name\":\"m\",\"command\":[\"cauwazcgwdfriwg\",\"bjpozokscvgllixd\",\"byfg\",\"ewqkjvxprwpxs\"],\"args\":[\"utxlcskltezu\"],\"env\":[{},{}],\"resources\":{}},{\"image\":\"lfb\",\"name\":\"dc\",\"command\":[\"srtmdylperpiltt\"],\"args\":[\"czfcmfpfbod\",\"tresr\"],\"env\":[{},{},{}],\"resources\":{}}],\"initContainers\":[{\"image\":\"ft\",\"name\":\"ivmuqkevzgjyp\",\"command\":[\"xmpdxxzetww\",\"jwotnxlkfhglhrf\"],\"args\":[\"wecr\"],\"env\":[{},{},{}],\"resources\":{}},{\"image\":\"selqxov\",\"name\":\"qibukklvzrl\",\"command\":[\"ccmetjsczivfqb\"],\"args\":[\"sdsyenzsie\",\"scplhyvd\",\"xlyzkxit\"],\"env\":[{},{},{},{}],\"resources\":{}},{\"image\":\"svkolru\",\"name\":\"ovmozsayebraz\",\"command\":[\"pzbtzuyk\",\"kipfsdyepf\",\"ocmbezacf\",\"ztgaz\"],\"args\":[\"ejgaaokct\"],\"env\":[{},{}],\"resources\":{}}]}}}]}"; - - 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("cy", "yzlwhbwzjnufzrf", "m", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("gnnbzrtf", response.iterator().next().name()); - Assertions.assertEquals("dzuubjtvgjsxm", response.iterator().next().id()); - Assertions.assertEquals("jjvavdpww", response.iterator().next().type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-09T18:08:13Z"), response.iterator().next().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-21T08:59:09Z"), response.iterator().next().endTime()); - Assertions.assertEquals("ofw", response.iterator().next().template().containers().get(0).image()); - Assertions.assertEquals("m", response.iterator().next().template().containers().get(0).name()); - Assertions.assertEquals("cauwazcgwdfriwg", - response.iterator().next().template().containers().get(0).command().get(0)); - Assertions.assertEquals("utxlcskltezu", - response.iterator().next().template().containers().get(0).args().get(0)); - Assertions.assertEquals("ft", response.iterator().next().template().initContainers().get(0).image()); - Assertions.assertEquals("ivmuqkevzgjyp", response.iterator().next().template().initContainers().get(0).name()); - Assertions.assertEquals("xmpdxxzetww", - response.iterator().next().template().initContainers().get(0).command().get(0)); - Assertions.assertEquals("wecr", response.iterator().next().template().initContainers().get(0).args().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorWithResponseMockTests.java deleted file mode 100644 index b6bcb58964d0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorWithResponseMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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 JobsGetDetectorWithResponseMockTests { - @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\":\"hbuubpy\",\"name\":\"wtjoxz\",\"description\":\"wfqchvcz\",\"author\":\"j\",\"category\":\"cta\",\"supportTopicList\":[{\"id\":\"rtpqpemhz\",\"pesId\":\"krepdqhqyhwqwem\"},{\"id\":\"qabckmzeoxin\",\"pesId\":\"re\"}],\"analysisTypes\":[\"whlpuzjpceezn\",\"angp\",\"bfaxyxzlbc\"],\"type\":\"hm\",\"score\":3.0061007},\"dataset\":[{\"table\":{\"tableName\":\"ndktxfv\",\"columns\":[{},{},{},{}],\"rows\":[\"dataqgpkrie\"]},\"renderingProperties\":{\"type\":1132775916,\"title\":\"xx\",\"description\":\"wzkyf\",\"isVisible\":true}},{\"table\":{\"tableName\":\"wxeiicrmpepk\",\"columns\":[{},{},{},{}],\"rows\":[\"dataxijvskwsdgkjgyac\"]},\"renderingProperties\":{\"type\":1775384365,\"title\":\"kwefc\",\"description\":\"inwoqartwyxq\",\"isVisible\":false}},{\"table\":{\"tableName\":\"vatdavuqmcbymsf\",\"columns\":[{},{}],\"rows\":[\"datauvjezcjumvps\",\"datamioyo\"]},\"renderingProperties\":{\"type\":671724843,\"title\":\"iqwnnraclibbfq\",\"description\":\"pkl\",\"isVisible\":false}},{\"table\":{\"tableName\":\"nhautwukexzgpmnm\",\"columns\":[{},{},{},{}],\"rows\":[\"dataqilwgdfpfqfpcvs\",\"dataclg\",\"datarvwerfwxbsmtb\"]},\"renderingProperties\":{\"type\":273842551,\"title\":\"hci\",\"description\":\"wdv\",\"isVisible\":true}}],\"status\":{\"message\":\"kqhs\",\"statusId\":811287506},\"dataProviderMetadata\":{\"providerName\":\"wpq\",\"propertyBag\":[{\"name\":\"uwyqwdq\",\"value\":\"mghg\"},{\"name\":\"z\",\"value\":\"lujkhn\"},{\"name\":\"mrnkfmkhcqtwml\",\"value\":\"jnqtqe\"},{\"name\":\"j\",\"value\":\"vragpokddx\"}]}},\"id\":\"hhkvguavtptbk\",\"name\":\"wkqyns\",\"type\":\"gbvoffbkk\"}"; - - 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.jobs() - .getDetectorWithResponse("qayfl", "iyu", "snuudtelvhyibdr", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("whlpuzjpceezn", response.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("ndktxfv", response.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(1132775916, response.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("xx", response.properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("wzkyf", response.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, response.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("kqhs", response.properties().status().message()); - Assertions.assertEquals(811287506, response.properties().status().statusId()); - Assertions.assertEquals("wpq", response.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("uwyqwdq", response.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("mghg", response.properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsWithResponseMockTests.java deleted file mode 100644 index 9efe3b6bc09f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsWithResponseMockTests.java +++ /dev/null @@ -1,59 +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 JobsListDetectorsWithResponseMockTests { - @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\":\"hdklmvetatl\",\"name\":\"fqoixwgiksbbvt\",\"description\":\"xrpo\",\"author\":\"phchgjtnhtukfaci\",\"category\":\"bfntumeezbxvq\",\"supportTopicList\":[{},{},{},{}],\"analysisTypes\":[\"wcgasgom\",\"mjzwx\"],\"type\":\"govsxpwwzt\",\"score\":71.73476},\"dataset\":[{},{},{},{}],\"status\":{\"message\":\"gfredmlscg\",\"statusId\":836747859},\"dataProviderMetadata\":{\"providerName\":\"na\",\"propertyBag\":[{},{},{}]}},\"id\":\"wazhpabaco\",\"name\":\"lyotg\",\"type\":\"wsxnsrqor\"},{\"properties\":{\"metadata\":{\"id\":\"mv\",\"name\":\"bxeetqujxcxxqn\",\"description\":\"qjkedwqurc\",\"author\":\"jmrvvxwjongz\",\"category\":\"hqqrsilcch\",\"supportTopicList\":[{},{}],\"analysisTypes\":[\"ansbvriaqg\",\"tojrulfucte\",\"rthcfjzh\",\"lyubqjrostvrjeq\"],\"type\":\"z\",\"score\":80.793976},\"dataset\":[{},{},{},{}],\"status\":{\"message\":\"rxalxrdha\",\"statusId\":1408690933},\"dataProviderMetadata\":{\"providerName\":\"sn\",\"propertyBag\":[{},{},{},{}]}},\"id\":\"a\",\"name\":\"iwkkvya\",\"type\":\"xkvvcs\"},{\"properties\":{\"metadata\":{\"id\":\"uvdjkqxetqm\",\"name\":\"ivrjjxnwxdc\",\"description\":\"ojxl\",\"author\":\"z\",\"category\":\"pgfquwzpwiibelwc\",\"supportTopicList\":[{},{}],\"analysisTypes\":[\"bpjxljtxbusqtb\"],\"type\":\"niuisdz\",\"score\":80.91173},\"dataset\":[{},{}],\"status\":{\"message\":\"agsecnadbuw\",\"statusId\":1642935539},\"dataProviderMetadata\":{\"providerName\":\"llmqiyne\",\"propertyBag\":[{},{}]}},\"id\":\"lnkkiiwvmtumxpym\",\"name\":\"jfuaxroqvqpilrgu\",\"type\":\"canlduwzorxs\"},{\"properties\":{\"metadata\":{\"id\":\"qk\",\"name\":\"ymxkqvfqepdx\",\"description\":\"tuubwyvpjb\",\"author\":\"cpj\",\"category\":\"uqgixex\",\"supportTopicList\":[{},{}],\"analysisTypes\":[\"wljavhuerkjddvrg\",\"iegftc\",\"biiftksdwgdnk\"],\"type\":\"gmwdh\",\"score\":87.856026},\"dataset\":[{},{}],\"status\":{\"message\":\"ldbglzout\",\"statusId\":1388435389},\"dataProviderMetadata\":{\"providerName\":\"zeka\",\"propertyBag\":[{},{}]}},\"id\":\"zg\",\"name\":\"norbjgmnzjot\",\"type\":\"mrxkhlobvv\"}],\"nextLink\":\"hvhd\"}"; - - 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.jobs().listDetectorsWithResponse("w", "ae", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("wcgasgom", response.value().get(0).properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("gfredmlscg", response.value().get(0).properties().status().message()); - Assertions.assertEquals(836747859, response.value().get(0).properties().status().statusId()); - Assertions.assertEquals("na", response.value().get(0).properties().dataProviderMetadata().providerName()); - } -} 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 c392a95255ff..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionMockTests.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.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("jsvlpg", "dnw", "ehaqidoyzltgio", 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 a5924215bfa8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsMockTests.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.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\":\"cyheqwbpqqncj\",\"id\":\"khjoz\",\"type\":\"mcwmbup\",\"properties\":{\"status\":\"Failed\",\"startTime\":\"2021-04-23T03:13:25Z\",\"endTime\":\"2021-08-31T23:28:22Z\",\"template\":{\"containers\":[{},{},{},{}],\"initContainers\":[{},{},{}]}}},{\"name\":\"bsvs\",\"id\":\"ieswhddzydisn\",\"type\":\"pywyjlnld\",\"properties\":{\"status\":\"Succeeded\",\"startTime\":\"2021-02-22T08:36:21Z\",\"endTime\":\"2021-08-08T07:22:04Z\",\"template\":{\"containers\":[{},{}],\"initContainers\":[{}]}}},{\"name\":\"zjihweebiphr\",\"id\":\"cjwqw\",\"type\":\"sratjhdhzyb\",\"properties\":{\"status\":\"Stopped\",\"startTime\":\"2021-04-15T18:17:15Z\",\"endTime\":\"2021-09-02T11:19:23Z\",\"template\":{\"containers\":[{},{},{},{}],\"initContainers\":[{},{}]}}}],\"nextLink\":\"v\"}"; - - 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("qoqpepiaeap", "sergdtpe", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("cyheqwbpqqncj", response.value().get(0).name()); - Assertions.assertEquals("khjoz", response.value().get(0).id()); - Assertions.assertEquals("mcwmbup", response.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-23T03:13:25Z"), response.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-31T23:28:22Z"), 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 4b359efc6ac8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.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.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\":[\"klj\",\"vbqid\"],\"allowedClientApplications\":[\"jzyulpk\",\"dj\"]}") - .toObject(JwtClaimChecks.class); - Assertions.assertEquals("klj", model.allowedGroups().get(0)); - Assertions.assertEquals("jzyulpk", model.allowedClientApplications().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JwtClaimChecks model = new JwtClaimChecks().withAllowedGroups(Arrays.asList("klj", "vbqid")) - .withAllowedClientApplications(Arrays.asList("jzyulpk", "dj")); - model = BinaryData.fromObject(model).toObject(JwtClaimChecks.class); - Assertions.assertEquals("klj", model.allowedGroups().get(0)); - Assertions.assertEquals("jzyulpk", 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 7e5a7723aab2..000000000000 --- 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\":\"rylniofrzg\"}").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/ListUsagesResultTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ListUsagesResultTests.java deleted file mode 100644 index b17b79c25492..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ListUsagesResultTests.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.fluent.models.UsageInner; -import com.azure.resourcemanager.appcontainers.models.ListUsagesResult; -import com.azure.resourcemanager.appcontainers.models.UsageName; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ListUsagesResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListUsagesResult model = BinaryData.fromString( - "{\"value\":[{\"currentValue\":1.2442172,\"limit\":34.942795,\"name\":{\"value\":\"j\",\"localizedValue\":\"cmyfqipgxhnpo\"}}],\"nextLink\":\"qwcabvnui\"}") - .toObject(ListUsagesResult.class); - Assertions.assertEquals(1.2442172f, model.value().get(0).currentValue()); - Assertions.assertEquals(34.942795f, model.value().get(0).limit()); - Assertions.assertEquals("j", model.value().get(0).name().value()); - Assertions.assertEquals("cmyfqipgxhnpo", model.value().get(0).name().localizedValue()); - Assertions.assertEquals("qwcabvnui", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListUsagesResult model = new ListUsagesResult() - .withValue(Arrays.asList(new UsageInner().withCurrentValue(1.2442172f).withLimit(34.942795f) - .withName(new UsageName().withValue("j").withLocalizedValue("cmyfqipgxhnpo")))) - .withNextLink("qwcabvnui"); - model = BinaryData.fromObject(model).toObject(ListUsagesResult.class); - Assertions.assertEquals(1.2442172f, model.value().get(0).currentValue()); - Assertions.assertEquals(34.942795f, model.value().get(0).limit()); - Assertions.assertEquals("j", model.value().get(0).name().value()); - Assertions.assertEquals("cmyfqipgxhnpo", model.value().get(0).name().localizedValue()); - Assertions.assertEquals("qwcabvnui", model.nextLink()); - } -} 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 c33d27beef8e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.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.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\":\"qvpkvlrxnjeaseip\"}").toObject(LoginRoutes.class); - Assertions.assertEquals("qvpkvlrxnjeaseip", model.logoutEndpoint()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoginRoutes model = new LoginRoutes().withLogoutEndpoint("qvpkvlrxnjeaseip"); - model = BinaryData.fromObject(model).toObject(LoginRoutes.class); - Assertions.assertEquals("qvpkvlrxnjeaseip", 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 5a453060b946..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginScopesTests.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.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\":[\"exhd\",\"xibqeojnx\"]}").toObject(LoginScopes.class); - Assertions.assertEquals("exhd", model.scopes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoginScopes model = new LoginScopes().withScopes(Arrays.asList("exhd", "xibqeojnx")); - model = BinaryData.fromObject(model).toObject(LoginScopes.class); - Assertions.assertEquals("exhd", model.scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogsConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogsConfigurationTests.java deleted file mode 100644 index 8398ff1f9b15..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogsConfigurationTests.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.LogsConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LogsConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogsConfiguration model - = BinaryData.fromString("{\"destinations\":[\"ebwtswb\"]}").toObject(LogsConfiguration.class); - Assertions.assertEquals("ebwtswb", model.destinations().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogsConfiguration model = new LogsConfiguration().withDestinations(Arrays.asList("ebwtswb")); - model = BinaryData.fromObject(model).toObject(LogsConfiguration.class); - Assertions.assertEquals("ebwtswb", model.destinations().get(0)); - } -} 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 6bfd34f59036..000000000000 --- 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\":{\"jmucftby\":\"mtrwah\"}}").toObject(ManagedCertificatePatch.class); - Assertions.assertEquals("mtrwah", model.tags().get("jmucftby")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedCertificatePatch model = new ManagedCertificatePatch().withTags(mapOf("jmucftby", "mtrwah")); - model = BinaryData.fromObject(model).toObject(ManagedCertificatePatch.class); - Assertions.assertEquals("mtrwah", model.tags().get("jmucftby")); - } - - // 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 73c1963e9591..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,52 +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("zaahzbhuroolkoli", "hhmo", "usuzgfjzcvaaxo", - 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 6f878ae0bd15..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests.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.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\":\"nazku\",\"name\":\"drey\",\"description\":\"whsetwwjwzzqs\",\"author\":\"zuukykcyqhyqq\",\"category\":\"dcykeyst\",\"supportTopicList\":[{\"id\":\"pazdazgbsqgp\",\"pesId\":\"q\"}],\"analysisTypes\":[\"tmdpvozglqjbknlz\",\"lctzeyowmndcovd\",\"zqauxzan\"],\"type\":\"kvfruwkudr\",\"score\":66.552605},\"dataset\":[{\"table\":{\"tableName\":\"dqyemebunaucm\",\"columns\":[{},{},{}],\"rows\":[\"dataeemmjauwcgx\"]},\"renderingProperties\":{\"type\":1976462334,\"title\":\"aitranizerw\",\"description\":\"dasmxu\",\"isVisible\":true}},{\"table\":{\"tableName\":\"gfcoc\",\"columns\":[{},{}],\"rows\":[\"dataiylfmpztrau\",\"datasvhl\",\"datadculregp\"]},\"renderingProperties\":{\"type\":1371553792,\"title\":\"hvrztnvg\",\"description\":\"hqrdgrtwmewjzlpy\",\"isVisible\":false}},{\"table\":{\"tableName\":\"zwjcaye\",\"columns\":[{},{}],\"rows\":[\"datansyby\",\"datapolwzrghsrlei\"]},\"renderingProperties\":{\"type\":1125068139,\"title\":\"jfncjwvuagfqw\",\"description\":\"tngvmreuptrklz\",\"isVisible\":true}}],\"status\":{\"message\":\"wo\",\"statusId\":1419456371},\"dataProviderMetadata\":{\"providerName\":\"aghm\",\"propertyBag\":[{\"name\":\"lslrcigtzjc\",\"value\":\"xqlaps\"},{\"name\":\"sovyxpavidnievw\",\"value\":\"cvvy\"},{\"name\":\"slpuxgcbdsva\",\"value\":\"nptw\"},{\"name\":\"kx\",\"value\":\"azwu\"}]}},\"id\":\"yqvnjobfe\",\"name\":\"hldiuhzzgqlm\",\"type\":\"aewzgiudjp\"}"; - - 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("ygnxcgjtfrnqukt", "fnslnlrxsmy", "trwntfmtbgw", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("tmdpvozglqjbknlz", response.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("dqyemebunaucm", response.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(1976462334, response.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("aitranizerw", response.properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("dasmxu", response.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, response.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("wo", response.properties().status().message()); - Assertions.assertEquals(1419456371, response.properties().status().statusId()); - Assertions.assertEquals("aghm", response.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("lslrcigtzjc", - response.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("xqlaps", 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 975abe0dd0c4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests.java +++ /dev/null @@ -1,59 +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\":\"qpmbhyqg\",\"name\":\"rmmttjxop\",\"description\":\"erhsmvgohtw\",\"author\":\"qilrixysfn\",\"category\":\"sqywwwmhkru\",\"supportTopicList\":[{},{},{}],\"analysisTypes\":[\"ympmlqoin\",\"zduewihapfjii\"],\"type\":\"jdiq\",\"score\":12.614834},\"dataset\":[{}],\"status\":{\"message\":\"cl\",\"statusId\":1765036901},\"dataProviderMetadata\":{\"providerName\":\"sbw\",\"propertyBag\":[{},{}]}},\"id\":\"bv\",\"name\":\"ipbwxgooo\",\"type\":\"zp\"},{\"properties\":{\"metadata\":{\"id\":\"s\",\"name\":\"knpdgzigjsu\",\"description\":\"whgsaodkww\",\"author\":\"afoctohz\",\"category\":\"quvwsxbgn\",\"supportTopicList\":[{},{},{},{}],\"analysisTypes\":[\"qchoadhrsxqv\",\"vspabdsrgfajgl\",\"rsubklrxhjnl\"],\"type\":\"etjdvqydieqqkwa\",\"score\":70.96507},\"dataset\":[{}],\"status\":{\"message\":\"zxoebwgjxb\",\"statusId\":315596375},\"dataProviderMetadata\":{\"providerName\":\"aupwtzvpaklo\",\"propertyBag\":[{},{},{},{}]}},\"id\":\"zrpejpl\",\"name\":\"s\",\"type\":\"nbtttkgsuxu\"},{\"properties\":{\"metadata\":{\"id\":\"gkp\",\"name\":\"boy\",\"description\":\"ebhuhkslgwlokhu\",\"author\":\"ijyzcqypzqzufgsy\",\"category\":\"jyvdwtfxptpqayam\",\"supportTopicList\":[{}],\"analysisTypes\":[\"ybmx\"],\"type\":\"xocuullojkpoyhgw\",\"score\":2.738905},\"dataset\":[{},{},{},{}],\"status\":{\"message\":\"dljzgdyrc\",\"statusId\":1586962716},\"dataProviderMetadata\":{\"providerName\":\"gzlrqhbj\",\"propertyBag\":[{},{},{},{}]}},\"id\":\"dxwbsfpyxxtj\",\"name\":\"flecominxojjl\",\"type\":\"xxdhilzzdzzqjm\"},{\"properties\":{\"metadata\":{\"id\":\"y\",\"name\":\"ribqlotokh\",\"description\":\"wtaznkcqw\",\"author\":\"wjyofgwhnkbtl\",\"category\":\"jssmctsnldkpwo\",\"supportTopicList\":[{},{},{}],\"analysisTypes\":[\"bxbteogfgfiijry\",\"wlefksxqceazfpxg\",\"m\",\"vzvluyq\"],\"type\":\"ios\",\"score\":85.90183},\"dataset\":[{},{},{}],\"status\":{\"message\":\"fppuacvfye\",\"statusId\":970206060},\"dataProviderMetadata\":{\"providerName\":\"x\",\"propertyBag\":[{},{},{}]}},\"id\":\"soy\",\"name\":\"hpvtyqftteh\",\"type\":\"pboujs\"}],\"nextLink\":\"fvvdshxcdedsue\"}"; - - 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("sqwudohzilfmnli", "psimsf", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("ympmlqoin", response.value().get(0).properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("cl", response.value().get(0).properties().status().message()); - Assertions.assertEquals(1765036901, response.value().get(0).properties().status().statusId()); - Assertions.assertEquals("sbw", 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 5e7b39d3ab48..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerAuthenticationTests.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.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/ManagedEnvironmentUsagesListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListMockTests.java deleted file mode 100644 index a43d612fdc73..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListMockTests.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.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.Usage; -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 ManagedEnvironmentUsagesListMockTests { - @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\":[{\"currentValue\":74.240906,\"limit\":50.552414,\"name\":{\"value\":\"wki\",\"localizedValue\":\"dgfhbssdpje\"}}]}"; - - 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.managedEnvironmentUsages().list("zdnckidbj", "glhzqp", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(74.240906f, response.iterator().next().currentValue()); - Assertions.assertEquals(50.552414f, response.iterator().next().limit()); - Assertions.assertEquals("wki", response.iterator().next().name().value()); - Assertions.assertEquals("dgfhbssdpje", response.iterator().next().name().localizedValue()); - } -} 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 3c7163e40cc6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.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.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("yimyccgrvk", "xzznnui", 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 12409f1e9082..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java +++ /dev/null @@ -1,59 +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\":1874096637,\"maximumCount\":1667611376,\"currentCount\":883857471},\"id\":\"eumexmjbxc\",\"name\":\"ccwkqmtx\",\"type\":\"p\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito.when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito.when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito.when(httpClient.send(httpRequest.capture(), Mockito.any())).thenReturn(Mono.defer(() -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - 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("dekotjgxieqfkyf", "iwvjaqupbyyn", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(1874096637, response.iterator().next().properties().minimumCount()); - Assertions.assertEquals(1667611376, response.iterator().next().properties().maximumCount()); - Assertions.assertEquals(883857471, 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 d4138b04f453..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,52 +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("mqgisnion", "tb", "dr", - 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 e805a0ba86c5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.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.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\":\"1bfb3b12-d3c4-4b35-8f47-4176368e6e5c\",\"tenantId\":\"ed1e4bcc-472b-48f8-9f19-4d0991ab0086\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"wgxhn\":{\"principalId\":\"028db3d9-1340-449d-bdff-b678a2ee278d\",\"clientId\":\"51e4a008-5b03-4c2d-a0c0-31398ef4c4c6\"},\"x\":{\"principalId\":\"202c75aa-8c8e-4276-b9e6-e3384332734e\",\"clientId\":\"b9b508e5-b6db-42b9-bdce-4f77c2ba9a4d\"}}}") - .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("wgxhn", new UserAssignedIdentity(), "x", new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MetricsConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MetricsConfigurationTests.java deleted file mode 100644 index 6a5c0030e0bb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MetricsConfigurationTests.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.MetricsConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MetricsConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricsConfiguration model - = BinaryData.fromString("{\"destinations\":[\"fmd\",\"ragegi\",\"vcjfelisdjubggb\"]}") - .toObject(MetricsConfiguration.class); - Assertions.assertEquals("fmd", model.destinations().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricsConfiguration model - = new MetricsConfiguration().withDestinations(Arrays.asList("fmd", "ragegi", "vcjfelisdjubggb")); - model = BinaryData.fromObject(model).toObject(MetricsConfiguration.class); - Assertions.assertEquals("fmd", model.destinations().get(0)); - } -} 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 f78edccfaf21..000000000000 --- 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 42a8af4b2451..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilityWithResponseMockTests.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.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\":\"AlreadyExists\",\"message\":\"htvsnvl\"}"; - - 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("isjm", "kkhmwdmdlgyqixok", - new CheckNameAvailabilityRequest().withName("jawh").withType("gnqfqqdlcvmyol"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("htvsnvl", response.message()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NfsAzureFilePropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NfsAzureFilePropertiesTests.java deleted file mode 100644 index ca4bf2448f51..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NfsAzureFilePropertiesTests.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.AccessMode; -import com.azure.resourcemanager.appcontainers.models.NfsAzureFileProperties; -import org.junit.jupiter.api.Assertions; - -public final class NfsAzureFilePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NfsAzureFileProperties model - = BinaryData.fromString("{\"server\":\"qplpvmjc\",\"accessMode\":\"ReadWrite\",\"shareName\":\"bidyv\"}") - .toObject(NfsAzureFileProperties.class); - Assertions.assertEquals("qplpvmjc", model.server()); - Assertions.assertEquals(AccessMode.READ_WRITE, model.accessMode()); - Assertions.assertEquals("bidyv", model.shareName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NfsAzureFileProperties model = new NfsAzureFileProperties().withServer("qplpvmjc") - .withAccessMode(AccessMode.READ_WRITE).withShareName("bidyv"); - model = BinaryData.fromObject(model).toObject(NfsAzureFileProperties.class); - Assertions.assertEquals("qplpvmjc", model.server()); - Assertions.assertEquals(AccessMode.READ_WRITE, model.accessMode()); - Assertions.assertEquals("bidyv", model.shareName()); - } -} 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 1dd4cbc2e2c6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.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.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\":\"asxazjpqyegualhb\"}") - .toObject(Nonce.class); - Assertions.assertEquals(true, model.validateNonce()); - Assertions.assertEquals("asxazjpqyegualhb", model.nonceExpirationInterval()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Nonce model = new Nonce().withValidateNonce(true).withNonceExpirationInterval("asxazjpqyegualhb"); - model = BinaryData.fromObject(model).toObject(Nonce.class); - Assertions.assertEquals(true, model.validateNonce()); - Assertions.assertEquals("asxazjpqyegualhb", 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 1364879d004a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.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.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\":\"nfnbacfionlebxe\",\"scopes\":[\"tzxdpnqbqqwx\",\"jfeallnwsub\"]}") - .toObject(OpenIdConnectLogin.class); - Assertions.assertEquals("nfnbacfionlebxe", model.nameClaimType()); - Assertions.assertEquals("tzxdpnqbqqwx", model.scopes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OpenIdConnectLogin model = new OpenIdConnectLogin().withNameClaimType("nfnbacfionlebxe") - .withScopes(Arrays.asList("tzxdpnqbqqwx", "jfeallnwsub")); - model = BinaryData.fromObject(model).toObject(OpenIdConnectLogin.class); - Assertions.assertEquals("nfnbacfionlebxe", model.nameClaimType()); - Assertions.assertEquals("tzxdpnqbqqwx", 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 6550d7f15bdc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDetailInnerTests.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.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\":\"xff\",\"isDataAction\":true,\"display\":{\"provider\":\"fbkgozxwopdby\",\"resource\":\"izqaclnapxbiyg\",\"operation\":\"gjkn\",\"description\":\"mfcttux\"},\"origin\":\"yilflqoiquvrehmr\"}") - .toObject(OperationDetailInner.class); - Assertions.assertEquals("xff", model.name()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("fbkgozxwopdby", model.display().provider()); - Assertions.assertEquals("izqaclnapxbiyg", model.display().resource()); - Assertions.assertEquals("gjkn", model.display().operation()); - Assertions.assertEquals("mfcttux", model.display().description()); - Assertions.assertEquals("yilflqoiquvrehmr", model.origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDetailInner model = new OperationDetailInner() - .withName("xff").withIsDataAction(true).withDisplay(new OperationDisplay().withProvider("fbkgozxwopdby") - .withResource("izqaclnapxbiyg").withOperation("gjkn").withDescription("mfcttux")) - .withOrigin("yilflqoiquvrehmr"); - model = BinaryData.fromObject(model).toObject(OperationDetailInner.class); - Assertions.assertEquals("xff", model.name()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("fbkgozxwopdby", model.display().provider()); - Assertions.assertEquals("izqaclnapxbiyg", model.display().resource()); - Assertions.assertEquals("gjkn", model.display().operation()); - Assertions.assertEquals("mfcttux", model.display().description()); - Assertions.assertEquals("yilflqoiquvrehmr", 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 3e8cd630a35e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDisplayTests.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.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\":\"hvsujztc\",\"resource\":\"tqjtwhauu\",\"operation\":\"prnjletlxsmr\",\"description\":\"do\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("hvsujztc", model.provider()); - Assertions.assertEquals("tqjtwhauu", model.resource()); - Assertions.assertEquals("prnjletlxsmr", model.operation()); - Assertions.assertEquals("do", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay().withProvider("hvsujztc").withResource("tqjtwhauu") - .withOperation("prnjletlxsmr").withDescription("do"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("hvsujztc", model.provider()); - Assertions.assertEquals("tqjtwhauu", model.resource()); - Assertions.assertEquals("prnjletlxsmr", model.operation()); - Assertions.assertEquals("do", 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 24e344e5df60..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationsListMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) 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\":\"b\",\"isDataAction\":true,\"display\":{\"provider\":\"dylytcovq\",\"resource\":\"usrf\",\"operation\":\"d\",\"description\":\"fxnxml\"},\"origin\":\"uoswkjmdih\"}]}"; - - 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("b", response.iterator().next().name()); - Assertions.assertEquals(true, response.iterator().next().isDataAction()); - Assertions.assertEquals("dylytcovq", response.iterator().next().display().provider()); - Assertions.assertEquals("usrf", response.iterator().next().display().resource()); - Assertions.assertEquals("d", response.iterator().next().display().operation()); - Assertions.assertEquals("fxnxml", response.iterator().next().display().description()); - Assertions.assertEquals("uoswkjmdih", response.iterator().next().origin()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PreBuildStepTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PreBuildStepTests.java deleted file mode 100644 index e49fc44d4e06..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PreBuildStepTests.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.HttpGet; -import com.azure.resourcemanager.appcontainers.models.PreBuildStep; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PreBuildStepTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PreBuildStep model = BinaryData.fromString( - "{\"description\":\"iexpbtgiwbwo\",\"scripts\":[\"ashrt\",\"tkcnqxwb\"],\"httpGet\":{\"url\":\"kulpiujwaasi\",\"fileName\":\"i\",\"headers\":[\"yuq\",\"rpqlp\",\"wcciuqgbdbu\"]}}") - .toObject(PreBuildStep.class); - Assertions.assertEquals("iexpbtgiwbwo", model.description()); - Assertions.assertEquals("ashrt", model.scripts().get(0)); - Assertions.assertEquals("kulpiujwaasi", model.httpGet().url()); - Assertions.assertEquals("i", model.httpGet().fileName()); - Assertions.assertEquals("yuq", model.httpGet().headers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PreBuildStep model = new PreBuildStep().withDescription("iexpbtgiwbwo") - .withScripts(Arrays.asList("ashrt", "tkcnqxwb")).withHttpGet(new HttpGet().withUrl("kulpiujwaasi") - .withFileName("i").withHeaders(Arrays.asList("yuq", "rpqlp", "wcciuqgbdbu"))); - model = BinaryData.fromObject(model).toObject(PreBuildStep.class); - Assertions.assertEquals("iexpbtgiwbwo", model.description()); - Assertions.assertEquals("ashrt", model.scripts().get(0)); - Assertions.assertEquals("kulpiujwaasi", model.httpGet().url()); - Assertions.assertEquals("i", model.httpGet().fileName()); - Assertions.assertEquals("yuq", model.httpGet().headers().get(0)); - } -} 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 ed980d566da1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.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.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-02-06T14:48:02Z\",\"runningState\":\"NotRunning\",\"runningStateDetails\":\"qovekqvgqou\",\"containers\":[{\"name\":\"mpjw\",\"containerId\":\"vqikfxcvhrfsphu\",\"ready\":true,\"started\":true,\"restartCount\":95880088,\"runningState\":\"Terminated\",\"runningStateDetails\":\"sqczkvyklxubyj\",\"logStreamEndpoint\":\"fmmfblcqcu\",\"execEndpoint\":\"gqibrtalmetttw\"},{\"name\":\"slqxi\",\"containerId\":\"rmooizqse\",\"ready\":false,\"started\":true,\"restartCount\":719616130,\"runningState\":\"Terminated\",\"runningStateDetails\":\"zhyrpeto\",\"logStreamEndpoint\":\"bjoxs\",\"execEndpoint\":\"vnh\"},{\"name\":\"brqnkkzjcjb\",\"containerId\":\"gaehvvibrxjjst\",\"ready\":false,\"started\":false,\"restartCount\":774286462,\"runningState\":\"Waiting\",\"runningStateDetails\":\"tmo\",\"logStreamEndpoint\":\"klf\",\"execEndpoint\":\"dgfcwqmp\"}],\"initContainers\":[{\"name\":\"xzhemjyh\",\"containerId\":\"uj\",\"ready\":false,\"started\":true,\"restartCount\":1064188609,\"runningState\":\"Running\",\"runningStateDetails\":\"ulkb\",\"logStreamEndpoint\":\"pfajnjwltlwtjj\",\"execEndpoint\":\"ktalhsnvkcdmxz\"},{\"name\":\"oaimlnw\",\"containerId\":\"aomylwea\",\"ready\":true,\"started\":false,\"restartCount\":1226042956,\"runningState\":\"Running\",\"runningStateDetails\":\"npjhlfzswpchwahf\",\"logStreamEndpoint\":\"usnfepgfewet\",\"execEndpoint\":\"yxgncxykxhdjhli\"},{\"name\":\"bcxf\",\"containerId\":\"cporxvxcjz\",\"ready\":false,\"started\":true,\"restartCount\":444626662,\"runningState\":\"Waiting\",\"runningStateDetails\":\"qscjavftjuh\",\"logStreamEndpoint\":\"azkmtgguwp\",\"execEndpoint\":\"r\"}]},\"id\":\"civmmg\",\"name\":\"f\",\"type\":\"fiwrxgkn\"}]}") - .toObject(ReplicaCollectionInner.class); - Assertions.assertEquals("mpjw", model.value().get(0).containers().get(0).name()); - Assertions.assertEquals("vqikfxcvhrfsphu", model.value().get(0).containers().get(0).containerId()); - Assertions.assertEquals(true, model.value().get(0).containers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).containers().get(0).started()); - Assertions.assertEquals(95880088, model.value().get(0).containers().get(0).restartCount()); - Assertions.assertEquals("xzhemjyh", model.value().get(0).initContainers().get(0).name()); - Assertions.assertEquals("uj", 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(1064188609, 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("mpjw").withContainerId("vqikfxcvhrfsphu").withReady(true) - .withStarted(true).withRestartCount(95880088), - new ReplicaContainer().withName("slqxi").withContainerId("rmooizqse").withReady(false).withStarted(true) - .withRestartCount(719616130), - new ReplicaContainer().withName("brqnkkzjcjb").withContainerId("gaehvvibrxjjst").withReady(false) - .withStarted(false).withRestartCount(774286462))) - .withInitContainers(Arrays.asList( - new ReplicaContainer().withName("xzhemjyh").withContainerId("uj").withReady(false).withStarted(true) - .withRestartCount(1064188609), - new ReplicaContainer().withName("oaimlnw").withContainerId("aomylwea").withReady(true) - .withStarted(false).withRestartCount(1226042956), - new ReplicaContainer().withName("bcxf").withContainerId("cporxvxcjz").withReady(false).withStarted(true) - .withRestartCount(444626662))))); - model = BinaryData.fromObject(model).toObject(ReplicaCollectionInner.class); - Assertions.assertEquals("mpjw", model.value().get(0).containers().get(0).name()); - Assertions.assertEquals("vqikfxcvhrfsphu", model.value().get(0).containers().get(0).containerId()); - Assertions.assertEquals(true, model.value().get(0).containers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).containers().get(0).started()); - Assertions.assertEquals(95880088, model.value().get(0).containers().get(0).restartCount()); - Assertions.assertEquals("xzhemjyh", model.value().get(0).initContainers().get(0).name()); - Assertions.assertEquals("uj", 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(1064188609, 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 6a77fa5d344a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.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.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\":\"isofieypefojyqd\",\"containerId\":\"u\",\"ready\":false,\"started\":true,\"restartCount\":1554312221,\"runningState\":\"Terminated\",\"runningStateDetails\":\"hihlhzdsqtzbs\",\"logStreamEndpoint\":\"nowc\",\"execEndpoint\":\"fgmvecactxmwo\"}") - .toObject(ReplicaContainer.class); - Assertions.assertEquals("isofieypefojyqd", model.name()); - Assertions.assertEquals("u", model.containerId()); - Assertions.assertEquals(false, model.ready()); - Assertions.assertEquals(true, model.started()); - Assertions.assertEquals(1554312221, model.restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaContainer model = new ReplicaContainer().withName("isofieypefojyqd").withContainerId("u") - .withReady(false).withStarted(true).withRestartCount(1554312221); - model = BinaryData.fromObject(model).toObject(ReplicaContainer.class); - Assertions.assertEquals("isofieypefojyqd", model.name()); - Assertions.assertEquals("u", model.containerId()); - Assertions.assertEquals(false, model.ready()); - Assertions.assertEquals(true, model.started()); - Assertions.assertEquals(1554312221, 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 55bccfb6fde7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaInnerTests.java +++ /dev/null @@ -1,50 +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-08-12T09:55:05Z\",\"runningState\":\"NotRunning\",\"runningStateDetails\":\"iglaecx\",\"containers\":[{\"name\":\"cokpv\",\"containerId\":\"lqtmldgxob\",\"ready\":false,\"started\":false,\"restartCount\":563418466,\"runningState\":\"Waiting\",\"runningStateDetails\":\"ayzri\",\"logStreamEndpoint\":\"hya\",\"execEndpoint\":\"vjlboxqvk\"}],\"initContainers\":[{\"name\":\"ho\",\"containerId\":\"ynhdwdigum\",\"ready\":false,\"started\":true,\"restartCount\":745752113,\"runningState\":\"Waiting\",\"runningStateDetails\":\"jazysdzhezwwvaiq\",\"logStreamEndpoint\":\"vv\",\"execEndpoint\":\"nk\"}]},\"id\":\"hqyikvy\",\"name\":\"auy\",\"type\":\"vluwmncsttij\"}") - .toObject(ReplicaInner.class); - Assertions.assertEquals("cokpv", model.containers().get(0).name()); - Assertions.assertEquals("lqtmldgxob", model.containers().get(0).containerId()); - Assertions.assertEquals(false, model.containers().get(0).ready()); - Assertions.assertEquals(false, model.containers().get(0).started()); - Assertions.assertEquals(563418466, model.containers().get(0).restartCount()); - Assertions.assertEquals("ho", model.initContainers().get(0).name()); - Assertions.assertEquals("ynhdwdigum", model.initContainers().get(0).containerId()); - Assertions.assertEquals(false, model.initContainers().get(0).ready()); - Assertions.assertEquals(true, model.initContainers().get(0).started()); - Assertions.assertEquals(745752113, 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("cokpv").withContainerId("lqtmldgxob") - .withReady(false).withStarted(false).withRestartCount(563418466))) - .withInitContainers(Arrays.asList(new ReplicaContainer().withName("ho").withContainerId("ynhdwdigum") - .withReady(false).withStarted(true).withRestartCount(745752113))); - model = BinaryData.fromObject(model).toObject(ReplicaInner.class); - Assertions.assertEquals("cokpv", model.containers().get(0).name()); - Assertions.assertEquals("lqtmldgxob", model.containers().get(0).containerId()); - Assertions.assertEquals(false, model.containers().get(0).ready()); - Assertions.assertEquals(false, model.containers().get(0).started()); - Assertions.assertEquals(563418466, model.containers().get(0).restartCount()); - Assertions.assertEquals("ho", model.initContainers().get(0).name()); - Assertions.assertEquals("ynhdwdigum", model.initContainers().get(0).containerId()); - Assertions.assertEquals(false, model.initContainers().get(0).ready()); - Assertions.assertEquals(true, model.initContainers().get(0).started()); - Assertions.assertEquals(745752113, 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 38f70a8c368a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.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.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-04-05T16:52:36Z\",\"runningState\":\"Unknown\",\"runningStateDetails\":\"ekrsgs\",\"containers\":[{\"name\":\"uzqgnjdgkynsc\",\"containerId\":\"qhzvhxnkomt\",\"ready\":false,\"started\":false,\"restartCount\":1449469351,\"runningState\":\"Running\",\"runningStateDetails\":\"xz\",\"logStreamEndpoint\":\"ihfrbbcevqa\",\"execEndpoint\":\"ltd\"},{\"name\":\"fkqojpy\",\"containerId\":\"gtrd\",\"ready\":false,\"started\":false,\"restartCount\":2043504503,\"runningState\":\"Terminated\",\"runningStateDetails\":\"m\",\"logStreamEndpoint\":\"nysuxmprafwgckh\",\"execEndpoint\":\"xvd\"},{\"name\":\"fwafqrouda\",\"containerId\":\"avehhrvkbunzo\",\"ready\":true,\"started\":true,\"restartCount\":2097383102,\"runningState\":\"Terminated\",\"runningStateDetails\":\"yxcdyuibhmfdnbzy\",\"logStreamEndpoint\":\"f\",\"execEndpoint\":\"cjnaeoisrvhmgor\"}],\"initContainers\":[{\"name\":\"is\",\"containerId\":\"w\",\"ready\":true,\"started\":false,\"restartCount\":157711526,\"runningState\":\"Waiting\",\"runningStateDetails\":\"vxilcbt\",\"logStreamEndpoint\":\"hnze\",\"execEndpoint\":\"xtjjfzqlqhycav\"},{\"name\":\"ggxdb\",\"containerId\":\"smieknlra\",\"ready\":true,\"started\":true,\"restartCount\":1541326221,\"runningState\":\"Waiting\",\"runningStateDetails\":\"dwqf\",\"logStreamEndpoint\":\"lyr\",\"execEndpoint\":\"iagtc\"},{\"name\":\"ocqwogfnzjvus\",\"containerId\":\"ld\",\"ready\":true,\"started\":false,\"restartCount\":1126537021,\"runningState\":\"Waiting\",\"runningStateDetails\":\"tkad\",\"logStreamEndpoint\":\"s\",\"execEndpoint\":\"nbtgkbugrjqctoj\"}]}") - .toObject(ReplicaProperties.class); - Assertions.assertEquals("uzqgnjdgkynsc", model.containers().get(0).name()); - Assertions.assertEquals("qhzvhxnkomt", model.containers().get(0).containerId()); - Assertions.assertEquals(false, model.containers().get(0).ready()); - Assertions.assertEquals(false, model.containers().get(0).started()); - Assertions.assertEquals(1449469351, model.containers().get(0).restartCount()); - Assertions.assertEquals("is", model.initContainers().get(0).name()); - Assertions.assertEquals("w", model.initContainers().get(0).containerId()); - Assertions.assertEquals(true, model.initContainers().get(0).ready()); - Assertions.assertEquals(false, model.initContainers().get(0).started()); - Assertions.assertEquals(157711526, 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("uzqgnjdgkynsc").withContainerId("qhzvhxnkomt").withReady(false) - .withStarted(false).withRestartCount(1449469351), - new ReplicaContainer().withName("fkqojpy").withContainerId("gtrd").withReady(false).withStarted(false) - .withRestartCount(2043504503), - new ReplicaContainer().withName("fwafqrouda").withContainerId("avehhrvkbunzo").withReady(true) - .withStarted(true).withRestartCount(2097383102))) - .withInitContainers(Arrays.asList( - new ReplicaContainer().withName("is").withContainerId("w").withReady(true).withStarted(false) - .withRestartCount(157711526), - new ReplicaContainer().withName("ggxdb").withContainerId("smieknlra").withReady(true).withStarted(true) - .withRestartCount(1541326221), - new ReplicaContainer().withName("ocqwogfnzjvus").withContainerId("ld").withReady(true) - .withStarted(false).withRestartCount(1126537021))); - model = BinaryData.fromObject(model).toObject(ReplicaProperties.class); - Assertions.assertEquals("uzqgnjdgkynsc", model.containers().get(0).name()); - Assertions.assertEquals("qhzvhxnkomt", model.containers().get(0).containerId()); - Assertions.assertEquals(false, model.containers().get(0).ready()); - Assertions.assertEquals(false, model.containers().get(0).started()); - Assertions.assertEquals(1449469351, model.containers().get(0).restartCount()); - Assertions.assertEquals("is", model.initContainers().get(0).name()); - Assertions.assertEquals("w", model.initContainers().get(0).containerId()); - Assertions.assertEquals(true, model.initContainers().get(0).ready()); - Assertions.assertEquals(false, model.initContainers().get(0).started()); - Assertions.assertEquals(157711526, model.initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersGetCustomDomainVerificationIdWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersGetCustomDomainVerificationIdWithResponseMockTests.java deleted file mode 100644 index d9d0c35ff1ee..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersGetCustomDomainVerificationIdWithResponseMockTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.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 ResourceProvidersGetCustomDomainVerificationIdWithResponseMockTests { - @Test - public void testGetCustomDomainVerificationIdWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "\"zolgjzmicuydocc\""; - - 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)); - - String response = manager.resourceProviders() - .getCustomDomainVerificationIdWithResponse(com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("zolgjzmicuydocc", response); - } -} 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 ca30f71ae269..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersJobExecutionWithResponseMockTests.java +++ /dev/null @@ -1,69 +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\":\"iutg\",\"id\":\"mkahpqha\",\"type\":\"ntacih\",\"properties\":{\"status\":\"Unknown\",\"startTime\":\"2021-02-15T03:50:34Z\",\"endTime\":\"2021-11-24T08:50:55Z\",\"template\":{\"containers\":[{\"image\":\"mvlbhikeaqgrv\",\"name\":\"omxp\",\"command\":[\"tsdfjyieso\",\"wiqbuoutm\"],\"args\":[\"gleofjsbgbw\",\"zvdajfwnncf\",\"aciq\"],\"env\":[{},{},{},{}],\"resources\":{}}],\"initContainers\":[{\"image\":\"qlwixvtbougu\",\"name\":\"n\",\"command\":[\"gjttbasualapdlnd\"],\"args\":[\"qb\",\"ixv\",\"lwynpbbfqvzfj\",\"spugzfeuzjljmph\"],\"env\":[{},{},{}],\"resources\":{}}]}}}"; - - 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("gkqzkcyzmffngdyf", "ixrhl", "qvhoej", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("iutg", response.name()); - Assertions.assertEquals("mkahpqha", response.id()); - Assertions.assertEquals("ntacih", response.type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-15T03:50:34Z"), response.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-24T08:50:55Z"), response.endTime()); - Assertions.assertEquals("mvlbhikeaqgrv", response.template().containers().get(0).image()); - Assertions.assertEquals("omxp", response.template().containers().get(0).name()); - Assertions.assertEquals("tsdfjyieso", response.template().containers().get(0).command().get(0)); - Assertions.assertEquals("gleofjsbgbw", response.template().containers().get(0).args().get(0)); - Assertions.assertEquals("qlwixvtbougu", response.template().initContainers().get(0).image()); - Assertions.assertEquals("n", response.template().initContainers().get(0).name()); - Assertions.assertEquals("gjttbasualapdlnd", response.template().initContainers().get(0).command().get(0)); - Assertions.assertEquals("qb", response.template().initContainers().get(0).args().get(0)); - } -} 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 6bd5dcca4d05..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.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.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-08-08T16:05:05Z\",\"lastActiveTime\":\"2021-11-22T09:46:17Z\",\"fqdn\":\"rjfut\",\"template\":{\"revisionSuffix\":\"ebjvewzcjzn\",\"terminationGracePeriodSeconds\":7534826156141275141,\"initContainers\":[{},{},{},{}],\"containers\":[{},{},{},{}],\"scale\":{\"minReplicas\":1437675806,\"maxReplicas\":1356605173,\"rules\":[{},{},{}]},\"volumes\":[{},{}],\"serviceBinds\":[{},{},{},{}]},\"active\":false,\"replicas\":240161872,\"trafficWeight\":279681197,\"provisioningError\":\"ziuxxpshnee\",\"healthState\":\"Healthy\",\"provisioningState\":\"Provisioning\",\"runningState\":\"Failed\"},\"id\":\"ubkwdle\",\"name\":\"rds\",\"type\":\"tujbazpju\"},{\"properties\":{\"createdTime\":\"2021-04-13T05:15:14Z\",\"lastActiveTime\":\"2021-04-06T17:16:51Z\",\"fqdn\":\"lnorwmdu\",\"template\":{\"revisionSuffix\":\"klvxwmyg\",\"terminationGracePeriodSeconds\":6535644343996923938,\"initContainers\":[{},{}],\"containers\":[{},{},{},{}],\"scale\":{\"minReplicas\":1044665061,\"maxReplicas\":1565134020,\"rules\":[{}]},\"volumes\":[{},{},{},{}],\"serviceBinds\":[{},{}]},\"active\":false,\"replicas\":1689782344,\"trafficWeight\":1959517954,\"provisioningError\":\"xconfozauors\",\"healthState\":\"Healthy\",\"provisioningState\":\"Provisioning\",\"runningState\":\"Degraded\"},\"id\":\"lhlv\",\"name\":\"uuepzlrphwzsoldw\",\"type\":\"yuqdu\"},{\"properties\":{\"createdTime\":\"2020-12-22T02:15:52Z\",\"lastActiveTime\":\"2021-05-15T23:33:47Z\",\"fqdn\":\"rbior\",\"template\":{\"revisionSuffix\":\"lywjhh\",\"terminationGracePeriodSeconds\":6322848214394065275,\"initContainers\":[{}],\"containers\":[{},{},{}],\"scale\":{\"minReplicas\":759547890,\"maxReplicas\":601340793,\"rules\":[{}]},\"volumes\":[{},{},{}],\"serviceBinds\":[{},{}]},\"active\":false,\"replicas\":75081100,\"trafficWeight\":133601107,\"provisioningError\":\"euzaof\",\"healthState\":\"Healthy\",\"provisioningState\":\"Failed\",\"runningState\":\"Stopped\"},\"id\":\"s\",\"name\":\"gdotcubiipuipwo\",\"type\":\"onmacjekniz\"}],\"nextLink\":\"qvci\"}") - .toObject(RevisionCollection.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RevisionCollection model = new RevisionCollection() - .withValue(Arrays.asList(new RevisionInner(), 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/ServiceTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceTests.java deleted file mode 100644 index be1ebe2aee33..000000000000 --- 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\":\"yqiatkzwp\"}").toObject(Service.class); - Assertions.assertEquals("yqiatkzwp", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Service model = new Service().withType("yqiatkzwp"); - model = BinaryData.fromObject(model).toObject(Service.class); - Assertions.assertEquals("yqiatkzwp", model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpConnectionPoolTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpConnectionPoolTests.java deleted file mode 100644 index 525f953e5e6e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpConnectionPoolTests.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.TcpConnectionPool; -import org.junit.jupiter.api.Assertions; - -public final class TcpConnectionPoolTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TcpConnectionPool model - = BinaryData.fromString("{\"maxConnections\":171596164}").toObject(TcpConnectionPool.class); - Assertions.assertEquals(171596164, model.maxConnections()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TcpConnectionPool model = new TcpConnectionPool().withMaxConnections(171596164); - model = BinaryData.fromObject(model).toObject(TcpConnectionPool.class); - Assertions.assertEquals(171596164, model.maxConnections()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpRetryPolicyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpRetryPolicyTests.java deleted file mode 100644 index aa0e1f0e2019..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpRetryPolicyTests.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.TcpRetryPolicy; -import org.junit.jupiter.api.Assertions; - -public final class TcpRetryPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TcpRetryPolicy model - = BinaryData.fromString("{\"maxConnectAttempts\":56034680}").toObject(TcpRetryPolicy.class); - Assertions.assertEquals(56034680, model.maxConnectAttempts()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TcpRetryPolicy model = new TcpRetryPolicy().withMaxConnectAttempts(56034680); - model = BinaryData.fromObject(model).toObject(TcpRetryPolicy.class); - Assertions.assertEquals(56034680, model.maxConnectAttempts()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TimeoutPolicyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TimeoutPolicyTests.java deleted file mode 100644 index 22186455269f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TimeoutPolicyTests.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.TimeoutPolicy; -import org.junit.jupiter.api.Assertions; - -public final class TimeoutPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TimeoutPolicy model = BinaryData - .fromString("{\"responseTimeoutInSeconds\":2068674986,\"connectionTimeoutInSeconds\":974822937}") - .toObject(TimeoutPolicy.class); - Assertions.assertEquals(2068674986, model.responseTimeoutInSeconds()); - Assertions.assertEquals(974822937, model.connectionTimeoutInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TimeoutPolicy model - = new TimeoutPolicy().withResponseTimeoutInSeconds(2068674986).withConnectionTimeoutInSeconds(974822937); - model = BinaryData.fromObject(model).toObject(TimeoutPolicy.class); - Assertions.assertEquals(2068674986, model.responseTimeoutInSeconds()); - Assertions.assertEquals(974822937, model.connectionTimeoutInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TracesConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TracesConfigurationTests.java deleted file mode 100644 index 8d85d6589f16..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TracesConfigurationTests.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.TracesConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TracesConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TracesConfiguration model - = BinaryData.fromString("{\"destinations\":[\"b\",\"kbwvqvxkdiv\"]}").toObject(TracesConfiguration.class); - Assertions.assertEquals("b", model.destinations().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TracesConfiguration model = new TracesConfiguration().withDestinations(Arrays.asList("b", "kbwvqvxkdiv")); - model = BinaryData.fromObject(model).toObject(TracesConfiguration.class); - Assertions.assertEquals("b", model.destinations().get(0)); - } -} 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 df9886348ed7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.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.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\":\"ipaslthaqfxssmwu\",\"weight\":1363759065,\"latestRevision\":false,\"label\":\"ezpdrhneu\"}") - .toObject(TrafficWeight.class); - Assertions.assertEquals("ipaslthaqfxssmwu", model.revisionName()); - Assertions.assertEquals(1363759065, model.weight()); - Assertions.assertEquals(false, model.latestRevision()); - Assertions.assertEquals("ezpdrhneu", model.label()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrafficWeight model = new TrafficWeight().withRevisionName("ipaslthaqfxssmwu").withWeight(1363759065) - .withLatestRevision(false).withLabel("ezpdrhneu"); - model = BinaryData.fromObject(model).toObject(TrafficWeight.class); - Assertions.assertEquals("ipaslthaqfxssmwu", model.revisionName()); - Assertions.assertEquals(1363759065, model.weight()); - Assertions.assertEquals(false, model.latestRevision()); - Assertions.assertEquals("ezpdrhneu", model.label()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageInnerTests.java deleted file mode 100644 index 250fabac5c5c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageInnerTests.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.fluent.models.UsageInner; -import com.azure.resourcemanager.appcontainers.models.UsageName; -import org.junit.jupiter.api.Assertions; - -public final class UsageInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsageInner model = BinaryData.fromString( - "{\"currentValue\":41.70743,\"limit\":12.357182,\"name\":{\"value\":\"aswlp\",\"localizedValue\":\"gm\"}}") - .toObject(UsageInner.class); - Assertions.assertEquals(41.70743f, model.currentValue()); - Assertions.assertEquals(12.357182f, model.limit()); - Assertions.assertEquals("aswlp", model.name().value()); - Assertions.assertEquals("gm", model.name().localizedValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsageInner model = new UsageInner().withCurrentValue(41.70743f).withLimit(12.357182f) - .withName(new UsageName().withValue("aswlp").withLocalizedValue("gm")); - model = BinaryData.fromObject(model).toObject(UsageInner.class); - Assertions.assertEquals(41.70743f, model.currentValue()); - Assertions.assertEquals(12.357182f, model.limit()); - Assertions.assertEquals("aswlp", model.name().value()); - Assertions.assertEquals("gm", model.name().localizedValue()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageNameTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageNameTests.java deleted file mode 100644 index 5ee591e9b914..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageNameTests.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.UsageName; -import org.junit.jupiter.api.Assertions; - -public final class UsageNameTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsageName model = BinaryData.fromString("{\"value\":\"fjlrxwtoauk\",\"localizedValue\":\"kvci\"}") - .toObject(UsageName.class); - Assertions.assertEquals("fjlrxwtoauk", model.value()); - Assertions.assertEquals("kvci", model.localizedValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsageName model = new UsageName().withValue("fjlrxwtoauk").withLocalizedValue("kvci"); - model = BinaryData.fromObject(model).toObject(UsageName.class); - Assertions.assertEquals("fjlrxwtoauk", model.value()); - Assertions.assertEquals("kvci", model.localizedValue()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsagesListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsagesListMockTests.java deleted file mode 100644 index be338c6aa16a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsagesListMockTests.java +++ /dev/null @@ -1,59 +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.Usage; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class UsagesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"currentValue\":38.23954,\"limit\":32.95426,\"name\":{\"value\":\"zmuhbcak\",\"localizedValue\":\"hokhoitwhrjsdmm\"}}]}"; - - 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.usages().list("dyhi", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(38.23954f, response.iterator().next().currentValue()); - Assertions.assertEquals(32.95426f, response.iterator().next().limit()); - Assertions.assertEquals("zmuhbcak", response.iterator().next().name().value()); - Assertions.assertEquals("hokhoitwhrjsdmm", response.iterator().next().name().localizedValue()); - } -} 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 5da71dfdc512..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java +++ /dev/null @@ -1,23 +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\":\"be8f935b-e984-46cf-8757-d39bf7c7af37\",\"clientId\":\"92f0cebe-72c5-4e0f-b455-000fbc84bb04\"}") - .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 12418ae3f365..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.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.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\":\"n\",\"dockerBridgeCidr\":\"ujeickp\",\"platformReservedCidr\":\"cpopmxel\",\"platformReservedDnsIP\":\"clt\"}") - .toObject(VnetConfiguration.class); - Assertions.assertEquals(true, model.internal()); - Assertions.assertEquals("n", model.infrastructureSubnetId()); - Assertions.assertEquals("ujeickp", model.dockerBridgeCidr()); - Assertions.assertEquals("cpopmxel", model.platformReservedCidr()); - Assertions.assertEquals("clt", model.platformReservedDnsIp()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VnetConfiguration model = new VnetConfiguration().withInternal(true).withInfrastructureSubnetId("n") - .withDockerBridgeCidr("ujeickp").withPlatformReservedCidr("cpopmxel").withPlatformReservedDnsIp("clt"); - model = BinaryData.fromObject(model).toObject(VnetConfiguration.class); - Assertions.assertEquals(true, model.internal()); - Assertions.assertEquals("n", model.infrastructureSubnetId()); - Assertions.assertEquals("ujeickp", model.dockerBridgeCidr()); - Assertions.assertEquals("cpopmxel", model.platformReservedCidr()); - Assertions.assertEquals("clt", 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 abae444926e6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.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.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\":\"svfycxzbfv\",\"mountPath\":\"wvrvmtg\",\"subPath\":\"ppyostronzmyhgf\"}") - .toObject(VolumeMount.class); - Assertions.assertEquals("svfycxzbfv", model.volumeName()); - Assertions.assertEquals("wvrvmtg", model.mountPath()); - Assertions.assertEquals("ppyostronzmyhgf", model.subPath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeMount model - = new VolumeMount().withVolumeName("svfycxzbfv").withMountPath("wvrvmtg").withSubPath("ppyostronzmyhgf"); - model = BinaryData.fromObject(model).toObject(VolumeMount.class); - Assertions.assertEquals("svfycxzbfv", model.volumeName()); - Assertions.assertEquals("wvrvmtg", model.mountPath()); - Assertions.assertEquals("ppyostronzmyhgf", 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 f10ba612b21b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.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.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\":792139303,\"maximumCount\":1099107522,\"currentCount\":381107449},\"id\":\"yrneizjcpeo\",\"name\":\"khnmgbrou\",\"type\":\"ddbhf\"}],\"nextLink\":\"fpazjzoywjxhpd\"}") - .toObject(WorkloadProfileStatesCollection.class); - Assertions.assertEquals(792139303, model.value().get(0).properties().minimumCount()); - Assertions.assertEquals(1099107522, model.value().get(0).properties().maximumCount()); - Assertions.assertEquals(381107449, 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(792139303).withMaximumCount(1099107522).withCurrentCount(381107449)))); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesCollection.class); - Assertions.assertEquals(792139303, model.value().get(0).properties().minimumCount()); - Assertions.assertEquals(1099107522, model.value().get(0).properties().maximumCount()); - Assertions.assertEquals(381107449, 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 59f33bc2b768..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesInnerTests.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.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\":1181873760,\"maximumCount\":796854695,\"currentCount\":314959325},\"id\":\"qwtehtuevr\",\"name\":\"rljyoogwxhnsdu\",\"type\":\"gwbsreurf\"}") - .toObject(WorkloadProfileStatesInner.class); - Assertions.assertEquals(1181873760, model.properties().minimumCount()); - Assertions.assertEquals(796854695, model.properties().maximumCount()); - Assertions.assertEquals(314959325, model.properties().currentCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfileStatesInner model - = new WorkloadProfileStatesInner().withProperties(new WorkloadProfileStatesProperties() - .withMinimumCount(1181873760).withMaximumCount(796854695).withCurrentCount(314959325)); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesInner.class); - Assertions.assertEquals(1181873760, model.properties().minimumCount()); - Assertions.assertEquals(796854695, model.properties().maximumCount()); - Assertions.assertEquals(314959325, 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 224a756c1c66..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesPropertiesTests.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.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\":669436660,\"maximumCount\":2008330964,\"currentCount\":571851575}") - .toObject(WorkloadProfileStatesProperties.class); - Assertions.assertEquals(669436660, model.minimumCount()); - Assertions.assertEquals(2008330964, model.maximumCount()); - Assertions.assertEquals(571851575, model.currentCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfileStatesProperties model = new WorkloadProfileStatesProperties().withMinimumCount(669436660) - .withMaximumCount(2008330964).withCurrentCount(571851575); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesProperties.class); - Assertions.assertEquals(669436660, model.minimumCount()); - Assertions.assertEquals(2008330964, model.maximumCount()); - Assertions.assertEquals(571851575, 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 6e315d4788a6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileTests.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.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\":\"igkxkbsazga\",\"workloadProfileType\":\"gacyrcmjdmspo\",\"minimumCount\":361382788,\"maximumCount\":283706298}") - .toObject(WorkloadProfile.class); - Assertions.assertEquals("igkxkbsazga", model.name()); - Assertions.assertEquals("gacyrcmjdmspo", model.workloadProfileType()); - Assertions.assertEquals(361382788, model.minimumCount()); - Assertions.assertEquals(283706298, model.maximumCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfile model = new WorkloadProfile().withName("igkxkbsazga").withWorkloadProfileType("gacyrcmjdmspo") - .withMinimumCount(361382788).withMaximumCount(283706298); - model = BinaryData.fromObject(model).toObject(WorkloadProfile.class); - Assertions.assertEquals("igkxkbsazga", model.name()); - Assertions.assertEquals("gacyrcmjdmspo", model.workloadProfileType()); - Assertions.assertEquals(361382788, model.minimumCount()); - Assertions.assertEquals(283706298, model.maximumCount()); - } -}