From 9fb00168b1ddd6c57f1f46629aa024583fc4c25d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 6 Mar 2025 19:41:54 +0000 Subject: [PATCH] CodeGen from PR 33057 in Azure/azure-rest-api-specs Merge 68bf64b9a53f7a8ab38a6d4d603f3590fcb5fd31 into 659cff5aeaa6fa871bab67f648dd15cea067e4c3 --- .../ContainerAppsApiManager.java | 969 ------ .../fluent/AppResilienciesClient.java | 198 -- .../AvailableWorkloadProfilesClient.java | 45 - .../fluent/BillingMetersClient.java | 47 - .../fluent/BuildAuthTokensClient.java | 47 - .../appcontainers/fluent/BuildersClient.java | 270 -- .../BuildsByBuilderResourcesClient.java | 43 - .../appcontainers/fluent/BuildsClient.java | 171 - .../fluent/CertificatesClient.java | 184 - ...nnectedEnvironmentsCertificatesClient.java | 184 - .../fluent/ConnectedEnvironmentsClient.java | 300 -- ...ectedEnvironmentsDaprComponentsClient.java | 186 - .../ConnectedEnvironmentsStoragesClient.java | 146 - .../fluent/ContainerAppsApiClient.java | 349 -- .../ContainerAppsAuthConfigsClient.java | 146 - ...tainerAppsBuildsByContainerAppsClient.java | 46 - .../fluent/ContainerAppsBuildsClient.java | 105 - .../fluent/ContainerAppsClient.java | 517 --- .../ContainerAppsDiagnosticsClient.java | 176 - .../fluent/ContainerAppsPatchesClient.java | 263 -- .../ContainerAppsRevisionReplicasClient.java | 83 - .../fluent/ContainerAppsRevisionsClient.java | 173 - .../ContainerAppsSessionPoolsClient.java | 297 -- .../ContainerAppsSourceControlsClient.java | 226 -- ...DaprComponentResiliencyPoliciesClient.java | 164 - .../fluent/DaprComponentsClient.java | 185 - .../fluent/DaprSubscriptionsClient.java | 151 - .../fluent/DotNetComponentsClient.java | 281 -- .../fluent/FunctionsExtensionsClient.java | 50 - .../fluent/JavaComponentsClient.java | 281 -- .../appcontainers/fluent/JobsClient.java | 724 ---- .../fluent/JobsExecutionsClient.java | 46 - .../appcontainers/fluent/LogicAppsClient.java | 288 -- .../fluent/ManagedCertificatesClient.java | 231 -- .../ManagedEnvironmentDiagnosticsClient.java | 88 - ...nmentPrivateEndpointConnectionsClient.java | 219 -- ...EnvironmentPrivateLinkResourcesClient.java | 44 - .../ManagedEnvironmentUsagesClient.java | 47 - .../fluent/ManagedEnvironmentsClient.java | 395 --- .../ManagedEnvironmentsDiagnosticsClient.java | 50 - .../ManagedEnvironmentsStoragesClient.java | 145 - .../fluent/NamespacesClient.java | 54 - .../fluent/OperationsClient.java | 40 - .../fluent/ResourceProvidersClient.java | 72 - .../appcontainers/fluent/UsagesClient.java | 45 - .../fluent/models/AppResiliencyInner.java | 298 -- .../models/AppResiliencyProperties.java | 257 -- .../fluent/models/AuthConfigInner.java | 310 -- .../fluent/models/AuthConfigProperties.java | 273 -- .../models/AvailableWorkloadProfileInner.java | 196 -- .../models/BillingMeterCollectionInner.java | 107 - .../fluent/models/BuildProperties.java | 215 -- .../fluent/models/BuildResourceInner.java | 251 -- .../fluent/models/BuildTokenInner.java | 100 - .../fluent/models/BuilderProperties.java | 160 - .../fluent/models/BuilderResourceInner.java | 274 -- .../BuilderResourceUpdateProperties.java | 96 - .../fluent/models/CertificateInner.java | 192 - .../CheckNameAvailabilityResponseInner.java | 153 - .../models/ConnectedEnvironmentInner.java | 314 -- .../ConnectedEnvironmentProperties.java | 208 -- .../ConnectedEnvironmentStorageInner.java | 168 - ...tedEnvironmentStoragesCollectionInner.java | 109 - .../models/ContainerAppAuthTokenInner.java | 200 -- .../ContainerAppAuthTokenProperties.java | 101 - .../fluent/models/ContainerAppInner.java | 531 --- .../ContainerAppJobExecutionsInner.java | 123 - .../fluent/models/ContainerAppProperties.java | 379 -- .../models/ContainerAppsBuildProperties.java | 158 - .../ContainerAppsBuildResourceInner.java | 205 -- .../ContainerAppsPatchResourceInner.java | 155 - .../CustomHostnameAnalysisResultInner.java | 343 -- .../fluent/models/DaprComponentInner.java | 365 -- .../models/DaprComponentProperties.java | 336 -- .../DaprComponentResiliencyPolicyInner.java | 205 -- ...prComponentResiliencyPolicyProperties.java | 134 - .../models/DaprSecretsCollectionInner.java | 107 - .../fluent/models/DaprSubscriptionInner.java | 319 -- .../models/DaprSubscriptionProperties.java | 274 -- .../models/DiagnosticsCollectionInner.java | 122 - .../fluent/models/DiagnosticsInner.java | 166 - .../fluent/models/DotNetComponentInner.java | 237 -- .../models/DotNetComponentProperties.java | 183 - .../models/EnvironmentAuthTokenInner.java | 200 -- .../EnvironmentAuthTokenProperties.java | 101 - .../fluent/models/HeaderMatchMatch.java | 177 - .../fluent/models/HttpRetryPolicyMatches.java | 158 - .../models/HttpRetryPolicyRetryBackOff.java | 123 - .../fluent/models/JavaComponentInner.java | 166 - .../fluent/models/JobExecutionBaseInner.java | 121 - .../fluent/models/JobExecutionInner.java | 274 -- .../fluent/models/JobExecutionProperties.java | 209 -- .../appcontainers/fluent/models/JobInner.java | 380 -- .../fluent/models/JobProperties.java | 253 -- .../models/JobSecretsCollectionInner.java | 107 - .../fluent/models/LogicAppInner.java | 162 - .../models/ManagedCertificateInner.java | 192 - .../models/ManagedEnvironmentInner.java | 672 ---- .../models/ManagedEnvironmentProperties.java | 663 ---- .../ManagedEnvironmentStorageInner.java | 168 - ...gedEnvironmentStoragesCollectionInner.java | 109 - .../fluent/models/OperationDetailInner.java | 181 - .../PrivateEndpointConnectionInner.java | 227 -- .../PrivateEndpointConnectionProperties.java | 179 - .../models/PrivateLinkResourceInner.java | 197 -- .../models/PrivateLinkResourceProperties.java | 130 - .../fluent/models/ReplicaCollectionInner.java | 105 - .../fluent/models/ReplicaInner.java | 231 -- .../fluent/models/ReplicaProperties.java | 186 - .../fluent/models/RevisionInner.java | 262 -- .../fluent/models/RevisionProperties.java | 260 -- .../fluent/models/SecretsCollectionInner.java | 106 - .../fluent/models/SessionPoolInner.java | 402 --- .../fluent/models/SessionPoolProperties.java | 371 -- ...sionPoolUpdatablePropertiesProperties.java | 238 -- .../fluent/models/SourceControlInner.java | 238 -- .../models/SourceControlProperties.java | 178 - .../fluent/models/UsageInner.java | 186 - .../fluent/models/WorkflowEnvelopeInner.java | 201 -- .../models/WorkloadProfileStatesInner.java | 167 - .../fluent/models/package-info.java | 11 - .../appcontainers/fluent/package-info.java | 11 - .../AppResilienciesClientImpl.java | 926 ----- .../implementation/AppResilienciesImpl.java | 156 - .../implementation/AppResiliencyImpl.java | 183 - .../implementation/AuthConfigImpl.java | 185 - .../AvailableWorkloadProfileImpl.java | 54 - .../AvailableWorkloadProfilesClientImpl.java | 271 -- .../AvailableWorkloadProfilesImpl.java | 45 - .../BillingMeterCollectionImpl.java | 40 - .../BillingMetersClientImpl.java | 179 - .../implementation/BillingMetersImpl.java | 55 - .../BuildAuthTokensClientImpl.java | 202 -- .../implementation/BuildAuthTokensImpl.java | 57 - .../implementation/BuildResourceImpl.java | 162 - .../implementation/BuildTokenImpl.java | 37 - .../implementation/BuilderResourceImpl.java | 217 -- .../implementation/BuildersClientImpl.java | 1282 ------- .../implementation/BuildersImpl.java | 147 - .../BuildsByBuilderResourcesClientImpl.java | 274 -- .../BuildsByBuilderResourcesImpl.java | 45 - .../implementation/BuildsClientImpl.java | 696 ---- .../implementation/BuildsImpl.java | 145 - .../implementation/CertificateImpl.java | 190 - .../CertificatesClientImpl.java | 911 ----- .../implementation/CertificatesImpl.java | 124 - .../CheckNameAvailabilityResponseImpl.java | 41 - .../ConnectedEnvironmentImpl.java | 224 -- .../ConnectedEnvironmentStorageImpl.java | 141 - ...ctedEnvironmentStoragesCollectionImpl.java | 44 - ...tedEnvironmentsCertificatesClientImpl.java | 924 ----- ...ConnectedEnvironmentsCertificatesImpl.java | 160 - .../ConnectedEnvironmentsClientImpl.java | 1383 -------- ...dEnvironmentsDaprComponentsClientImpl.java | 907 ----- ...nnectedEnvironmentsDaprComponentsImpl.java | 187 - .../ConnectedEnvironmentsImpl.java | 197 -- ...nnectedEnvironmentsStoragesClientImpl.java | 651 ---- .../ConnectedEnvironmentsStoragesImpl.java | 173 - .../ContainerAppAuthTokenImpl.java | 69 - .../implementation/ContainerAppImpl.java | 336 -- .../ContainerAppJobExecutionsImpl.java | 48 - .../ContainerAppsApiClientBuilder.java | 138 - .../ContainerAppsApiClientImpl.java | 961 ----- .../ContainerAppsAuthConfigsClientImpl.java | 738 ---- .../ContainerAppsAuthConfigsImpl.java | 160 - .../ContainerAppsBuildResourceImpl.java | 69 - ...erAppsBuildsByContainerAppsClientImpl.java | 286 -- ...ontainerAppsBuildsByContainerAppsImpl.java | 50 - .../ContainerAppsBuildsClientImpl.java | 441 --- .../ContainerAppsBuildsImpl.java | 66 - .../ContainerAppsClientImpl.java | 2168 ------------ .../ContainerAppsDiagnosticsClientImpl.java | 949 ----- .../ContainerAppsDiagnosticsImpl.java | 128 - .../implementation/ContainerAppsImpl.java | 252 -- .../ContainerAppsPatchResourceImpl.java | 50 - .../ContainerAppsPatchesClientImpl.java | 1202 ------- .../ContainerAppsPatchesImpl.java | 115 - ...ntainerAppsRevisionReplicasClientImpl.java | 365 -- .../ContainerAppsRevisionReplicasImpl.java | 83 - .../ContainerAppsRevisionsClientImpl.java | 870 ----- .../ContainerAppsRevisionsImpl.java | 100 - .../ContainerAppsSessionPoolsClientImpl.java | 1358 -------- .../ContainerAppsSessionPoolsImpl.java | 146 - ...ContainerAppsSourceControlsClientImpl.java | 1108 ------ .../ContainerAppsSourceControlsImpl.java | 168 - .../CustomHostnameAnalysisResultImpl.java | 105 - .../implementation/DaprComponentImpl.java | 247 -- ...ComponentResiliencyPoliciesClientImpl.java | 808 ----- .../DaprComponentResiliencyPoliciesImpl.java | 186 - .../DaprComponentResiliencyPolicyImpl.java | 155 - .../DaprComponentsClientImpl.java | 893 ----- .../implementation/DaprComponentsImpl.java | 126 - .../DaprSecretsCollectionImpl.java | 40 - .../implementation/DaprSubscriptionImpl.java | 202 -- .../DaprSubscriptionsClientImpl.java | 749 ---- .../implementation/DaprSubscriptionsImpl.java | 158 - .../DiagnosticsCollectionImpl.java | 47 - .../implementation/DiagnosticsImpl.java | 50 - .../implementation/DotNetComponentImpl.java | 166 - .../DotNetComponentsClientImpl.java | 1235 ------- .../implementation/DotNetComponentsImpl.java | 157 - .../EnvironmentAuthTokenImpl.java | 69 - .../FunctionsExtensionsClientImpl.java | 220 -- .../FunctionsExtensionsImpl.java | 46 - .../implementation/JavaComponentImpl.java | 129 - .../JavaComponentsClientImpl.java | 1231 ------- .../implementation/JavaComponentsImpl.java | 157 - .../implementation/JobExecutionBaseImpl.java | 36 - .../implementation/JobExecutionImpl.java | 64 - .../appcontainers/implementation/JobImpl.java | 308 -- .../JobSecretsCollectionImpl.java | 40 - .../implementation/JobsClientImpl.java | 3097 ----------------- .../JobsExecutionsClientImpl.java | 302 -- .../implementation/JobsExecutionsImpl.java | 45 - .../implementation/JobsImpl.java | 309 -- .../implementation/LogicAppImpl.java | 156 - .../implementation/LogicAppsClientImpl.java | 1386 -------- .../implementation/LogicAppsImpl.java | 235 -- .../ManagedCertificateImpl.java | 189 - .../ManagedCertificatesClientImpl.java | 1106 ------ .../ManagedCertificatesImpl.java | 161 - ...nagedEnvironmentDiagnosticsClientImpl.java | 360 -- .../ManagedEnvironmentDiagnosticsImpl.java | 80 - .../ManagedEnvironmentImpl.java | 376 -- ...tPrivateEndpointConnectionsClientImpl.java | 1000 ------ ...ronmentPrivateEndpointConnectionsImpl.java | 169 - ...ronmentPrivateLinkResourcesClientImpl.java | 283 -- ...edEnvironmentPrivateLinkResourcesImpl.java | 46 - .../ManagedEnvironmentStorageImpl.java | 138 - ...agedEnvironmentStoragesCollectionImpl.java | 44 - .../ManagedEnvironmentUsagesClientImpl.java | 279 -- .../ManagedEnvironmentUsagesImpl.java | 45 - .../ManagedEnvironmentsClientImpl.java | 1776 ---------- ...agedEnvironmentsDiagnosticsClientImpl.java | 203 -- .../ManagedEnvironmentsDiagnosticsImpl.java | 57 - .../ManagedEnvironmentsImpl.java | 186 - ...ManagedEnvironmentsStoragesClientImpl.java | 646 ---- .../ManagedEnvironmentsStoragesImpl.java | 170 - .../implementation/NamespacesClientImpl.java | 227 -- .../implementation/NamespacesImpl.java | 61 - .../implementation/OperationDetailImpl.java | 45 - .../implementation/OperationsClientImpl.java | 231 -- .../implementation/OperationsImpl.java | 45 - .../PrivateEndpointConnectionImpl.java | 164 - .../PrivateLinkResourceImpl.java | 69 - .../implementation/ReplicaCollectionImpl.java | 43 - .../implementation/ReplicaImpl.java | 80 - .../implementation/ResourceManagerUtils.java | 195 -- .../ResourceProvidersClientImpl.java | 301 -- .../implementation/ResourceProvidersImpl.java | 65 - .../implementation/RevisionImpl.java | 94 - .../implementation/SecretsCollectionImpl.java | 40 - .../implementation/SessionPoolImpl.java | 285 -- .../implementation/SourceControlImpl.java | 176 - .../implementation/UsageImpl.java | 44 - .../implementation/UsagesClientImpl.java | 258 -- .../implementation/UsagesImpl.java | 45 - .../implementation/WorkflowEnvelopeImpl.java | 53 - .../WorkloadProfileStatesImpl.java | 50 - .../implementation/package-info.java | 11 - .../appcontainers/models/AccessMode.java | 51 - .../appcontainers/models/Action.java | 51 - .../models/ActiveRevisionsMode.java | 54 - .../appcontainers/models/Affinity.java | 51 - .../models/AllowedAudiencesValidation.java | 98 - .../models/AllowedPrincipals.java | 124 - .../models/AppInsightsConfiguration.java | 93 - .../models/AppLogsConfiguration.java | 127 - .../appcontainers/models/AppProtocol.java | 51 - .../appcontainers/models/AppRegistration.java | 121 - .../appcontainers/models/AppResiliencies.java | 175 - .../appcontainers/models/AppResiliency.java | 358 -- .../models/AppResiliencyCollection.java | 122 - .../appcontainers/models/Apple.java | 158 - .../models/AppleRegistration.java | 121 - .../appcontainers/models/Applicability.java | 51 - .../appcontainers/models/AuthConfig.java | 388 --- .../models/AuthConfigCollection.java | 122 - .../appcontainers/models/AuthPlatform.java | 132 - .../models/AvailableOperations.java | 131 - .../models/AvailableWorkloadProfile.java | 62 - .../AvailableWorkloadProfileProperties.java | 235 -- .../models/AvailableWorkloadProfiles.java | 40 - .../AvailableWorkloadProfilesCollection.java | 126 - .../models/AzureActiveDirectory.java | 225 -- .../models/AzureActiveDirectoryLogin.java | 131 - .../AzureActiveDirectoryRegistration.java | 282 -- .../AzureActiveDirectoryValidation.java | 165 - .../models/AzureCredentials.java | 205 -- .../models/AzureFileProperties.java | 177 - .../models/AzureStaticWebApps.java | 127 - .../AzureStaticWebAppsRegistration.java | 94 - .../appcontainers/models/BaseContainer.java | 306 -- .../appcontainers/models/BillingMeter.java | 193 - .../models/BillingMeterCollection.java | 27 - .../models/BillingMeterProperties.java | 149 - .../appcontainers/models/BillingMeters.java | 42 - .../appcontainers/models/BindingType.java | 51 - .../models/BlobStorageTokenStore.java | 104 - .../appcontainers/models/BuildAuthTokens.java | 42 - .../appcontainers/models/BuildCollection.java | 134 - .../models/BuildConfiguration.java | 218 -- .../models/BuildProvisioningState.java | 71 - .../appcontainers/models/BuildResource.java | 261 -- .../appcontainers/models/BuildStatus.java | 66 - .../appcontainers/models/BuildToken.java | 34 - .../models/BuilderCollection.java | 135 - .../models/BuilderProvisioningState.java | 71 - .../appcontainers/models/BuilderResource.java | 333 -- .../models/BuilderResourceUpdate.java | 173 - .../appcontainers/models/Builders.java | 158 - .../appcontainers/models/Builds.java | 118 - .../models/BuildsByBuilderResources.java | 38 - .../appcontainers/models/Certificate.java | 253 -- .../models/CertificateCollection.java | 122 - .../models/CertificateKeyVaultProperties.java | 125 - .../models/CertificatePatch.java | 95 - .../models/CertificateProperties.java | 336 -- .../models/CertificateProvisioningState.java | 66 - .../appcontainers/models/CertificateType.java | 51 - .../appcontainers/models/Certificates.java | 171 - .../models/CheckNameAvailabilityReason.java | 51 - .../models/CheckNameAvailabilityRequest.java | 121 - .../models/CheckNameAvailabilityResponse.java | 40 - .../models/CircuitBreakerPolicy.java | 156 - .../models/ClientCredentialMethod.java | 51 - .../models/ClientRegistration.java | 121 - .../appcontainers/models/Configuration.java | 361 -- .../models/ConnectedEnvironment.java | 424 --- .../ConnectedEnvironmentCollection.java | 117 - ...ConnectedEnvironmentProvisioningState.java | 85 - .../models/ConnectedEnvironmentStorage.java | 189 - ...ConnectedEnvironmentStorageProperties.java | 129 - ...onnectedEnvironmentStoragesCollection.java | 28 - .../models/ConnectedEnvironments.java | 238 -- .../ConnectedEnvironmentsCertificates.java | 157 - .../ConnectedEnvironmentsDaprComponents.java | 195 -- .../models/ConnectedEnvironmentsStorages.java | 157 - .../appcontainers/models/Container.java | 207 -- .../appcontainers/models/ContainerApp.java | 726 ---- .../models/ContainerAppAuthToken.java | 78 - .../models/ContainerAppCollection.java | 122 - .../ContainerAppContainerRunningState.java | 56 - .../models/ContainerAppJobExecutions.java | 34 - .../models/ContainerAppProbe.java | 359 -- .../models/ContainerAppProbeHttpGet.java | 217 -- ...ntainerAppProbeHttpGetHttpHeadersItem.java | 137 - .../models/ContainerAppProbeTcpSocket.java | 125 - ...nerAppPropertiesPatchingConfiguration.java | 102 - .../models/ContainerAppProvisioningState.java | 66 - .../ContainerAppReplicaRunningState.java | 56 - .../models/ContainerAppSecret.java | 131 - .../appcontainers/models/ContainerApps.java | 321 -- .../models/ContainerAppsAuthConfigs.java | 157 - .../models/ContainerAppsBuildCollection.java | 136 - .../ContainerAppsBuildConfiguration.java | 157 - .../models/ContainerAppsBuildResource.java | 83 - .../models/ContainerAppsBuilds.java | 66 - .../ContainerAppsBuildsByContainerApps.java | 40 - .../models/ContainerAppsDiagnostics.java | 161 - .../models/ContainerAppsPatchResource.java | 55 - .../models/ContainerAppsPatches.java | 152 - .../models/ContainerAppsRevisionReplicas.java | 75 - .../models/ContainerAppsRevisions.java | 160 - .../models/ContainerAppsSessionPools.java | 168 - .../models/ContainerAppsSourceControls.java | 164 - .../models/ContainerExecutionStatus.java | 177 - .../models/ContainerRegistry.java | 135 - .../ContainerRegistryWithCustomImage.java | 134 - .../models/ContainerResources.java | 137 - .../appcontainers/models/ContainerType.java | 51 - .../models/CookieExpiration.java | 121 - .../models/CookieExpirationConvention.java | 56 - .../appcontainers/models/CorsPolicy.java | 250 -- .../models/CustomContainerTemplate.java | 163 - .../appcontainers/models/CustomDomain.java | 159 - .../models/CustomDomainConfiguration.java | 249 -- .../models/CustomHostnameAnalysisResult.java | 108 - ...ltCustomDomainVerificationFailureInfo.java | 156 - ...ainVerificationFailureInfoDetailsItem.java | 121 - .../models/CustomOpenIdConnectProvider.java | 159 - .../appcontainers/models/CustomScaleRule.java | 190 - .../appcontainers/models/Dapr.java | 298 -- .../appcontainers/models/DaprComponent.java | 484 --- .../DaprComponentResiliencyPolicies.java | 174 - ...ComponentResiliencyPoliciesCollection.java | 126 - .../models/DaprComponentResiliencyPolicy.java | 224 -- ...licyCircuitBreakerPolicyConfiguration.java | 164 - ...omponentResiliencyPolicyConfiguration.java | 166 - ...cyPolicyHttpRetryBackOffConfiguration.java | 133 - ...ncyPolicyHttpRetryPolicyConfiguration.java | 131 - ...iencyPolicyTimeoutPolicyConfiguration.java | 98 - .../models/DaprComponentServiceBinding.java | 152 - .../appcontainers/models/DaprComponents.java | 172 - .../models/DaprComponentsCollection.java | 122 - .../models/DaprConfiguration.java | 81 - .../appcontainers/models/DaprMetadata.java | 149 - .../appcontainers/models/DaprSecret.java | 97 - .../models/DaprSecretsCollection.java | 27 - .../models/DaprServiceBindMetadata.java | 121 - .../models/DaprSubscription.java | 392 --- .../DaprSubscriptionBulkSubscribeOptions.java | 156 - .../models/DaprSubscriptionRouteRule.java | 127 - .../models/DaprSubscriptionRoutes.java | 127 - .../models/DaprSubscriptions.java | 164 - .../models/DaprSubscriptionsCollection.java | 124 - .../models/DataDogConfiguration.java | 121 - .../models/DefaultAuthorizationPolicy.java | 129 - .../models/DefaultErrorResponseError.java | 188 - .../DefaultErrorResponseErrorException.java | 42 - .../models/DestinationsConfiguration.java | 131 - .../appcontainers/models/DetectionStatus.java | 56 - .../DiagnosticDataProviderMetadata.java | 129 - ...icDataProviderMetadataPropertyBagItem.java | 123 - .../DiagnosticDataTableResponseColumn.java | 150 - .../DiagnosticDataTableResponseObject.java | 157 - .../models/DiagnosticRendering.java | 177 - .../models/DiagnosticSupportTopic.java | 97 - .../appcontainers/models/Diagnostics.java | 55 - .../models/DiagnosticsCollection.java | 34 - .../models/DiagnosticsDataApiResponse.java | 127 - .../models/DiagnosticsDefinition.java | 242 -- .../models/DiagnosticsProperties.java | 193 - .../models/DiagnosticsStatus.java | 121 - .../models/DnsVerificationTestResult.java | 61 - .../appcontainers/models/DotNetComponent.java | 265 -- .../DotNetComponentConfigurationProperty.java | 123 - .../DotNetComponentProvisioningState.java | 66 - .../models/DotNetComponentServiceBind.java | 121 - .../models/DotNetComponentType.java | 46 - .../models/DotNetComponents.java | 144 - .../models/DotNetComponentsCollection.java | 124 - .../models/DynamicPoolConfiguration.java | 122 - .../models/EncryptionSettings.java | 122 - .../models/EnvironmentAuthToken.java | 78 - .../models/EnvironmentProvisioningState.java | 94 - .../appcontainers/models/EnvironmentVar.java | 149 - .../models/EnvironmentVariable.java | 133 - .../appcontainers/models/ErrorEntity.java | 299 -- .../appcontainers/models/ExecutionStatus.java | 99 - .../appcontainers/models/ExecutionType.java | 46 - .../models/ExtendedLocation.java | 121 - .../models/ExtendedLocationTypes.java | 46 - .../appcontainers/models/Facebook.java | 186 - .../appcontainers/models/ForwardProxy.java | 149 - .../models/ForwardProxyConvention.java | 61 - .../models/FunctionsExtensions.java | 46 - .../appcontainers/models/GitHub.java | 158 - .../models/GithubActionConfiguration.java | 387 -- .../models/GlobalValidation.java | 167 - .../appcontainers/models/Google.java | 189 - .../appcontainers/models/Header.java | 121 - .../appcontainers/models/HeaderMatch.java | 206 -- .../models/HttpConnectionPool.java | 121 - .../appcontainers/models/HttpGet.java | 158 - .../appcontainers/models/HttpRetryPolicy.java | 251 -- .../appcontainers/models/HttpScaleRule.java | 159 - .../appcontainers/models/HttpSettings.java | 159 - .../models/HttpSettingsRoutes.java | 93 - .../models/IdentityProviders.java | 328 -- .../models/IdentitySettings.java | 134 - .../models/IdentitySettingsLifeCycle.java | 61 - .../appcontainers/models/ImageType.java | 52 - .../appcontainers/models/Ingress.java | 485 --- .../models/IngressClientCertificateMode.java | 58 - .../models/IngressPortMapping.java | 152 - .../models/IngressStickySessions.java | 93 - .../models/IngressTargetPortHttpScheme.java | 51 - .../models/IngressTransportMethod.java | 61 - .../appcontainers/models/InitContainer.java | 175 - .../models/IpSecurityRestrictionRule.java | 199 -- .../appcontainers/models/JavaComponent.java | 189 - .../JavaComponentConfigurationProperty.java | 122 - .../models/JavaComponentIngress.java | 81 - .../models/JavaComponentProperties.java | 243 -- .../models/JavaComponentPropertiesScale.java | 121 - .../JavaComponentProvisioningState.java | 66 - .../models/JavaComponentServiceBind.java | 121 - .../models/JavaComponentType.java | 66 - .../appcontainers/models/JavaComponents.java | 144 - .../models/JavaComponentsCollection.java | 122 - .../appcontainers/models/Job.java | 537 --- .../models/JobConfiguration.java | 362 -- .../JobConfigurationEventTriggerConfig.java | 156 - .../JobConfigurationManualTriggerConfig.java | 128 - ...JobConfigurationScheduleTriggerConfig.java | 165 - .../appcontainers/models/JobExecution.java | 76 - .../models/JobExecutionBase.java | 33 - .../models/JobExecutionContainer.java | 243 -- .../models/JobExecutionRunningState.java | 76 - .../models/JobExecutionTemplate.java | 133 - .../models/JobPatchProperties.java | 191 - .../models/JobPatchPropertiesProperties.java | 214 -- .../models/JobProvisioningState.java | 66 - .../appcontainers/models/JobRunningState.java | 56 - .../appcontainers/models/JobScale.java | 182 - .../appcontainers/models/JobScaleRule.java | 216 -- .../models/JobSecretsCollection.java | 27 - .../appcontainers/models/JobTemplate.java | 164 - .../appcontainers/models/Jobs.java | 426 --- .../appcontainers/models/JobsCollection.java | 122 - .../appcontainers/models/JobsExecutions.java | 41 - .../appcontainers/models/JwtClaimChecks.java | 126 - .../models/KedaConfiguration.java | 81 - .../appcontainers/models/Kind.java | 47 - .../appcontainers/models/Level.java | 71 - .../models/ListUsagesResult.java | 130 - .../models/LogAnalyticsConfiguration.java | 152 - .../appcontainers/models/LogLevel.java | 61 - .../appcontainers/models/LoggerSetting.java | 133 - .../appcontainers/models/LogicApp.java | 234 -- .../appcontainers/models/LogicApps.java | 289 -- .../models/LogicAppsProxyMethod.java | 51 - .../appcontainers/models/Login.java | 260 -- .../appcontainers/models/LoginRoutes.java | 93 - .../appcontainers/models/LoginScopes.java | 95 - .../models/LogsConfiguration.java | 95 - .../models/ManagedCertificate.java | 253 -- .../models/ManagedCertificateCollection.java | 124 - ...gedCertificateDomainControlValidation.java | 57 - .../models/ManagedCertificatePatch.java | 95 - .../models/ManagedCertificateProperties.java | 174 - .../models/ManagedCertificates.java | 157 - .../models/ManagedEnvironment.java | 889 ----- .../models/ManagedEnvironmentDiagnostics.java | 80 - ...EnvironmentPrivateEndpointConnections.java | 152 - ...anagedEnvironmentPrivateLinkResources.java | 38 - ...vironmentPropertiesPeerAuthentication.java | 98 - ...entPropertiesPeerTrafficConfiguration.java | 101 - ...iesPeerTrafficConfigurationEncryption.java | 98 - .../models/ManagedEnvironmentStorage.java | 189 - .../ManagedEnvironmentStorageProperties.java | 130 - .../ManagedEnvironmentStoragesCollection.java | 28 - .../models/ManagedEnvironmentUsages.java | 42 - .../models/ManagedEnvironments.java | 258 -- .../models/ManagedEnvironmentsCollection.java | 125 - .../ManagedEnvironmentsDiagnostics.java | 44 - .../models/ManagedEnvironmentsStorages.java | 157 - .../models/ManagedServiceIdentity.java | 190 - .../models/ManagedServiceIdentityType.java | 62 - .../models/MetricsConfiguration.java | 123 - .../appcontainers/models/Mtls.java | 93 - .../appcontainers/models/NacosComponent.java | 182 - .../appcontainers/models/Namespaces.java | 48 - .../models/NfsAzureFileProperties.java | 149 - .../appcontainers/models/Nonce.java | 124 - .../models/OpenIdConnectClientCredential.java | 125 - .../models/OpenIdConnectConfig.java | 207 -- .../models/OpenIdConnectLogin.java | 123 - .../models/OpenIdConnectRegistration.java | 159 - .../models/OpenTelemetryConfiguration.java | 191 - .../appcontainers/models/OperationDetail.java | 47 - .../models/OperationDisplay.java | 177 - .../appcontainers/models/Operations.java | 35 - .../models/OtlpConfiguration.java | 182 - .../models/PatchApplyStatus.java | 86 - .../appcontainers/models/PatchCollection.java | 135 - .../appcontainers/models/PatchDetails.java | 203 -- .../models/PatchDetailsNewLayer.java | 149 - .../models/PatchDetailsOldLayer.java | 149 - .../appcontainers/models/PatchProperties.java | 222 -- .../appcontainers/models/PatchSkipConfig.java | 93 - .../appcontainers/models/PatchType.java | 61 - .../appcontainers/models/PatchingMode.java | 58 - .../models/PoolManagementType.java | 51 - .../appcontainers/models/PreBuildStep.java | 154 - .../appcontainers/models/PrivateEndpoint.java | 81 - .../models/PrivateEndpointConnection.java | 245 -- .../PrivateEndpointConnectionListResult.java | 118 - ...teEndpointConnectionProvisioningState.java | 77 - ...rivateEndpointServiceConnectionStatus.java | 62 - .../models/PrivateLinkResource.java | 70 - .../models/PrivateLinkResourceListResult.java | 117 - .../PrivateLinkServiceConnectionState.java | 155 - .../models/PublicNetworkAccess.java | 51 - .../appcontainers/models/QueueScaleRule.java | 213 -- .../models/RegistryCredentials.java | 182 - .../appcontainers/models/RegistryInfo.java | 149 - .../appcontainers/models/Replica.java | 85 - .../models/ReplicaCollection.java | 27 - .../models/ReplicaContainer.java | 286 -- .../models/ReplicaExecutionStatus.java | 127 - .../models/ResourceProviders.java | 65 - .../appcontainers/models/Revision.java | 130 - .../models/RevisionCollection.java | 122 - .../models/RevisionHealthState.java | 56 - .../models/RevisionProvisioningState.java | 66 - .../models/RevisionRunningState.java | 71 - .../appcontainers/models/Runtime.java | 127 - .../appcontainers/models/RuntimeDotnet.java | 93 - .../appcontainers/models/RuntimeJava.java | 124 - .../models/RuntimeJavaAgent.java | 124 - .../models/RuntimeJavaAgentLogging.java | 99 - .../appcontainers/models/Scale.java | 210 -- .../models/ScaleConfiguration.java | 121 - .../appcontainers/models/ScaleRule.java | 217 -- .../appcontainers/models/ScaleRuleAuth.java | 121 - .../appcontainers/models/ScgRoute.java | 218 -- .../appcontainers/models/Scheme.java | 51 - .../appcontainers/models/Secret.java | 180 - .../models/SecretVolumeItem.java | 123 - .../models/SecretsCollection.java | 27 - .../appcontainers/models/Service.java | 100 - .../appcontainers/models/ServiceBind.java | 180 - .../models/SessionContainer.java | 243 -- .../models/SessionContainerResources.java | 121 - .../appcontainers/models/SessionIngress.java | 93 - .../models/SessionNetworkConfiguration.java | 94 - .../models/SessionNetworkStatus.java | 51 - .../appcontainers/models/SessionPool.java | 481 --- .../models/SessionPoolCollection.java | 122 - .../models/SessionPoolProvisioningState.java | 66 - .../models/SessionPoolSecret.java | 121 - .../SessionPoolUpdatableProperties.java | 208 -- .../models/SessionRegistryCredentials.java | 182 - .../appcontainers/models/SmbStorage.java | 233 -- .../appcontainers/models/SourceControl.java | 302 -- .../models/SourceControlCollection.java | 122 - .../models/SourceControlOperationState.java | 61 - .../models/SpringBootAdminComponent.java | 183 - .../models/SpringCloudConfigComponent.java | 152 - .../models/SpringCloudEurekaComponent.java | 183 - .../models/SpringCloudGatewayComponent.java | 216 -- .../appcontainers/models/StorageType.java | 66 - .../models/TcpConnectionPool.java | 93 - .../appcontainers/models/TcpRetryPolicy.java | 93 - .../appcontainers/models/TcpScaleRule.java | 159 - .../appcontainers/models/Template.java | 293 -- .../appcontainers/models/TimeoutPolicy.java | 121 - .../appcontainers/models/TokenStore.java | 165 - .../models/TracesConfiguration.java | 123 - .../appcontainers/models/TrafficWeight.java | 177 - .../appcontainers/models/TriggerType.java | 56 - .../appcontainers/models/Twitter.java | 127 - .../models/TwitterRegistration.java | 132 - .../appcontainers/models/Type.java | 56 - .../models/UnauthenticatedClientActionV2.java | 66 - .../appcontainers/models/Usage.java | 47 - .../appcontainers/models/UsageName.java | 121 - .../appcontainers/models/Usages.java | 40 - .../models/UserAssignedIdentity.java | 100 - .../models/VnetConfiguration.java | 221 -- .../appcontainers/models/Volume.java | 215 -- .../appcontainers/models/VolumeMount.java | 151 - .../models/WorkflowArtifacts.java | 152 - .../models/WorkflowEnvelope.java | 61 - .../models/WorkflowEnvelopeCollection.java | 124 - .../models/WorkflowEnvelopeProperties.java | 152 - .../appcontainers/models/WorkflowHealth.java | 132 - .../models/WorkflowHealthState.java | 66 - .../appcontainers/models/WorkflowState.java | 71 - .../appcontainers/models/WorkloadProfile.java | 218 -- .../models/WorkloadProfileStates.java | 55 - .../WorkloadProfileStatesCollection.java | 125 - .../WorkloadProfileStatesProperties.java | 150 - .../appcontainers/models/package-info.java | 11 - .../appcontainers/package-info.java | 11 - .../src/main/java/module-info.java | 15 - .../proxy-config.json | 1 - .../reflect-config.json | 1 - .../AppResiliencyCreateOrUpdateSamples.java | 54 - .../generated/AppResiliencyDeleteSamples.java | 24 - .../generated/AppResiliencyGetSamples.java | 24 - .../generated/AppResiliencyListSamples.java | 23 - .../generated/AppResiliencyUpdateSamples.java | 31 - .../AvailableWorkloadProfilesGetSamples.java | 23 - .../generated/BillingMetersGetSamples.java | 23 - .../generated/BuildAuthTokenListSamples.java | 23 - .../BuildersCreateOrUpdateSamples.java | 63 - .../generated/BuildersDeleteSamples.java | 23 - .../BuildersGetByResourceGroupSamples.java | 23 - .../BuildersListByResourceGroupSamples.java | 25 - .../generated/BuildersListSamples.java | 25 - .../generated/BuildersUpdateSamples.java | 42 - .../BuildsByBuilderResourceListSamples.java | 25 - .../BuildsCreateOrUpdateSamples.java | 66 - .../generated/BuildsDeleteSamples.java | 23 - .../generated/BuildsGetSamples.java | 23 - .../CertificatesCreateOrUpdateSamples.java | 58 - .../generated/CertificatesDeleteSamples.java | 25 - .../generated/CertificatesGetSamples.java | 25 - .../generated/CertificatesListSamples.java | 24 - .../generated/CertificatesUpdateSamples.java | 42 - ...entsCertificatesCreateOrUpdateSamples.java | 32 - ...EnvironmentsCertificatesDeleteSamples.java | 25 - ...tedEnvironmentsCertificatesGetSamples.java | 25 - ...edEnvironmentsCertificatesListSamples.java | 25 - ...EnvironmentsCertificatesUpdateSamples.java | 43 - ...ironmentsCheckNameAvailabilitySamples.java | 30 - ...ctedEnvironmentsCreateOrUpdateSamples.java | 35 - ...tsDaprComponentsCreateOrUpdateSamples.java | 47 - ...vironmentsDaprComponentsDeleteSamples.java | 24 - ...dEnvironmentsDaprComponentsGetSamples.java | 24 - ...EnvironmentsDaprComponentsListSamples.java | 24 - ...mentsDaprComponentsListSecretsSamples.java | 25 - .../ConnectedEnvironmentsDeleteSamples.java | 25 - ...EnvironmentsGetByResourceGroupSamples.java | 26 - ...nvironmentsListByResourceGroupSamples.java | 24 - .../ConnectedEnvironmentsListSamples.java | 24 - ...ronmentsStoragesCreateOrUpdateSamples.java | 36 - ...ctedEnvironmentsStoragesDeleteSamples.java | 25 - ...nnectedEnvironmentsStoragesGetSamples.java | 25 - ...nectedEnvironmentsStoragesListSamples.java | 25 - .../ConnectedEnvironmentsUpdateSamples.java | 25 - ...rAppsAuthConfigsCreateOrUpdateSamples.java | 44 - ...ContainerAppsAuthConfigsDeleteSamples.java | 25 - .../ContainerAppsAuthConfigsGetSamples.java | 25 - ...sAuthConfigsListByContainerAppSamples.java | 26 - ...erAppsBuildsByContainerAppListSamples.java | 24 - .../ContainerAppsBuildsDeleteSamples.java | 25 - .../ContainerAppsBuildsGetSamples.java | 24 - .../ContainerAppsCreateOrUpdateSamples.java | 560 --- .../generated/ContainerAppsDeleteSamples.java | 23 - ...inerAppsDiagnosticsGetDetectorSamples.java | 27 - ...inerAppsDiagnosticsGetRevisionSamples.java | 26 - ...ontainerAppsDiagnosticsGetRootSamples.java | 24 - ...erAppsDiagnosticsListDetectorsSamples.java | 25 - ...erAppsDiagnosticsListRevisionsSamples.java | 25 - .../ContainerAppsGetAuthTokenSamples.java | 25 - ...ontainerAppsGetByResourceGroupSamples.java | 24 - ...ntainerAppsListByResourceGroupSamples.java | 24 - ...AppsListCustomHostnameAnalysisSamples.java | 25 - .../generated/ContainerAppsListSamples.java | 24 - .../ContainerAppsListSecretsSamples.java | 25 - .../ContainerAppsPatchesApplySamples.java | 25 - .../ContainerAppsPatchesDeleteSamples.java | 25 - .../ContainerAppsPatchesGetSamples.java | 26 - ...rAppsPatchesListByContainerAppSamples.java | 24 - ...tainerAppsPatchesSkipConfigureSamples.java | 28 - ...AppsRevisionReplicasGetReplicaSamples.java | 26 - ...psRevisionReplicasListReplicasSamples.java | 25 - ...rAppsRevisionsActivateRevisionSamples.java | 26 - ...ppsRevisionsDeactivateRevisionSamples.java | 26 - ...tainerAppsRevisionsGetRevisionSamples.java | 26 - ...inerAppsRevisionsListRevisionsSamples.java | 25 - ...erAppsRevisionsRestartRevisionSamples.java | 26 - ...AppsSessionPoolsCreateOrUpdateSamples.java | 59 - ...ontainerAppsSessionPoolsDeleteSamples.java | 23 - ...SessionPoolsGetByResourceGroupSamples.java | 24 - ...essionPoolsListByResourceGroupSamples.java | 24 - .../ContainerAppsSessionPoolsListSamples.java | 24 - ...ontainerAppsSessionPoolsUpdateSamples.java | 52 - ...psSourceControlsCreateOrUpdateSamples.java | 51 - ...tainerAppsSourceControlsDeleteSamples.java | 26 - ...ContainerAppsSourceControlsGetSamples.java | 25 - ...urceControlsListByContainerAppSamples.java | 24 - .../generated/ContainerAppsStartSamples.java | 23 - .../generated/ContainerAppsStopSamples.java | 23 - .../generated/ContainerAppsUpdateSamples.java | 151 - ...siliencyPoliciesCreateOrUpdateSamples.java | 110 - ...ponentResiliencyPoliciesDeleteSamples.java | 26 - ...ComponentResiliencyPoliciesGetSamples.java | 26 - ...omponentResiliencyPoliciesListSamples.java | 25 - .../DaprComponentsCreateOrUpdateSamples.java | 79 - .../DaprComponentsDeleteSamples.java | 24 - .../generated/DaprComponentsGetSamples.java | 41 - .../generated/DaprComponentsListSamples.java | 23 - .../DaprComponentsListSecretsSamples.java | 26 - ...aprSubscriptionsCreateOrUpdateSamples.java | 98 - .../DaprSubscriptionsDeleteSamples.java | 25 - .../DaprSubscriptionsGetSamples.java | 55 - .../DaprSubscriptionsListSamples.java | 23 - ...DotNetComponentsCreateOrUpdateSamples.java | 58 - .../DotNetComponentsDeleteSamples.java | 24 - .../generated/DotNetComponentsGetSamples.java | 39 - .../DotNetComponentsListSamples.java | 37 - .../DotNetComponentsUpdateSamples.java | 60 - ...nsExtensionInvokeFunctionsHostSamples.java | 26 - .../JavaComponentsCreateOrUpdateSamples.java | 65 - .../JavaComponentsDeleteSamples.java | 24 - .../generated/JavaComponentsGetSamples.java | 39 - .../generated/JavaComponentsListSamples.java | 37 - .../JavaComponentsUpdateSamples.java | 67 - .../generated/JobsCreateOrUpdateSamples.java | 202 -- .../generated/JobsDeleteSamples.java | 23 - .../generated/JobsExecutionsListSamples.java | 24 - .../JobsGetByResourceGroupSamples.java | 23 - .../generated/JobsGetDetectorSamples.java | 26 - .../JobsListByResourceGroupSamples.java | 25 - .../generated/JobsListDetectorsSamples.java | 24 - .../generated/JobsListSamples.java | 24 - .../generated/JobsListSecretsSamples.java | 24 - .../generated/JobsProxyGetSamples.java | 24 - .../generated/JobsResumeSamples.java | 23 - .../generated/JobsStartSamples.java | 38 - .../generated/JobsStopExecutionSamples.java | 24 - .../JobsStopMultipleExecutionsSamples.java | 24 - .../generated/JobsSuspendSamples.java | 23 - .../generated/JobsUpdateSamples.java | 66 - .../LogicAppsCreateOrUpdateSamples.java | 33 - .../generated/LogicAppsDeleteSamples.java | 26 - ...gicAppsDeployWorkflowArtifactsSamples.java | 57 - .../generated/LogicAppsGetSamples.java | 25 - .../LogicAppsGetWorkflowSamples.java | 25 - .../generated/LogicAppsInvokeSamples.java | 30 - ...icAppsListWorkflowsConnectionsSamples.java | 27 - .../LogicAppsListWorkflowsSamples.java | 24 - ...agedCertificatesCreateOrUpdateSamples.java | 33 - .../ManagedCertificatesDeleteSamples.java | 26 - .../ManagedCertificatesGetSamples.java | 25 - .../ManagedCertificatesListSamples.java | 24 - .../ManagedCertificatesUpdateSamples.java | 45 - ...ironmentDiagnosticsGetDetectorSamples.java | 26 - ...onmentDiagnosticsListDetectorsSamples.java | 25 - ...pointConnectionsCreateOrUpdateSamples.java | 35 - ...ivateEndpointConnectionsDeleteSamples.java | 25 - ...tPrivateEndpointConnectionsGetSamples.java | 25 - ...PrivateEndpointConnectionsListSamples.java | 25 - ...onmentPrivateLinkResourcesListSamples.java | 25 - .../ManagedEnvironmentUsagesListSamples.java | 24 - ...agedEnvironmentsCreateOrUpdateSamples.java | 162 - .../ManagedEnvironmentsDeleteSamples.java | 25 - ...EnvironmentsDiagnosticsGetRootSamples.java | 24 - ...anagedEnvironmentsGetAuthTokenSamples.java | 24 - ...EnvironmentsGetByResourceGroupSamples.java | 24 - ...nvironmentsListByResourceGroupSamples.java | 24 - .../ManagedEnvironmentsListSamples.java | 24 - ...mentsListWorkloadProfileStatesSamples.java | 25 - ...ronmentsStoragesCreateOrUpdateSamples.java | 58 - ...agedEnvironmentsStoragesDeleteSamples.java | 25 - ...ManagedEnvironmentsStoragesGetSamples.java | 40 - ...anagedEnvironmentsStoragesListSamples.java | 25 - .../ManagedEnvironmentsUpdateSamples.java | 44 - ...amespacesCheckNameAvailabilitySamples.java | 47 - .../generated/OperationsListSamples.java | 23 - ...rGetCustomDomainVerificationIdSamples.java | 23 - .../ResourceProviderJobExecutionSamples.java | 24 - .../generated/UsagesListSamples.java | 23 - .../AllowedAudiencesValidationTests.java | 28 - .../generated/AllowedPrincipalsTests.java | 29 - .../AppInsightsConfigurationTests.java | 25 - ...silienciesDeleteWithResponseMockTests.java | 34 - .../generated/AuthPlatformTests.java | 27 - .../generated/AvailableOperationsTests.java | 58 - .../AvailableWorkloadProfileInnerTests.java | 46 - ...ailableWorkloadProfilePropertiesTests.java | 43 - ...ilableWorkloadProfilesCollectionTests.java | 63 - ...AvailableWorkloadProfilesGetMockTests.java | 46 - .../AzureActiveDirectoryLoginTests.java | 31 - .../AzureStaticWebAppsRegistrationTests.java | 25 - .../generated/AzureStaticWebAppsTests.java | 30 - .../BillingMeterCollectionInnerTests.java | 51 - .../BillingMeterPropertiesTests.java | 32 - .../generated/BillingMeterTests.java | 36 - ...BillingMetersGetWithResponseMockTests.java | 41 - .../generated/BlobStorageTokenStoreTests.java | 25 - .../generated/BuildConfigurationTests.java | 71 - .../generated/BuilderCollectionTests.java | 87 - .../generated/BuilderPropertiesTests.java | 34 - .../generated/BuilderResourceInnerTests.java | 68 - .../BuilderResourceUpdatePropertiesTests.java | 26 - .../generated/BuilderResourceUpdateTests.java | 52 - .../BuildersCreateOrUpdateMockTests.java | 71 - ...tByResourceGroupWithResponseMockTests.java | 45 - .../BuildersListByResourceGroupMockTests.java | 47 - .../generated/BuildersListMockTests.java | 47 - .../generated/CertificatePatchTests.java | 41 - ...rtificatesDeleteWithResponseMockTests.java | 34 - .../CheckNameAvailabilityRequestTests.java | 27 - ...eckNameAvailabilityResponseInnerTests.java | 33 - .../generated/CircuitBreakerPolicyTests.java | 33 - ...rtificatesDeleteWithResponseMockTests.java | 34 - ...NameAvailabilityWithResponseMockTests.java | 44 - ...ComponentsDeleteWithResponseMockTests.java | 34 - ...nentsListSecretsWithResponseMockTests.java | 37 - .../ConnectedEnvironmentsDeleteMockTests.java | 33 - ...tsStoragesDeleteWithResponseMockTests.java | 34 - .../ContainerAppJobExecutionsInnerTests.java | 83 - ...erAppProbeHttpGetHttpHeadersItemTests.java | 29 - .../ContainerAppProbeHttpGetTests.java | 45 - .../ContainerAppProbeTcpSocketTests.java | 27 - .../generated/ContainerAppProbeTests.java | 74 - ...pPropertiesPatchingConfigurationTests.java | 27 - ...uthConfigsDeleteWithResponseMockTests.java | 34 - .../ContainerAppsBuildCollectionTests.java | 31 - .../ContainerAppsBuildConfigurationTests.java | 23 - .../ContainerAppsBuildPropertiesTests.java | 23 - .../ContainerAppsBuildResourceInnerTests.java | 23 - ...ppsBuildsByContainerAppsListMockTests.java | 37 - ...nerAppsBuildsGetWithResponseMockTests.java | 37 - .../ContainerAppsDeleteMockTests.java | 33 - ...sticsGetDetectorWithResponseMockTests.java | 50 - ...AppsDiagnosticsListDetectorsMockTests.java | 56 - .../ContainerAppsPatchResourceInnerTests.java | 23 - .../ContainerAppsPatchesApplyMockTests.java | 36 - ...erAppsPatchesGetWithResponseMockTests.java | 37 - ...ppsPatchesListByContainerAppMockTests.java | 37 - ...plicasGetReplicaWithResponseMockTests.java | 48 - ...icasListReplicasWithResponseMockTests.java | 37 - ...ActivateRevisionWithResponseMockTests.java | 34 - ...activateRevisionWithResponseMockTests.java | 35 - ...sRestartRevisionWithResponseMockTests.java | 34 - ...inerAppsSourceControlsDeleteMockTests.java | 34 - .../generated/ContainerRegistryTests.java | 29 - ...ContainerRegistryWithCustomImageTests.java | 29 - .../generated/ContainerResourcesTests.java | 28 - .../generated/CookieExpirationTests.java | 30 - .../generated/CustomDomainTests.java | 34 - ...nentResiliencyPoliciesCollectionTests.java | 88 - ...esCreateOrUpdateWithResponseMockTests.java | 86 - ...cyPoliciesDeleteWithResponseMockTests.java | 34 - ...iencyPoliciesGetWithResponseMockTests.java | 56 - ...ponentResiliencyPoliciesListMockTests.java | 64 - ...ircuitBreakerPolicyConfigurationTests.java | 35 - ...entResiliencyPolicyConfigurationTests.java | 53 - ...icyHttpRetryBackOffConfigurationTests.java | 30 - ...licyHttpRetryPolicyConfigurationTests.java | 35 - ...prComponentResiliencyPolicyInnerTests.java | 89 - ...ponentResiliencyPolicyPropertiesTests.java | 89 - ...PolicyTimeoutPolicyConfigurationTests.java | 27 - .../DaprComponentServiceBindingTests.java | 35 - ...ComponentsDeleteWithResponseMockTests.java | 34 - ...nentsListSecretsWithResponseMockTests.java | 37 - .../generated/DaprConfigurationTests.java | 21 - .../generated/DaprSecretTests.java | 22 - .../DaprSecretsCollectionInnerTests.java | 25 - .../DaprServiceBindMetadataTests.java | 27 - ...SubscriptionBulkSubscribeOptionsTests.java | 32 - .../generated/DaprSubscriptionInnerTests.java | 75 - .../DaprSubscriptionPropertiesTests.java | 77 - .../DaprSubscriptionRouteRuleTests.java | 27 - .../DaprSubscriptionRoutesTests.java | 34 - .../DaprSubscriptionsCollectionTests.java | 82 - ...nsCreateOrUpdateWithResponseMockTests.java | 82 - ...scriptionsDeleteWithResponseMockTests.java | 33 - ...SubscriptionsGetWithResponseMockTests.java | 49 - .../DaprSubscriptionsListMockTests.java | 49 - .../appcontainers/generated/DaprTests.java | 49 - .../DefaultAuthorizationPolicyTests.java | 35 - ...aProviderMetadataPropertyBagItemTests.java | 29 - .../DiagnosticDataProviderMetadataTests.java | 35 - ...iagnosticDataTableResponseColumnTests.java | 32 - ...iagnosticDataTableResponseObjectTests.java | 42 - .../generated/DiagnosticRenderingTests.java | 35 - .../DiagnosticSupportTopicTests.java | 22 - .../DiagnosticsCollectionInnerTests.java | 107 - .../DiagnosticsDataApiResponseTests.java | 63 - .../generated/DiagnosticsDefinitionTests.java | 30 - .../generated/DiagnosticsInnerTests.java | 109 - .../generated/DiagnosticsPropertiesTests.java | 109 - .../generated/DiagnosticsStatusTests.java | 27 - ...etComponentConfigurationPropertyTests.java | 29 - .../generated/DotNetComponentInnerTests.java | 45 - .../DotNetComponentPropertiesTests.java | 46 - .../DotNetComponentServiceBindTests.java | 29 - .../DotNetComponentsCollectionTests.java | 83 - ...tNetComponentsCreateOrUpdateMockTests.java | 59 - ...NetComponentsGetWithResponseMockTests.java | 44 - .../DotNetComponentsListMockTests.java | 44 - .../DynamicPoolConfigurationTests.java | 30 - .../generated/EnvironmentVariableTests.java | 27 - .../generated/ExtendedLocationTests.java | 29 - .../generated/ForwardProxyTests.java | 33 - ...okeFunctionsHostWithResponseMockTests.java | 38 - .../generated/GlobalValidationTests.java | 35 - .../generated/HeaderMatchMatchTests.java | 35 - .../generated/HeaderMatchTests.java | 38 - .../generated/HttpConnectionPoolTests.java | 29 - .../appcontainers/generated/HttpGetTests.java | 32 - .../HttpRetryPolicyRetryBackOffTests.java | 30 - .../generated/HttpSettingsRoutesTests.java | 25 - .../generated/HttpSettingsTests.java | 41 - .../generated/IdentitySettingsTests.java | 29 - .../generated/IngressPortMappingTests.java | 31 - .../generated/IngressStickySessionsTests.java | 26 - .../IpSecurityRestrictionRuleTests.java | 36 - ...vaComponentConfigurationPropertyTests.java | 29 - .../generated/JavaComponentIngressTests.java | 22 - .../generated/JavaComponentInnerTests.java | 49 - .../JavaComponentPropertiesScaleTests.java | 29 - .../JavaComponentPropertiesTests.java | 48 - .../JavaComponentServiceBindTests.java | 28 - .../JavaComponentsCollectionTests.java | 77 - ...JavaComponentsCreateOrUpdateMockTests.java | 59 - ...avaComponentsGetWithResponseMockTests.java | 44 - .../JavaComponentsListMockTests.java | 45 - ...ConfigurationManualTriggerConfigTests.java | 30 - ...nfigurationScheduleTriggerConfigTests.java | 34 - .../generated/JobExecutionBaseInnerTests.java | 27 - .../generated/JobExecutionInnerTests.java | 140 - .../generated/JobsDeleteMockTests.java | 33 - .../JobsExecutionsListMockTests.java | 53 - .../JobsGetDetectorWithResponseMockTests.java | 52 - .../generated/JobsListDetectorsMockTests.java | 56 - .../generated/JobsStopExecutionMockTests.java | 33 - .../JobsStopMultipleExecutionsMockTests.java | 42 - .../generated/JwtClaimChecksTests.java | 30 - .../generated/KedaConfigurationTests.java | 21 - .../generated/ListUsagesResultTests.java | 51 - .../generated/LoggerSettingTests.java | 28 - .../generated/LogicAppInnerTests.java | 24 - ...psCreateOrUpdateWithResponseMockTests.java | 39 - .../LogicAppsDeleteWithResponseMockTests.java | 33 - ...orkflowArtifactsWithResponseMockTests.java | 40 - .../LogicAppsGetWithResponseMockTests.java | 37 - .../LogicAppsInvokeWithResponseMockTests.java | 37 - .../generated/LoginRoutesTests.java | 24 - .../generated/LoginScopesTests.java | 25 - .../generated/LogsConfigurationTests.java | 26 - .../ManagedCertificatePatchTests.java | 41 - ...rtificatesDeleteWithResponseMockTests.java | 34 - ...sticsGetDetectorWithResponseMockTests.java | 50 - ...icsListDetectorsWithResponseMockTests.java | 43 - ...intConnectionsCreateOrUpdateMockTests.java | 52 - ...ntConnectionsGetWithResponseMockTests.java | 43 - ...ivateEndpointConnectionsListMockTests.java | 44 - ...mentPrivateLinkResourcesListMockTests.java | 39 - ...mentPropertiesPeerAuthenticationTests.java | 27 - ...erTrafficConfigurationEncryptionTests.java | 28 - ...opertiesPeerTrafficConfigurationTests.java | 29 - ...ManagedEnvironmentUsagesListMockTests.java | 42 - .../ManagedEnvironmentsDeleteMockTests.java | 33 - ...ntsListWorkloadProfileStatesMockTests.java | 41 - ...tsStoragesDeleteWithResponseMockTests.java | 34 - .../ManagedServiceIdentityTests.java | 43 - .../generated/MetricsConfigurationTests.java | 30 - .../appcontainers/generated/MtlsTests.java | 24 - .../generated/NacosComponentTests.java | 56 - ...NameAvailabilityWithResponseMockTests.java | 44 - .../NfsAzureFilePropertiesTests.java | 33 - .../appcontainers/generated/NonceTests.java | 27 - .../generated/OpenIdConnectLoginTests.java | 29 - .../generated/OperationDetailInnerTests.java | 45 - .../generated/OperationDisplayTests.java | 35 - .../generated/OperationsListMockTests.java | 44 - .../generated/PatchCollectionTests.java | 29 - .../generated/PatchDetailsNewLayerTests.java | 33 - .../generated/PatchDetailsOldLayerTests.java | 32 - .../generated/PatchDetailsTests.java | 23 - .../generated/PatchPropertiesTests.java | 32 - .../generated/PatchSkipConfigTests.java | 24 - .../generated/PreBuildStepTests.java | 39 - .../PrivateEndpointConnectionInnerTests.java | 40 - ...vateEndpointConnectionListResultTests.java | 50 - ...vateEndpointConnectionPropertiesTests.java | 40 - .../generated/PrivateEndpointTests.java | 21 - .../PrivateLinkResourceInnerTests.java | 27 - .../PrivateLinkResourceListResultTests.java | 30 - .../PrivateLinkResourcePropertiesTests.java | 28 - ...rivateLinkServiceConnectionStateTests.java | 35 - .../ReplicaCollectionInnerTests.java | 84 - .../generated/ReplicaContainerTests.java | 38 - .../generated/ReplicaInnerTests.java | 83 - .../generated/ReplicaPropertiesTests.java | 83 - ...inVerificationIdWithResponseMockTests.java | 37 - ...dersJobExecutionWithResponseMockTests.java | 52 - .../generated/RevisionCollectionTests.java | 26 - .../generated/RuntimeDotnetTests.java | 25 - .../RuntimeJavaAgentLoggingTests.java | 33 - .../generated/RuntimeJavaAgentTests.java | 38 - .../generated/RuntimeJavaTests.java | 40 - .../appcontainers/generated/RuntimeTests.java | 48 - .../generated/ScaleConfigurationTests.java | 29 - .../generated/ScgRouteTests.java | 39 - .../appcontainers/generated/ServiceTests.java | 24 - .../SessionContainerResourcesTests.java | 29 - .../generated/SessionIngressTests.java | 24 - .../SessionNetworkConfigurationTests.java | 27 - .../generated/SessionPoolSecretTests.java | 27 - .../SpringBootAdminComponentTests.java | 52 - .../SpringCloudConfigComponentTests.java | 47 - .../SpringCloudEurekaComponentTests.java | 50 - .../SpringCloudGatewayComponentTests.java | 81 - .../generated/TcpConnectionPoolTests.java | 25 - .../generated/TcpRetryPolicyTests.java | 25 - .../generated/TimeoutPolicyTests.java | 29 - .../generated/TracesConfigurationTests.java | 30 - .../generated/TrafficWeightTests.java | 35 - .../generated/UsageInnerTests.java | 35 - .../generated/UsageNameTests.java | 27 - .../generated/UsagesListMockTests.java | 41 - .../generated/UserAssignedIdentityTests.java | 23 - .../generated/VnetConfigurationTests.java | 38 - .../generated/VolumeMountTests.java | 30 - .../generated/WorkflowArtifactsTests.java | 29 - .../WorkloadProfileStatesCollectionTests.java | 45 - .../WorkloadProfileStatesInnerTests.java | 34 - .../WorkloadProfileStatesPropertiesTests.java | 32 - .../generated/WorkloadProfileTests.java | 38 - 1079 files changed, 145048 deletions(-) delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AppResilienciesClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AvailableWorkloadProfilesClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BillingMetersClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildAuthTokensClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildersClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsByBuilderResourcesClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/CertificatesClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsCertificatesClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsDaprComponentsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsStoragesClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsApiClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsAuthConfigsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsByContainerAppsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsDiagnosticsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsPatchesClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionReplicasClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSessionPoolsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSourceControlsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentResiliencyPoliciesClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprSubscriptionsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DotNetComponentsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/FunctionsExtensionsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JavaComponentsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsExecutionsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/LogicAppsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedCertificatesClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentDiagnosticsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentPrivateEndpointConnectionsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentPrivateLinkResourcesClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentUsagesClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsDiagnosticsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsStoragesClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/NamespacesClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/OperationsClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ResourceProvidersClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/UsagesClient.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AppResiliencyInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AppResiliencyProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AvailableWorkloadProfileInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BillingMeterCollectionInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildResourceInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildTokenInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceUpdateProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CertificateInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CheckNameAvailabilityResponseInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppJobExecutionsInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsBuildProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsBuildResourceInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsPatchResourceInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentResiliencyPolicyInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentResiliencyPolicyProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSecretsCollectionInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSubscriptionInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSubscriptionProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsCollectionInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DotNetComponentInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DotNetComponentProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HeaderMatchMatch.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRetryPolicyMatches.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRetryPolicyRetryBackOff.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JavaComponentInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionBaseInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobSecretsCollectionInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/LogicAppInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedCertificateInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStoragesCollectionInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/OperationDetailInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateEndpointConnectionInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateEndpointConnectionProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateLinkResourceInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateLinkResourceProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaCollectionInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SecretsCollectionInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolUpdatablePropertiesProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/UsageInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkflowEnvelopeInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkloadProfileStatesInner.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResiliencyImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AuthConfigImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfileImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMeterCollectionImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildResourceImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildTokenImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuilderResourceImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsByBuilderResourcesClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsByBuilderResourcesImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CheckNameAvailabilityResponseImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStoragesCollectionImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppAuthTokenImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppJobExecutionsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildResourceImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchResourceImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSessionPoolsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSessionPoolsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CustomHostnameAnalysisResultImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPolicyImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSecretsCollectionImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsCollectionImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/EnvironmentAuthTokenImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionBaseImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobSecretsCollectionImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsExecutionsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsExecutionsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LogicAppImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LogicAppsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LogicAppsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificateImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateEndpointConnectionsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateEndpointConnectionsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateLinkResourcesClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateLinkResourcesImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStorageImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStoragesCollectionImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationDetailImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PrivateEndpointConnectionImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PrivateLinkResourceImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaCollectionImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceManagerUtils.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SecretsCollectionImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SessionPoolImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SourceControlImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsageImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesClientImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkflowEnvelopeImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkloadProfileStatesImpl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AccessMode.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Action.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ActiveRevisionsMode.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Affinity.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedAudiencesValidation.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedPrincipals.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppInsightsConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppLogsConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppProtocol.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppRegistration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencies.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliency.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencyCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Apple.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppleRegistration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Applicability.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfig.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfigCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthPlatform.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableOperations.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfile.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfileProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfiles.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfilesCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectory.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryLogin.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryRegistration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryValidation.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureCredentials.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureFileProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebApps.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebAppsRegistration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeters.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BindingType.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BlobStorageTokenStore.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildAuthTokens.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildProvisioningState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildResource.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildStatus.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildToken.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderProvisioningState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResource.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResourceUpdate.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builders.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builds.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildsByBuilderResources.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificate.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateKeyVaultProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificatePatch.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProvisioningState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateType.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificates.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityReason.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityRequest.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityResponse.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CircuitBreakerPolicy.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientCredentialMethod.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientRegistration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Configuration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironment.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentProvisioningState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorage.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStoragesCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironments.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsCertificates.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsDaprComponents.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsStorages.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppAuthToken.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppContainerRunningState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppJobExecutions.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbe.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGet.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGetHttpHeadersItem.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeTcpSocket.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppPropertiesPatchingConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProvisioningState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppReplicaRunningState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppSecret.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApps.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsAuthConfigs.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildResource.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuilds.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildsByContainerApps.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsDiagnostics.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatchResource.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatches.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisionReplicas.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisions.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSessionPools.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSourceControls.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerExecutionStatus.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistry.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistryWithCustomImage.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerResources.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerType.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpiration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpirationConvention.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CorsPolicy.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomContainerTemplate.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomain.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomainConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResult.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomOpenIdConnectProvider.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Dapr.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicies.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPoliciesCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicy.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentServiceBinding.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponents.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentsCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprMetadata.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecret.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecretsCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprServiceBindMetadata.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscription.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionBulkSubscribeOptions.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRouteRule.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRoutes.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptions.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionsCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DataDogConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultAuthorizationPolicy.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseError.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseErrorException.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DestinationsConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DetectionStatus.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadata.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadataPropertyBagItem.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseColumn.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseObject.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticRendering.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticSupportTopic.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Diagnostics.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDataApiResponse.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDefinition.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsStatus.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DnsVerificationTestResult.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponent.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentConfigurationProperty.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentProvisioningState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentServiceBind.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentType.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponents.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentsCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DynamicPoolConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EncryptionSettings.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentAuthToken.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentProvisioningState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVar.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVariable.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ErrorEntity.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExecutionStatus.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExecutionType.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocation.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocationTypes.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Facebook.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxy.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxyConvention.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/FunctionsExtensions.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GitHub.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GithubActionConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GlobalValidation.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Google.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Header.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HeaderMatch.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpConnectionPool.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpGet.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRetryPolicy.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettings.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettingsRoutes.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentityProviders.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentitySettings.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentitySettingsLifeCycle.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ImageType.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressClientCertificateMode.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressPortMapping.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressStickySessions.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTargetPortHttpScheme.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTransportMethod.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IpSecurityRestrictionRule.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponent.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentConfigurationProperty.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentIngress.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentPropertiesScale.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProvisioningState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentServiceBind.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentType.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponents.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentsCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Job.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationEventTriggerConfig.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationManualTriggerConfig.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationScheduleTriggerConfig.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecution.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionBase.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionContainer.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionRunningState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionTemplate.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchPropertiesProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobProvisioningState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobRunningState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScale.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScaleRule.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobSecretsCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobTemplate.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Jobs.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsExecutions.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JwtClaimChecks.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/KedaConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Kind.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Level.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ListUsagesResult.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogAnalyticsConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogLevel.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoggerSetting.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicApp.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicApps.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicAppsProxyMethod.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Login.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginRoutes.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginScopes.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogsConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificate.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateDomainControlValidation.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificatePatch.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificates.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironment.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentDiagnostics.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPrivateEndpointConnections.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPrivateLinkResources.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerAuthentication.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerTrafficConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorage.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorageProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStoragesCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentUsages.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironments.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsDiagnostics.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsStorages.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentity.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentityType.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MetricsConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Mtls.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NacosComponent.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Namespaces.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NfsAzureFileProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Nonce.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectClientCredential.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectConfig.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectLogin.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectRegistration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenTelemetryConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDetail.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDisplay.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Operations.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OtlpConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchApplyStatus.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetails.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsNewLayer.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsOldLayer.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchSkipConfig.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchType.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchingMode.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PoolManagementType.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PreBuildStep.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpoint.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnectionListResult.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnectionProvisioningState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointServiceConnectionStatus.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkResource.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkResourceListResult.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkServiceConnectionState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PublicNetworkAccess.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QueueScaleRule.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryCredentials.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryInfo.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Replica.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaExecutionStatus.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ResourceProviders.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionHealthState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionProvisioningState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionRunningState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Runtime.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeDotnet.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJava.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgent.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgentLogging.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scale.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRule.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRuleAuth.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScgRoute.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scheme.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Secret.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretVolumeItem.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretsCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Service.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ServiceBind.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionContainer.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionContainerResources.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionIngress.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionNetworkConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionNetworkStatus.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPool.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolProvisioningState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolSecret.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolUpdatableProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionRegistryCredentials.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SmbStorage.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControl.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlOperationState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringBootAdminComponent.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudConfigComponent.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudEurekaComponent.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudGatewayComponent.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/StorageType.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpConnectionPool.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpRetryPolicy.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TimeoutPolicy.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TokenStore.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TracesConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TrafficWeight.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TriggerType.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Twitter.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TwitterRegistration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Type.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UnauthenticatedClientActionV2.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Usage.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UsageName.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Usages.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UserAssignedIdentity.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VnetConfiguration.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Volume.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VolumeMount.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowArtifacts.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowEnvelope.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowEnvelopeCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowEnvelopeProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowHealth.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowHealthState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkflowState.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStates.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesCollection.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesProperties.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/package-info.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/package-info.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/module-info.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/proxy-config.json delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/reflect-config.json delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildAuthTokenListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsByBuilderResourceListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplySamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesSkipConfigureSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsGetByResourceGroupSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListByResourceGroupSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSessionPoolsUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionInvokeFunctionsHostSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetByResourceGroupSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSecretsSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsProxyGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsResumeSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStartSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsSuspendSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeployWorkflowArtifactsSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetWorkflowSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsInvokeSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsListWorkflowsConnectionsSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsListWorkflowsSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsListSamples.java delete 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/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderGetCustomDomainVerificationIdSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/UsagesListSamples.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/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/ContainerAppPropertiesPatchingConfigurationTests.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/ContainerAppsBuildCollectionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildConfigurationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildResourceInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppsListMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetWithResponseMockTests.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/ContainerAppsPatchResourceInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplyMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppMockTests.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/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/DynamicPoolConfigurationTests.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/FunctionsExtensionsInvokeFunctionsHostWithResponseMockTests.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/IdentitySettingsTests.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/JavaComponentIngressTests.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/JavaComponentPropertiesScaleTests.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/JobsListDetectorsMockTests.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/LoggerSettingTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsCreateOrUpdateWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeleteWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsDeployWorkflowArtifactsWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsGetWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogicAppsInvokeWithResponseMockTests.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/ManagedEnvironmentPrivateEndpointConnectionsCreateOrUpdateMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsGetWithResponseMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateEndpointConnectionsListMockTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPrivateLinkResourcesListMockTests.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/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryptionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerTrafficConfigurationTests.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/NacosComponentTests.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/PatchCollectionTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsNewLayerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsOldLayerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchDetailsTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PatchSkipConfigTests.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/PrivateEndpointConnectionInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointConnectionListResultTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointConnectionPropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateEndpointTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourceInnerTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourceListResultTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkResourcePropertiesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PrivateLinkServiceConnectionStateTests.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/RuntimeDotnetTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaAgentLoggingTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaAgentTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeJavaTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RuntimeTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleConfigurationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScgRouteTests.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/SessionContainerResourcesTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionIngressTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionNetworkConfigurationTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SessionPoolSecretTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringBootAdminComponentTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudConfigComponentTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudEurekaComponentTests.java delete mode 100644 sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SpringCloudGatewayComponentTests.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/WorkflowArtifactsTests.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/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java deleted file mode 100644 index 37ba91013964..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java +++ /dev/null @@ -1,969 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers; - -import com.azure.core.credential.TokenCredential; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.HttpPipelinePosition; -import com.azure.core.http.policy.AddDatePolicy; -import com.azure.core.http.policy.AddHeadersFromContextPolicy; -import com.azure.core.http.policy.HttpLogOptions; -import com.azure.core.http.policy.HttpLoggingPolicy; -import com.azure.core.http.policy.HttpPipelinePolicy; -import com.azure.core.http.policy.HttpPolicyProviders; -import com.azure.core.http.policy.RequestIdPolicy; -import com.azure.core.http.policy.RetryOptions; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Configuration; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsApiClient; -import com.azure.resourcemanager.appcontainers.implementation.AppResilienciesImpl; -import com.azure.resourcemanager.appcontainers.implementation.AvailableWorkloadProfilesImpl; -import com.azure.resourcemanager.appcontainers.implementation.BillingMetersImpl; -import com.azure.resourcemanager.appcontainers.implementation.BuildAuthTokensImpl; -import com.azure.resourcemanager.appcontainers.implementation.BuildersImpl; -import com.azure.resourcemanager.appcontainers.implementation.BuildsByBuilderResourcesImpl; -import com.azure.resourcemanager.appcontainers.implementation.BuildsImpl; -import com.azure.resourcemanager.appcontainers.implementation.CertificatesImpl; -import com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsCertificatesImpl; -import com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsDaprComponentsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsImpl; -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.LogicAppsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ManagedCertificatesImpl; -import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentDiagnosticsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentPrivateEndpointConnectionsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentPrivateLinkResourcesImpl; -import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentUsagesImpl; -import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsDiagnosticsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsStoragesImpl; -import com.azure.resourcemanager.appcontainers.implementation.NamespacesImpl; -import com.azure.resourcemanager.appcontainers.implementation.OperationsImpl; -import com.azure.resourcemanager.appcontainers.implementation.ResourceProvidersImpl; -import com.azure.resourcemanager.appcontainers.implementation.UsagesImpl; -import com.azure.resourcemanager.appcontainers.models.AppResiliencies; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfiles; -import com.azure.resourcemanager.appcontainers.models.BillingMeters; -import com.azure.resourcemanager.appcontainers.models.BuildAuthTokens; -import com.azure.resourcemanager.appcontainers.models.Builders; -import com.azure.resourcemanager.appcontainers.models.Builds; -import com.azure.resourcemanager.appcontainers.models.BuildsByBuilderResources; -import com.azure.resourcemanager.appcontainers.models.Certificates; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironments; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsCertificates; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsDaprComponents; -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.LogicApps; -import com.azure.resourcemanager.appcontainers.models.ManagedCertificates; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentDiagnostics; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPrivateEndpointConnections; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPrivateLinkResources; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentUsages; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironments; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsDiagnostics; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsStorages; -import com.azure.resourcemanager.appcontainers.models.Namespaces; -import com.azure.resourcemanager.appcontainers.models.Operations; -import com.azure.resourcemanager.appcontainers.models.ResourceProviders; -import com.azure.resourcemanager.appcontainers.models.Usages; -import java.time.Duration; -import java.time.temporal.ChronoUnit; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; -import java.util.stream.Collectors; - -/** - * 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; - - private ContainerAppsAuthConfigs containerAppsAuthConfigs; - - private AvailableWorkloadProfiles availableWorkloadProfiles; - - private BillingMeters billingMeters; - - private Builders builders; - - private BuildsByBuilderResources buildsByBuilderResources; - - private Builds builds; - - private BuildAuthTokens buildAuthTokens; - - private ConnectedEnvironments connectedEnvironments; - - private ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates; - - private ConnectedEnvironmentsDaprComponents connectedEnvironmentsDaprComponents; - - private ConnectedEnvironmentsStorages connectedEnvironmentsStorages; - - private ContainerApps containerApps; - - private ContainerAppsBuildsByContainerApps containerAppsBuildsByContainerApps; - - private ContainerAppsBuilds containerAppsBuilds; - - private ContainerAppsPatches containerAppsPatches; - - private ContainerAppsRevisions containerAppsRevisions; - - private ContainerAppsRevisionReplicas containerAppsRevisionReplicas; - - private ContainerAppsDiagnostics containerAppsDiagnostics; - - private ManagedEnvironmentDiagnostics managedEnvironmentDiagnostics; - - private ManagedEnvironmentsDiagnostics managedEnvironmentsDiagnostics; - - private Jobs jobs; - - private DotNetComponents dotNetComponents; - - private FunctionsExtensions functionsExtensions; - - private Operations operations; - - private JavaComponents javaComponents; - - private JobsExecutions jobsExecutions; - - private ResourceProviders resourceProviders; - - private LogicApps logicApps; - - private ManagedEnvironments managedEnvironments; - - private Certificates certificates; - - private ManagedCertificates managedCertificates; - - private Namespaces namespaces; - - private ManagedEnvironmentPrivateEndpointConnections managedEnvironmentPrivateEndpointConnections; - - private ManagedEnvironmentPrivateLinkResources managedEnvironmentPrivateLinkResources; - - private DaprComponentResiliencyPolicies daprComponentResiliencyPolicies; - - private DaprComponents daprComponents; - - private DaprSubscriptions daprSubscriptions; - - private ManagedEnvironmentsStorages managedEnvironmentsStorages; - - private ContainerAppsSessionPools containerAppsSessionPools; - - private ContainerAppsSourceControls containerAppsSourceControls; - - private Usages usages; - - private ManagedEnvironmentUsages managedEnvironmentUsages; - - private final ContainerAppsApiClient clientObject; - - private ContainerAppsApiManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { - 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(); - } - - /** - * Creates an instance of ContainerAppsApi service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the ContainerAppsApi service API instance. - */ - public static ContainerAppsApiManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return configure().authenticate(credential, profile); - } - - /** - * Creates an instance of ContainerAppsApi service API entry point. - * - * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. - * @param profile the Azure profile for client. - * @return the ContainerAppsApi service API instance. - */ - public static ContainerAppsApiManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { - Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - return new ContainerAppsApiManager(httpPipeline, profile, null); - } - - /** - * Gets a Configurable instance that can be used to create ContainerAppsApiManager with optional configuration. - * - * @return the Configurable instance allowing configurations. - */ - public static Configurable configure() { - return new ContainerAppsApiManager.Configurable(); - } - - /** - * The Configurable allowing configurations to be set. - */ - public static final class Configurable { - private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); - - private HttpClient httpClient; - private HttpLogOptions httpLogOptions; - private final List policies = new ArrayList<>(); - private final List scopes = new ArrayList<>(); - private RetryPolicy retryPolicy; - private RetryOptions retryOptions; - private Duration defaultPollInterval; - - private Configurable() { - } - - /** - * Sets the http client. - * - * @param httpClient the HTTP client. - * @return the configurable object itself. - */ - public Configurable withHttpClient(HttpClient httpClient) { - this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null."); - return this; - } - - /** - * Sets the logging options to the HTTP pipeline. - * - * @param httpLogOptions the HTTP log options. - * @return the configurable object itself. - */ - public Configurable withLogOptions(HttpLogOptions httpLogOptions) { - this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null."); - return this; - } - - /** - * Adds the pipeline policy to the HTTP pipeline. - * - * @param policy the HTTP pipeline policy. - * @return the configurable object itself. - */ - public Configurable withPolicy(HttpPipelinePolicy policy) { - this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null.")); - return this; - } - - /** - * Adds the scope to permission sets. - * - * @param scope the scope. - * @return the configurable object itself. - */ - public Configurable withScope(String scope) { - this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null.")); - return this; - } - - /** - * Sets the retry policy to the HTTP pipeline. - * - * @param retryPolicy the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryPolicy(RetryPolicy retryPolicy) { - this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null."); - return this; - } - - /** - * Sets the retry options for the HTTP pipeline retry policy. - *

- * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. - * - * @param retryOptions the retry options for the HTTP pipeline retry policy. - * @return the configurable object itself. - */ - public Configurable withRetryOptions(RetryOptions retryOptions) { - this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); - return this; - } - - /** - * Sets the default poll interval, used when service does not provide "Retry-After" header. - * - * @param defaultPollInterval the default poll interval. - * @return the configurable object itself. - */ - public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval - = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); - if (this.defaultPollInterval.isNegative()) { - throw LOGGER - .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); - } - return this; - } - - /** - * Creates an instance of ContainerAppsApi service API entry point. - * - * @param credential the credential to use. - * @param profile the Azure profile for client. - * @return the ContainerAppsApi service API instance. - */ - public ContainerAppsApiManager authenticate(TokenCredential credential, AzureProfile profile) { - Objects.requireNonNull(credential, "'credential' cannot be null."); - Objects.requireNonNull(profile, "'profile' cannot be null."); - - StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder.append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.appcontainers") - .append("/") - .append("1.1.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)"); - } else { - userAgentBuilder.append(" (auto-generated)"); - } - - if (scopes.isEmpty()) { - scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); - } - if (retryPolicy == null) { - if (retryOptions != null) { - retryPolicy = new RetryPolicy(retryOptions); - } else { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); - } - } - List policies = new ArrayList<>(); - policies.add(new UserAgentPolicy(userAgentBuilder.toString())); - policies.add(new AddHeadersFromContextPolicy()); - policies.add(new RequestIdPolicy()); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); - HttpPolicyProviders.addBeforeRetryPolicies(policies); - policies.add(retryPolicy); - policies.add(new AddDatePolicy()); - policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies.addAll(this.policies.stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); - HttpPolicyProviders.addAfterRetryPolicies(policies); - policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); - return new ContainerAppsApiManager(httpPipeline, profile, defaultPollInterval); - } - } - - /** - * Gets the resource collection API of AppResiliencies. It manages AppResiliency. - * - * @return Resource collection API of AppResiliencies. - */ - public AppResiliencies appResiliencies() { - if (this.appResiliencies == null) { - this.appResiliencies = new AppResilienciesImpl(clientObject.getAppResiliencies(), this); - } - return appResiliencies; - } - - /** - * Gets the resource collection API of ContainerAppsAuthConfigs. It manages AuthConfig. - * - * @return Resource collection API of ContainerAppsAuthConfigs. - */ - public ContainerAppsAuthConfigs containerAppsAuthConfigs() { - if (this.containerAppsAuthConfigs == null) { - this.containerAppsAuthConfigs - = new ContainerAppsAuthConfigsImpl(clientObject.getContainerAppsAuthConfigs(), this); - } - return containerAppsAuthConfigs; - } - - /** - * Gets the resource collection API of AvailableWorkloadProfiles. - * - * @return Resource collection API of AvailableWorkloadProfiles. - */ - public AvailableWorkloadProfiles availableWorkloadProfiles() { - if (this.availableWorkloadProfiles == null) { - this.availableWorkloadProfiles - = new AvailableWorkloadProfilesImpl(clientObject.getAvailableWorkloadProfiles(), this); - } - return availableWorkloadProfiles; - } - - /** - * Gets the resource collection API of BillingMeters. - * - * @return Resource collection API of BillingMeters. - */ - public BillingMeters billingMeters() { - if (this.billingMeters == null) { - this.billingMeters = new BillingMetersImpl(clientObject.getBillingMeters(), this); - } - return billingMeters; - } - - /** - * Gets the resource collection API of Builders. It manages BuilderResource. - * - * @return Resource collection API of Builders. - */ - public Builders builders() { - if (this.builders == null) { - this.builders = new BuildersImpl(clientObject.getBuilders(), this); - } - return builders; - } - - /** - * Gets the resource collection API of BuildsByBuilderResources. - * - * @return Resource collection API of BuildsByBuilderResources. - */ - public BuildsByBuilderResources buildsByBuilderResources() { - if (this.buildsByBuilderResources == null) { - this.buildsByBuilderResources - = new BuildsByBuilderResourcesImpl(clientObject.getBuildsByBuilderResources(), this); - } - return buildsByBuilderResources; - } - - /** - * Gets the resource collection API of Builds. It manages BuildResource. - * - * @return Resource collection API of Builds. - */ - public Builds builds() { - if (this.builds == null) { - this.builds = new BuildsImpl(clientObject.getBuilds(), this); - } - return builds; - } - - /** - * Gets the resource collection API of BuildAuthTokens. - * - * @return Resource collection API of BuildAuthTokens. - */ - public BuildAuthTokens buildAuthTokens() { - if (this.buildAuthTokens == null) { - this.buildAuthTokens = new BuildAuthTokensImpl(clientObject.getBuildAuthTokens(), this); - } - return buildAuthTokens; - } - - /** - * Gets the resource collection API of ConnectedEnvironments. It manages ConnectedEnvironment. - * - * @return Resource collection API of ConnectedEnvironments. - */ - public ConnectedEnvironments connectedEnvironments() { - if (this.connectedEnvironments == null) { - this.connectedEnvironments = new ConnectedEnvironmentsImpl(clientObject.getConnectedEnvironments(), this); - } - return connectedEnvironments; - } - - /** - * Gets the resource collection API of ConnectedEnvironmentsCertificates. It manages Certificate. - * - * @return Resource collection API of ConnectedEnvironmentsCertificates. - */ - public ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates() { - if (this.connectedEnvironmentsCertificates == null) { - this.connectedEnvironmentsCertificates - = new ConnectedEnvironmentsCertificatesImpl(clientObject.getConnectedEnvironmentsCertificates(), this); - } - return connectedEnvironmentsCertificates; - } - - /** - * Gets the resource collection API of ConnectedEnvironmentsDaprComponents. It manages DaprComponent. - * - * @return Resource collection API of ConnectedEnvironmentsDaprComponents. - */ - public ConnectedEnvironmentsDaprComponents connectedEnvironmentsDaprComponents() { - if (this.connectedEnvironmentsDaprComponents == null) { - this.connectedEnvironmentsDaprComponents = new ConnectedEnvironmentsDaprComponentsImpl( - clientObject.getConnectedEnvironmentsDaprComponents(), this); - } - return connectedEnvironmentsDaprComponents; - } - - /** - * Gets the resource collection API of ConnectedEnvironmentsStorages. It manages ConnectedEnvironmentStorage. - * - * @return Resource collection API of ConnectedEnvironmentsStorages. - */ - public ConnectedEnvironmentsStorages connectedEnvironmentsStorages() { - if (this.connectedEnvironmentsStorages == null) { - this.connectedEnvironmentsStorages - = new ConnectedEnvironmentsStoragesImpl(clientObject.getConnectedEnvironmentsStorages(), this); - } - return connectedEnvironmentsStorages; - } - - /** - * Gets the resource collection API of ContainerApps. It manages ContainerApp. - * - * @return Resource collection API of ContainerApps. - */ - public ContainerApps containerApps() { - if (this.containerApps == null) { - this.containerApps = new ContainerAppsImpl(clientObject.getContainerApps(), this); - } - return containerApps; - } - - /** - * 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 ContainerAppsRevisions. - * - * @return Resource collection API of ContainerAppsRevisions. - */ - public ContainerAppsRevisions containerAppsRevisions() { - if (this.containerAppsRevisions == null) { - this.containerAppsRevisions - = new ContainerAppsRevisionsImpl(clientObject.getContainerAppsRevisions(), this); - } - return containerAppsRevisions; - } - - /** - * Gets the resource collection API of ContainerAppsRevisionReplicas. - * - * @return Resource collection API of ContainerAppsRevisionReplicas. - */ - public ContainerAppsRevisionReplicas containerAppsRevisionReplicas() { - if (this.containerAppsRevisionReplicas == null) { - this.containerAppsRevisionReplicas - = new ContainerAppsRevisionReplicasImpl(clientObject.getContainerAppsRevisionReplicas(), this); - } - return containerAppsRevisionReplicas; - } - - /** - * Gets the resource collection API of ContainerAppsDiagnostics. - * - * @return Resource collection API of ContainerAppsDiagnostics. - */ - public ContainerAppsDiagnostics containerAppsDiagnostics() { - if (this.containerAppsDiagnostics == null) { - this.containerAppsDiagnostics - = new ContainerAppsDiagnosticsImpl(clientObject.getContainerAppsDiagnostics(), this); - } - return containerAppsDiagnostics; - } - - /** - * Gets the resource collection API of ManagedEnvironmentDiagnostics. - * - * @return Resource collection API of ManagedEnvironmentDiagnostics. - */ - public ManagedEnvironmentDiagnostics managedEnvironmentDiagnostics() { - if (this.managedEnvironmentDiagnostics == null) { - this.managedEnvironmentDiagnostics - = new ManagedEnvironmentDiagnosticsImpl(clientObject.getManagedEnvironmentDiagnostics(), this); - } - return managedEnvironmentDiagnostics; - } - - /** - * Gets the resource collection API of ManagedEnvironmentsDiagnostics. - * - * @return Resource collection API of ManagedEnvironmentsDiagnostics. - */ - public ManagedEnvironmentsDiagnostics managedEnvironmentsDiagnostics() { - if (this.managedEnvironmentsDiagnostics == null) { - this.managedEnvironmentsDiagnostics - = new ManagedEnvironmentsDiagnosticsImpl(clientObject.getManagedEnvironmentsDiagnostics(), this); - } - return managedEnvironmentsDiagnostics; - } - - /** - * Gets the resource collection API of Jobs. It manages Job. - * - * @return Resource collection API of Jobs. - */ - public Jobs jobs() { - if (this.jobs == null) { - this.jobs = new JobsImpl(clientObject.getJobs(), this); - } - 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 FunctionsExtensions. - * - * @return Resource collection API of FunctionsExtensions. - */ - public FunctionsExtensions functionsExtensions() { - if (this.functionsExtensions == null) { - this.functionsExtensions = new FunctionsExtensionsImpl(clientObject.getFunctionsExtensions(), this); - } - return functionsExtensions; - } - - /** - * Gets the resource collection API of Operations. - * - * @return Resource collection API of Operations. - */ - public Operations operations() { - if (this.operations == null) { - this.operations = new OperationsImpl(clientObject.getOperations(), this); - } - return operations; - } - - /** - * Gets the resource collection API of 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. - * - * @return Resource collection API of JobsExecutions. - */ - public JobsExecutions jobsExecutions() { - if (this.jobsExecutions == null) { - this.jobsExecutions = new JobsExecutionsImpl(clientObject.getJobsExecutions(), this); - } - return jobsExecutions; - } - - /** - * Gets the resource collection API of ResourceProviders. - * - * @return Resource collection API of ResourceProviders. - */ - public ResourceProviders resourceProviders() { - if (this.resourceProviders == null) { - this.resourceProviders = new ResourceProvidersImpl(clientObject.getResourceProviders(), this); - } - return resourceProviders; - } - - /** - * Gets the resource collection API of LogicApps. It manages LogicApp. - * - * @return Resource collection API of LogicApps. - */ - public LogicApps logicApps() { - if (this.logicApps == null) { - this.logicApps = new LogicAppsImpl(clientObject.getLogicApps(), this); - } - return logicApps; - } - - /** - * Gets the resource collection API of ManagedEnvironments. It manages ManagedEnvironment. - * - * @return Resource collection API of ManagedEnvironments. - */ - public ManagedEnvironments managedEnvironments() { - if (this.managedEnvironments == null) { - this.managedEnvironments = new ManagedEnvironmentsImpl(clientObject.getManagedEnvironments(), this); - } - return managedEnvironments; - } - - /** - * Gets the resource collection API of Certificates. - * - * @return Resource collection API of Certificates. - */ - public Certificates certificates() { - if (this.certificates == null) { - this.certificates = new CertificatesImpl(clientObject.getCertificates(), this); - } - return certificates; - } - - /** - * Gets the resource collection API of ManagedCertificates. It manages ManagedCertificate. - * - * @return Resource collection API of ManagedCertificates. - */ - public ManagedCertificates managedCertificates() { - if (this.managedCertificates == null) { - this.managedCertificates = new ManagedCertificatesImpl(clientObject.getManagedCertificates(), this); - } - return managedCertificates; - } - - /** - * Gets the resource collection API of Namespaces. - * - * @return Resource collection API of Namespaces. - */ - public Namespaces namespaces() { - if (this.namespaces == null) { - this.namespaces = new NamespacesImpl(clientObject.getNamespaces(), this); - } - 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. - * - * @return Resource collection API of DaprComponentResiliencyPolicies. - */ - public DaprComponentResiliencyPolicies daprComponentResiliencyPolicies() { - if (this.daprComponentResiliencyPolicies == null) { - this.daprComponentResiliencyPolicies - = new DaprComponentResiliencyPoliciesImpl(clientObject.getDaprComponentResiliencyPolicies(), this); - } - return daprComponentResiliencyPolicies; - } - - /** - * Gets the resource collection API of DaprComponents. - * - * @return Resource collection API of DaprComponents. - */ - public DaprComponents daprComponents() { - if (this.daprComponents == null) { - this.daprComponents = new DaprComponentsImpl(clientObject.getDaprComponents(), this); - } - return daprComponents; - } - - /** - * Gets the resource collection API of DaprSubscriptions. It manages DaprSubscription. - * - * @return Resource collection API of DaprSubscriptions. - */ - public DaprSubscriptions daprSubscriptions() { - if (this.daprSubscriptions == null) { - this.daprSubscriptions = new DaprSubscriptionsImpl(clientObject.getDaprSubscriptions(), this); - } - return daprSubscriptions; - } - - /** - * Gets the resource collection API of ManagedEnvironmentsStorages. It manages ManagedEnvironmentStorage. - * - * @return Resource collection API of ManagedEnvironmentsStorages. - */ - public ManagedEnvironmentsStorages managedEnvironmentsStorages() { - if (this.managedEnvironmentsStorages == null) { - this.managedEnvironmentsStorages - = new ManagedEnvironmentsStoragesImpl(clientObject.getManagedEnvironmentsStorages(), this); - } - return managedEnvironmentsStorages; - } - - /** - * Gets the resource collection API of ContainerAppsSessionPools. It manages SessionPool. - * - * @return Resource collection API of ContainerAppsSessionPools. - */ - public ContainerAppsSessionPools containerAppsSessionPools() { - if (this.containerAppsSessionPools == null) { - this.containerAppsSessionPools - = new ContainerAppsSessionPoolsImpl(clientObject.getContainerAppsSessionPools(), this); - } - return containerAppsSessionPools; - } - - /** - * Gets the resource collection API of ContainerAppsSourceControls. It manages SourceControl. - * - * @return Resource collection API of ContainerAppsSourceControls. - */ - public ContainerAppsSourceControls containerAppsSourceControls() { - if (this.containerAppsSourceControls == null) { - this.containerAppsSourceControls - = new ContainerAppsSourceControlsImpl(clientObject.getContainerAppsSourceControls(), this); - } - return containerAppsSourceControls; - } - - /** - * Gets the resource collection API of Usages. - * - * @return Resource collection API of Usages. - */ - public Usages usages() { - if (this.usages == null) { - this.usages = new UsagesImpl(clientObject.getUsages(), this); - } - return usages; - } - - /** - * Gets the resource collection API of ManagedEnvironmentUsages. - * - * @return Resource collection API of ManagedEnvironmentUsages. - */ - public ManagedEnvironmentUsages managedEnvironmentUsages() { - if (this.managedEnvironmentUsages == null) { - this.managedEnvironmentUsages - = new ManagedEnvironmentUsagesImpl(clientObject.getManagedEnvironmentUsages(), this); - } - return managedEnvironmentUsages; - } - - /** - * Gets wrapped service client ContainerAppsApiClient providing direct access to the underlying auto-generated API - * implementation, based on Azure REST API. - * - * @return Wrapped service client ContainerAppsApiClient. - */ - public ContainerAppsApiClient serviceClient() { - return this.clientObject; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AppResilienciesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AppResilienciesClient.java deleted file mode 100644 index 1a40d6420997..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AppResilienciesClient.java +++ /dev/null @@ -1,198 +0,0 @@ -// Copyright (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.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.AppResiliencyInner; - -/** - * An instance of this class provides access to all the operations defined in AppResilienciesClient. - */ -public interface AppResilienciesClient { - /** - * Create or update an application's resiliency policy. - * - * Create or update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to create or update. - * @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 configuration to setup App Resiliency along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String appName, String name, - AppResiliencyInner resiliencyEnvelope, Context context); - - /** - * Create or update an application's resiliency policy. - * - * Create or update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to create or update. - * @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 configuration to setup App Resiliency. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AppResiliencyInner createOrUpdate(String resourceGroupName, String appName, String name, - AppResiliencyInner resiliencyEnvelope); - - /** - * Update an application's resiliency policy. - * - * Update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to update. - * @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 configuration to setup App Resiliency along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String appName, String name, - AppResiliencyInner resiliencyEnvelope, Context context); - - /** - * Update an application's resiliency policy. - * - * Update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to update. - * @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 configuration to setup App Resiliency. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AppResiliencyInner update(String resourceGroupName, String appName, String name, - AppResiliencyInner resiliencyEnvelope); - - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @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 Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String appName, String name, Context context); - - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @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 appName, String name); - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @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 resiliency policy along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String appName, String name, - Context context); - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @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 resiliency policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AppResiliencyInner get(String resourceGroupName, String appName, String name); - - /** - * List an application's resiliency policies. - * - * List container app resiliency policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @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 collection of AppResiliency policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String appName); - - /** - * List an application's resiliency policies. - * - * List container app resiliency policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @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 collection of AppResiliency policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String appName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AvailableWorkloadProfilesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AvailableWorkloadProfilesClient.java deleted file mode 100644 index 07b54b046db8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AvailableWorkloadProfilesClient.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.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.AvailableWorkloadProfileInner; - -/** - * An instance of this class provides access to all the operations defined in AvailableWorkloadProfilesClient. - */ -public interface AvailableWorkloadProfilesClient { - /** - * Get available workload profiles by location. - * - * Get all available workload profiles for a location. - * - * @param location The name of Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all available workload profiles for a location as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable get(String location); - - /** - * Get available workload profiles by location. - * - * Get all available workload profiles for a location. - * - * @param location The name of Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all available workload profiles for a location as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable get(String location, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BillingMetersClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BillingMetersClient.java deleted file mode 100644 index 114cdeccd72f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BillingMetersClient.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.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; -import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; - -/** - * An instance of this class provides access to all the operations defined in BillingMetersClient. - */ -public interface BillingMetersClient { - /** - * Get billing meters by location. - * - * Get all billingMeters for a location. - * - * @param location The name of Azure region. - * @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 all billingMeters for a location along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String location, Context context); - - /** - * Get billing meters by location. - * - * Get all billingMeters for a location. - * - * @param location The name of Azure region. - * @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 all billingMeters for a location. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BillingMeterCollectionInner get(String location); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildAuthTokensClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildAuthTokensClient.java deleted file mode 100644 index c794c5f7277a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildAuthTokensClient.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.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; -import com.azure.resourcemanager.appcontainers.fluent.models.BuildTokenInner; - -/** - * An instance of this class provides access to all the operations defined in BuildAuthTokensClient. - */ -public interface BuildAuthTokensClient { - /** - * Gets the token used to connect to the endpoint where source code can be uploaded for a build. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the token used to connect to the endpoint where source code can be uploaded for a build along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String resourceGroupName, String builderName, String buildName, - Context context); - - /** - * Gets the token used to connect to the endpoint where source code can be uploaded for a build. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the token used to connect to the endpoint where source code can be uploaded for a build. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BuildTokenInner list(String resourceGroupName, String builderName, String buildName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildersClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildersClient.java deleted file mode 100644 index 65cd73fe23a4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildersClient.java +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuilderResourceUpdate; - -/** - * An instance of this class provides access to all the operations defined in BuildersClient. - */ -public interface BuildersClient { - /** - * List BuilderResource resources by subscription ID. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * List BuilderResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * List BuilderResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List BuilderResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 BuilderResource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String builderName, - Context context); - - /** - * Get a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 BuilderResource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BuilderResourceInner getByResourceGroup(String resourceGroupName, String builderName); - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BuilderResourceInner> beginCreateOrUpdate(String resourceGroupName, - String builderName, BuilderResourceInner builderEnvelope); - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BuilderResourceInner> beginCreateOrUpdate(String resourceGroupName, - String builderName, BuilderResourceInner builderEnvelope, Context context); - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BuilderResourceInner createOrUpdate(String resourceGroupName, String builderName, - BuilderResourceInner builderEnvelope); - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BuilderResourceInner createOrUpdate(String resourceGroupName, String builderName, - BuilderResourceInner builderEnvelope, Context context); - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BuilderResourceInner> beginUpdate(String resourceGroupName, - String builderName, BuilderResourceUpdate builderEnvelope); - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BuilderResourceInner> beginUpdate(String resourceGroupName, - String builderName, BuilderResourceUpdate builderEnvelope, Context context); - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BuilderResourceInner update(String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope); - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BuilderResourceInner update(String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope, - Context context); - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String builderName); - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String builderName, Context context); - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 builderName); - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 builderName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsByBuilderResourcesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsByBuilderResourcesClient.java deleted file mode 100644 index a957f2df2405..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsByBuilderResourcesClient.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.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.BuildResourceInner; - -/** - * An instance of this class provides access to all the operations defined in BuildsByBuilderResourcesClient. - */ -public interface BuildsByBuilderResourcesClient { - /** - * List BuildResource resources by BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuildResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String builderName); - - /** - * List BuildResource resources by BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuildResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String builderName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsClient.java deleted file mode 100644 index 5cce1f950e18..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsClient.java +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (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.BuildResourceInner; - -/** - * An instance of this class provides access to all the operations defined in BuildsClient. - */ -public interface BuildsClient { - /** - * Get a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 BuildResource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String builderName, String buildName, - Context context); - - /** - * Get a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 BuildResource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BuildResourceInner get(String resourceGroupName, String builderName, String buildName); - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information pertaining to an individual build. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BuildResourceInner> beginCreateOrUpdate(String resourceGroupName, - String builderName, String buildName, BuildResourceInner buildEnvelope); - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or update parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information pertaining to an individual build. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, BuildResourceInner> beginCreateOrUpdate(String resourceGroupName, - String builderName, String buildName, BuildResourceInner buildEnvelope, Context context); - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information pertaining to an individual build. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BuildResourceInner createOrUpdate(String resourceGroupName, String builderName, String buildName, - BuildResourceInner buildEnvelope); - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or update parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information pertaining to an individual build. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - BuildResourceInner createOrUpdate(String resourceGroupName, String builderName, String buildName, - BuildResourceInner buildEnvelope, Context context); - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String builderName, String buildName); - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String builderName, String buildName, - Context context); - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 builderName, String buildName); - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 builderName, String buildName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/CertificatesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/CertificatesClient.java deleted file mode 100644 index 5963e2aaa823..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/CertificatesClient.java +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (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.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; - -/** - * An instance of this class provides access to all the operations defined in CertificatesClient. - */ -public interface CertificatesClient { - /** - * Get the Certificates in 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.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 Certificates in a given managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Get the Certificates in 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.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 Certificates in a given managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName, Context context); - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 specified Certificate along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String environmentName, String certificateName, - Context context); - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 specified Certificate. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CertificateInner get(String resourceGroupName, String environmentName, String certificateName); - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, - String certificateName, CertificateInner certificateEnvelope, Context context); - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CertificateInner createOrUpdate(String resourceGroupName, String environmentName, String certificateName); - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String environmentName, String certificateName, - Context context); - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 environmentName, String certificateName); - - /** - * Update properties of a certificate - * - * Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String environmentName, - String certificateName, CertificatePatch certificateEnvelope, Context context); - - /** - * Update properties of a certificate - * - * Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CertificateInner update(String resourceGroupName, String environmentName, String certificateName, - CertificatePatch certificateEnvelope); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsCertificatesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsCertificatesClient.java deleted file mode 100644 index b40e6779b501..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsCertificatesClient.java +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (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.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; - -/** - * An instance of this class provides access to all the operations defined in ConnectedEnvironmentsCertificatesClient. - */ -public interface ConnectedEnvironmentsCertificatesClient { - /** - * Get the Certificates in a given connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given connected environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String connectedEnvironmentName); - - /** - * Get the Certificates in a given connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given connected environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String connectedEnvironmentName, Context context); - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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 specified Certificate along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, - String certificateName, Context context); - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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 specified Certificate. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CertificateInner get(String resourceGroupName, String connectedEnvironmentName, String certificateName); - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String connectedEnvironmentName, - String certificateName, CertificateInner certificateEnvelope, Context context); - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CertificateInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, String certificateName); - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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 Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String certificateName, - Context context); - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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 connectedEnvironmentName, String certificateName); - - /** - * Update properties of a certificate - * - * Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String connectedEnvironmentName, - String certificateName, CertificatePatch certificateEnvelope, Context context); - - /** - * Update properties of a certificate - * - * Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CertificateInner update(String resourceGroupName, String connectedEnvironmentName, String certificateName, - CertificatePatch certificateEnvelope); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsClient.java deleted file mode 100644 index bf40789c9771..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsClient.java +++ /dev/null @@ -1,300 +0,0 @@ -// Copyright (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.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; - -/** - * An instance of this class provides access to all the operations defined in ConnectedEnvironmentsClient. - */ -public interface ConnectedEnvironmentsClient { - /** - * Get all connectedEnvironments for a 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 all connectedEnvironments for a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Get all connectedEnvironments for a 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 all connectedEnvironments for a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Get all connectedEnvironments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get all connectedEnvironments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get the properties of an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 an connectedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, - String connectedEnvironmentName, Context context); - - /** - * Get the properties of an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 an connectedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedEnvironmentInner getByResourceGroup(String resourceGroupName, String connectedEnvironmentName); - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads - * by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConnectedEnvironmentInner> beginCreateOrUpdate( - String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope); - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads - * by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ConnectedEnvironmentInner> beginCreateOrUpdate( - String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope, - Context context); - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedEnvironmentInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, - ConnectedEnvironmentInner environmentEnvelope); - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedEnvironmentInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, - ConnectedEnvironmentInner environmentEnvelope, Context context); - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 connectedEnvironmentName); - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 connectedEnvironmentName, - Context context); - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 connectedEnvironmentName); - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 connectedEnvironmentName, Context context); - - /** - * Update connected Environment's properties. - * - * Patches a Managed Environment. Only patching of tags is supported currently. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String connectedEnvironmentName, - Context context); - - /** - * Update connected Environment's properties. - * - * Patches a Managed Environment. Only patching of tags is supported currently. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedEnvironmentInner update(String resourceGroupName, String connectedEnvironmentName); - - /** - * Checks the resource connectedEnvironmentName availability. - * - * Checks if resource connectedEnvironmentName is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. - * @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 check availability result along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse(String resourceGroupName, - String connectedEnvironmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context); - - /** - * Checks the resource connectedEnvironmentName availability. - * - * Checks if resource connectedEnvironmentName is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. - * @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 check availability result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CheckNameAvailabilityResponseInner checkNameAvailability(String resourceGroupName, String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest); -} 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 deleted file mode 100644 index f0d390ee1103..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsDaprComponentsClient.java +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (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.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; - -/** - * An instance of this class provides access to all the operations defined in ConnectedEnvironmentsDaprComponentsClient. - */ -public interface ConnectedEnvironmentsDaprComponentsClient { - /** - * Get the Dapr Components for a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String connectedEnvironmentName); - - /** - * Get the Dapr Components for a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String connectedEnvironmentName, Context context); - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, - String componentName, Context context); - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DaprComponentInner get(String resourceGroupName, String connectedEnvironmentName, String componentName); - - /** - * Creates or updates a Dapr Component. - * - * Creates or updates a Dapr Component in a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @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 dapr Component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String connectedEnvironmentName, - String componentName, DaprComponentInner daprComponentEnvelope, Context context); - - /** - * Creates or updates a Dapr Component. - * - * Creates or updates a Dapr Component in a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @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 dapr Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DaprComponentInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, String componentName, - DaprComponentInner daprComponentEnvelope); - - /** - * Delete a Dapr Component. - * - * Delete a Dapr Component from a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String componentName, - Context context); - - /** - * Delete a Dapr Component. - * - * Delete a Dapr Component from a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 connectedEnvironmentName, String componentName); - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component Secrets Collection for ListSecrets Action along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listSecretsWithResponse(String resourceGroupName, - String connectedEnvironmentName, String componentName, Context context); - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component Secrets Collection for ListSecrets Action. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DaprSecretsCollectionInner listSecrets(String resourceGroupName, String connectedEnvironmentName, - String componentName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsStoragesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsStoragesClient.java deleted file mode 100644 index 877de407b477..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsStoragesClient.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (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; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; - -/** - * An instance of this class provides access to all the operations defined in ConnectedEnvironmentsStoragesClient. - */ -public interface ConnectedEnvironmentsStoragesClient { - /** - * Get all storages for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a connectedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String resourceGroupName, - String connectedEnvironmentName, Context context); - - /** - * Get all storages for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a connectedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedEnvironmentStoragesCollectionInner list(String resourceGroupName, String connectedEnvironmentName); - - /** - * Get storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 storage for a connectedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, - String connectedEnvironmentName, String storageName, Context context); - - /** - * Get storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 storage for a connectedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedEnvironmentStorageInner get(String resourceGroupName, String connectedEnvironmentName, String storageName); - - /** - * Create or update storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @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 storage resource for connectedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, - String connectedEnvironmentName, String storageName, ConnectedEnvironmentStorageInner storageEnvelope, - Context context); - - /** - * Create or update storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @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 storage resource for connectedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedEnvironmentStorageInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, - String storageName, ConnectedEnvironmentStorageInner storageEnvelope); - - /** - * Delete storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String storageName, - Context context); - - /** - * Delete storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 connectedEnvironmentName, String storageName); -} 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 deleted file mode 100644 index dafb90840eb0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsApiClient.java +++ /dev/null @@ -1,349 +0,0 @@ -// Copyright (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.http.HttpPipeline; -import java.time.Duration; - -/** - * The interface for ContainerAppsApiClient class. - */ -public interface ContainerAppsApiClient { - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - String getSubscriptionId(); - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - String getEndpoint(); - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - String getApiVersion(); - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - HttpPipeline getHttpPipeline(); - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - Duration getDefaultPollInterval(); - - /** - * Gets the AppResilienciesClient object to access its operations. - * - * @return the AppResilienciesClient object. - */ - AppResilienciesClient getAppResiliencies(); - - /** - * Gets the ContainerAppsAuthConfigsClient object to access its operations. - * - * @return the ContainerAppsAuthConfigsClient object. - */ - ContainerAppsAuthConfigsClient getContainerAppsAuthConfigs(); - - /** - * Gets the AvailableWorkloadProfilesClient object to access its operations. - * - * @return the AvailableWorkloadProfilesClient object. - */ - AvailableWorkloadProfilesClient getAvailableWorkloadProfiles(); - - /** - * Gets the BillingMetersClient object to access its operations. - * - * @return the BillingMetersClient object. - */ - BillingMetersClient getBillingMeters(); - - /** - * Gets the BuildersClient object to access its operations. - * - * @return the BuildersClient object. - */ - BuildersClient getBuilders(); - - /** - * Gets the BuildsByBuilderResourcesClient object to access its operations. - * - * @return the BuildsByBuilderResourcesClient object. - */ - BuildsByBuilderResourcesClient getBuildsByBuilderResources(); - - /** - * Gets the BuildsClient object to access its operations. - * - * @return the BuildsClient object. - */ - BuildsClient getBuilds(); - - /** - * Gets the BuildAuthTokensClient object to access its operations. - * - * @return the BuildAuthTokensClient object. - */ - BuildAuthTokensClient getBuildAuthTokens(); - - /** - * Gets the ConnectedEnvironmentsClient object to access its operations. - * - * @return the ConnectedEnvironmentsClient object. - */ - ConnectedEnvironmentsClient getConnectedEnvironments(); - - /** - * Gets the ConnectedEnvironmentsCertificatesClient object to access its operations. - * - * @return the ConnectedEnvironmentsCertificatesClient object. - */ - ConnectedEnvironmentsCertificatesClient getConnectedEnvironmentsCertificates(); - - /** - * Gets the ConnectedEnvironmentsDaprComponentsClient object to access its operations. - * - * @return the ConnectedEnvironmentsDaprComponentsClient object. - */ - ConnectedEnvironmentsDaprComponentsClient getConnectedEnvironmentsDaprComponents(); - - /** - * Gets the ConnectedEnvironmentsStoragesClient object to access its operations. - * - * @return the ConnectedEnvironmentsStoragesClient object. - */ - ConnectedEnvironmentsStoragesClient getConnectedEnvironmentsStorages(); - - /** - * Gets the ContainerAppsClient object to access its operations. - * - * @return the ContainerAppsClient object. - */ - ContainerAppsClient getContainerApps(); - - /** - * 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 ContainerAppsRevisionsClient object to access its operations. - * - * @return the ContainerAppsRevisionsClient object. - */ - ContainerAppsRevisionsClient getContainerAppsRevisions(); - - /** - * Gets the ContainerAppsRevisionReplicasClient object to access its operations. - * - * @return the ContainerAppsRevisionReplicasClient object. - */ - ContainerAppsRevisionReplicasClient getContainerAppsRevisionReplicas(); - - /** - * Gets the ContainerAppsDiagnosticsClient object to access its operations. - * - * @return the ContainerAppsDiagnosticsClient object. - */ - ContainerAppsDiagnosticsClient getContainerAppsDiagnostics(); - - /** - * Gets the ManagedEnvironmentDiagnosticsClient object to access its operations. - * - * @return the ManagedEnvironmentDiagnosticsClient object. - */ - ManagedEnvironmentDiagnosticsClient getManagedEnvironmentDiagnostics(); - - /** - * Gets the ManagedEnvironmentsDiagnosticsClient object to access its operations. - * - * @return the ManagedEnvironmentsDiagnosticsClient object. - */ - ManagedEnvironmentsDiagnosticsClient getManagedEnvironmentsDiagnostics(); - - /** - * Gets the JobsClient object to access its operations. - * - * @return the JobsClient object. - */ - JobsClient getJobs(); - - /** - * Gets the DotNetComponentsClient object to access its operations. - * - * @return the DotNetComponentsClient object. - */ - DotNetComponentsClient getDotNetComponents(); - - /** - * Gets the FunctionsExtensionsClient object to access its operations. - * - * @return the FunctionsExtensionsClient object. - */ - FunctionsExtensionsClient getFunctionsExtensions(); - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - OperationsClient getOperations(); - - /** - * Gets the JavaComponentsClient object to access its operations. - * - * @return the JavaComponentsClient object. - */ - JavaComponentsClient getJavaComponents(); - - /** - * Gets the JobsExecutionsClient object to access its operations. - * - * @return the JobsExecutionsClient object. - */ - JobsExecutionsClient getJobsExecutions(); - - /** - * Gets the ResourceProvidersClient object to access its operations. - * - * @return the ResourceProvidersClient object. - */ - ResourceProvidersClient getResourceProviders(); - - /** - * Gets the LogicAppsClient object to access its operations. - * - * @return the LogicAppsClient object. - */ - LogicAppsClient getLogicApps(); - - /** - * Gets the ManagedEnvironmentsClient object to access its operations. - * - * @return the ManagedEnvironmentsClient object. - */ - ManagedEnvironmentsClient getManagedEnvironments(); - - /** - * Gets the CertificatesClient object to access its operations. - * - * @return the CertificatesClient object. - */ - CertificatesClient getCertificates(); - - /** - * Gets the ManagedCertificatesClient object to access its operations. - * - * @return the ManagedCertificatesClient object. - */ - ManagedCertificatesClient getManagedCertificates(); - - /** - * Gets the NamespacesClient object to access its operations. - * - * @return the NamespacesClient object. - */ - 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. - * - * @return the DaprComponentResiliencyPoliciesClient object. - */ - DaprComponentResiliencyPoliciesClient getDaprComponentResiliencyPolicies(); - - /** - * Gets the DaprComponentsClient object to access its operations. - * - * @return the DaprComponentsClient object. - */ - DaprComponentsClient getDaprComponents(); - - /** - * Gets the DaprSubscriptionsClient object to access its operations. - * - * @return the DaprSubscriptionsClient object. - */ - DaprSubscriptionsClient getDaprSubscriptions(); - - /** - * Gets the ManagedEnvironmentsStoragesClient object to access its operations. - * - * @return the ManagedEnvironmentsStoragesClient object. - */ - ManagedEnvironmentsStoragesClient getManagedEnvironmentsStorages(); - - /** - * Gets the ContainerAppsSessionPoolsClient object to access its operations. - * - * @return the ContainerAppsSessionPoolsClient object. - */ - ContainerAppsSessionPoolsClient getContainerAppsSessionPools(); - - /** - * Gets the ContainerAppsSourceControlsClient object to access its operations. - * - * @return the ContainerAppsSourceControlsClient object. - */ - ContainerAppsSourceControlsClient getContainerAppsSourceControls(); - - /** - * Gets the UsagesClient object to access its operations. - * - * @return the UsagesClient object. - */ - UsagesClient getUsages(); - - /** - * Gets the ManagedEnvironmentUsagesClient object to access its operations. - * - * @return the ManagedEnvironmentUsagesClient object. - */ - ManagedEnvironmentUsagesClient getManagedEnvironmentUsages(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsAuthConfigsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsAuthConfigsClient.java deleted file mode 100644 index c28af17f98d3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsAuthConfigsClient.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (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.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; - -/** - * An instance of this class provides access to all the operations defined in ContainerAppsAuthConfigsClient. - */ -public interface ContainerAppsAuthConfigsClient { - /** - * Get the Container App AuthConfigs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Container App AuthConfigs in a given resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByContainerApp(String resourceGroupName, String containerAppName); - - /** - * Get the Container App AuthConfigs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Container App AuthConfigs in a given resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, - Context context); - - /** - * Get a AuthConfig of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AuthConfig of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String containerAppName, String authConfigName, - Context context); - - /** - * Get a AuthConfig of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AuthConfig of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AuthConfigInner get(String resourceGroupName, String containerAppName, String authConfigName); - - /** - * Create or update the AuthConfig for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param authConfigEnvelope Properties used to create a Container App AuthConfig. - * @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 configuration settings for the Azure ContainerApp Service Authentication / Authorization feature along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String containerAppName, - String authConfigName, AuthConfigInner authConfigEnvelope, Context context); - - /** - * Create or update the AuthConfig for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param authConfigEnvelope Properties used to create a Container App AuthConfig. - * @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 configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AuthConfigInner createOrUpdate(String resourceGroupName, String containerAppName, String authConfigName, - AuthConfigInner authConfigEnvelope); - - /** - * Delete a Container App AuthConfig. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @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 Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String containerAppName, String authConfigName, - Context context); - - /** - * Delete a Container App AuthConfig. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @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 containerAppName, String authConfigName); -} 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 deleted file mode 100644 index 258e621ecb99..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsByContainerAppsClient.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.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 deleted file mode 100644 index 7d3c288df126..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsClient.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (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/ContainerAppsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsClient.java deleted file mode 100644 index 88af33e45a93..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsClient.java +++ /dev/null @@ -1,517 +0,0 @@ -// Copyright (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.ContainerAppAuthTokenInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; -import com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner; - -/** - * An instance of this class provides access to all the operations defined in ContainerAppsClient. - */ -public interface ContainerAppsClient { - /** - * Get the Container Apps 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 Container Apps in a given subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Get the Container Apps 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 Container Apps in a given subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Get the Container Apps in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get the Container Apps in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String containerAppName, - Context context); - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppInner getByResourceGroup(String resourceGroupName, String containerAppName); - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppInner> beginCreateOrUpdate(String resourceGroupName, - String containerAppName, ContainerAppInner containerAppEnvelope); - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppInner> beginCreateOrUpdate(String resourceGroupName, - String containerAppName, ContainerAppInner containerAppEnvelope, Context context); - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppInner createOrUpdate(String resourceGroupName, String containerAppName, - ContainerAppInner containerAppEnvelope); - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppInner createOrUpdate(String resourceGroupName, String containerAppName, - ContainerAppInner containerAppEnvelope, Context context); - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 containerAppName); - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 containerAppName, Context context); - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 containerAppName); - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 containerAppName, Context context); - - /** - * Update properties of a Container App - * - * Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of container App. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppInner> beginUpdate(String resourceGroupName, - String containerAppName, ContainerAppInner containerAppEnvelope); - - /** - * Update properties of a Container App - * - * Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of container App. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppInner> beginUpdate(String resourceGroupName, - String containerAppName, ContainerAppInner containerAppEnvelope, Context context); - - /** - * Update properties of a Container App - * - * Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppInner update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); - - /** - * Update properties of a Container App - * - * Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppInner update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, - Context context); - - /** - * Analyzes a custom hostname for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param customHostname Custom hostname. - * @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 custom domain analysis along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listCustomHostnameAnalysisWithResponse(String resourceGroupName, - String containerAppName, String customHostname, Context context); - - /** - * Analyzes a custom hostname for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 custom domain analysis. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CustomHostnameAnalysisResultInner listCustomHostnameAnalysis(String resourceGroupName, String containerAppName); - - /** - * List secrets for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Secrets Collection ARM resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listSecretsWithResponse(String resourceGroupName, String containerAppName, - Context context); - - /** - * List secrets for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Secrets Collection ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SecretsCollectionInner listSecrets(String resourceGroupName, String containerAppName); - - /** - * Get auth token for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return auth token for a container app along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getAuthTokenWithResponse(String resourceGroupName, String containerAppName, - Context context); - - /** - * Get auth token for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return auth token for a container app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppAuthTokenInner getAuthToken(String resourceGroupName, String containerAppName); - - /** - * Start a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppInner> beginStart(String resourceGroupName, - String containerAppName); - - /** - * Start a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppInner> beginStart(String resourceGroupName, - String containerAppName, Context context); - - /** - * Start a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppInner start(String resourceGroupName, String containerAppName); - - /** - * Start a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppInner start(String resourceGroupName, String containerAppName, Context context); - - /** - * Stop a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppInner> beginStop(String resourceGroupName, - String containerAppName); - - /** - * Stop a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppInner> beginStop(String resourceGroupName, - String containerAppName, Context context); - - /** - * Stop a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppInner stop(String resourceGroupName, String containerAppName); - - /** - * Stop a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppInner stop(String resourceGroupName, String containerAppName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsDiagnosticsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsDiagnosticsClient.java deleted file mode 100644 index 6460fb251e7a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsDiagnosticsClient.java +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (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.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; - -/** - * An instance of this class provides access to all the operations defined in ContainerAppsDiagnosticsClient. - */ -public interface ContainerAppsDiagnosticsClient { - /** - * Get the list of diagnostics for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which detector info is needed. - * @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 list of diagnostics for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDetectors(String resourceGroupName, String containerAppName); - - /** - * Get the list of diagnostics for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which detector info is needed. - * @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 list of diagnostics for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDetectors(String resourceGroupName, String containerAppName, Context context); - - /** - * Get a diagnostics result of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param detectorName Name of the Container App Detector. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a diagnostics result of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDetectorWithResponse(String resourceGroupName, String containerAppName, - String detectorName, Context context); - - /** - * Get a diagnostics result of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param detectorName Name of the Container App Detector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a diagnostics result of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DiagnosticsInner getDetector(String resourceGroupName, String containerAppName, String detectorName); - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @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 Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRevisions(String resourceGroupName, String containerAppName); - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRevisions(String resourceGroupName, String containerAppName, String filter, - Context context); - - /** - * Get a revision of a 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getRevisionWithResponse(String resourceGroupName, String containerAppName, - String revisionName, Context context); - - /** - * Get a revision of a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RevisionInner getRevision(String resourceGroupName, String containerAppName, String revisionName); - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getRootWithResponse(String resourceGroupName, String containerAppName, Context context); - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppInner getRoot(String resourceGroupName, String containerAppName); -} 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 deleted file mode 100644 index 12ce9706f0b7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsPatchesClient.java +++ /dev/null @@ -1,263 +0,0 @@ -// Copyright (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/ContainerAppsRevisionReplicasClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionReplicasClient.java deleted file mode 100644 index 05a7e08c569a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionReplicasClient.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.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; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; - -/** - * An instance of this class provides access to all the operations defined in ContainerAppsRevisionReplicasClient. - */ -public interface ContainerAppsRevisionReplicasClient { - /** - * Get a replica for a Container App Revision. - * - * @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. - * @param replicaName Name of the Container App Revision Replica. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a replica for a Container App Revision along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getReplicaWithResponse(String resourceGroupName, String containerAppName, - String revisionName, String replicaName, Context context); - - /** - * Get a replica for a Container App Revision. - * - * @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. - * @param replicaName Name of the Container App Revision Replica. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a replica for a Container App Revision. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicaInner getReplica(String resourceGroupName, String containerAppName, String revisionName, String replicaName); - - /** - * List replicas for a Container App Revision. - * - * @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. - * @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 Revision Replicas collection ARM resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listReplicasWithResponse(String resourceGroupName, String containerAppName, - String revisionName, Context context); - - /** - * List replicas for a Container App Revision. - * - * @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. - * @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 Revision Replicas collection ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ReplicaCollectionInner listReplicas(String resourceGroupName, String containerAppName, String revisionName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionsClient.java deleted file mode 100644 index c8079e70967d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionsClient.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (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.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; - -/** - * An instance of this class provides access to all the operations defined in ContainerAppsRevisionsClient. - */ -public interface ContainerAppsRevisionsClient { - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @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 Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRevisions(String resourceGroupName, String containerAppName); - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRevisions(String resourceGroupName, String containerAppName, String filter, - Context context); - - /** - * Get a revision of a 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getRevisionWithResponse(String resourceGroupName, String containerAppName, - String revisionName, Context context); - - /** - * Get a revision of a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - RevisionInner getRevision(String resourceGroupName, String containerAppName, String revisionName); - - /** - * Activates a revision for a 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. - * @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 Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response activateRevisionWithResponse(String resourceGroupName, String containerAppName, String revisionName, - Context context); - - /** - * Activates a revision for a 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. - * @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 activateRevision(String resourceGroupName, String containerAppName, String revisionName); - - /** - * Deactivates a revision for a 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. - * @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 Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deactivateRevisionWithResponse(String resourceGroupName, String containerAppName, - String revisionName, Context context); - - /** - * Deactivates a revision for a 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. - * @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 deactivateRevision(String resourceGroupName, String containerAppName, String revisionName); - - /** - * Restarts a revision for a 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. - * @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 Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response restartRevisionWithResponse(String resourceGroupName, String containerAppName, String revisionName, - Context context); - - /** - * Restarts a revision for a 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. - * @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 restartRevision(String resourceGroupName, String containerAppName, String revisionName); -} 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 deleted file mode 100644 index f9893672ae57..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSessionPoolsClient.java +++ /dev/null @@ -1,297 +0,0 @@ -// Copyright (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.core.management.exception.ManagementException 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.core.management.exception.ManagementException 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.core.management.exception.ManagementException 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.core.management.exception.ManagementException 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.core.management.exception.ManagementException 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.core.management.exception.ManagementException 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.core.management.exception.ManagementException thrown if the request is 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.core.management.exception.ManagementException thrown if the request is 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.core.management.exception.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 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.core.management.exception.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 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.core.management.exception.ManagementException thrown if the request is 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.core.management.exception.ManagementException thrown if the request is 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.core.management.exception.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 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.core.management.exception.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 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.core.management.exception.ManagementException thrown if the request is 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.core.management.exception.ManagementException thrown if the request is 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.core.management.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 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.core.management.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 sessionPoolName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSourceControlsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSourceControlsClient.java deleted file mode 100644 index a0cd2b836d37..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSourceControlsClient.java +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (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.SourceControlInner; - -/** - * An instance of this class provides access to all the operations defined in ContainerAppsSourceControlsClient. - */ -public interface ContainerAppsSourceControlsClient { - /** - * Get the Container App SourceControls in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Container App SourceControls in a given resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByContainerApp(String resourceGroupName, String containerAppName); - - /** - * Get the Container App SourceControls in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Container App SourceControls in a given resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, - Context context); - - /** - * Get a SourceControl of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String containerAppName, - String sourceControlName, Context context); - - /** - * Get a SourceControl of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SourceControlInner get(String resourceGroupName, String containerAppName, String sourceControlName); - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @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 SourceControl. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SourceControlInner> beginCreateOrUpdate(String resourceGroupName, - String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope); - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @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 SourceControl. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SourceControlInner> beginCreateOrUpdate(String resourceGroupName, - String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope, - String xMsGithubAuxiliary, Context context); - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @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 SourceControl. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SourceControlInner createOrUpdate(String resourceGroupName, String containerAppName, String sourceControlName, - SourceControlInner sourceControlEnvelope); - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @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 SourceControl. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - SourceControlInner createOrUpdate(String resourceGroupName, String containerAppName, String sourceControlName, - SourceControlInner sourceControlEnvelope, String xMsGithubAuxiliary, Context context); - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @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 containerAppName, - String sourceControlName); - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. - * @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 containerAppName, - String sourceControlName, String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, - Boolean deleteWorkflow, Context context); - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @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 containerAppName, String sourceControlName); - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. - * @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 containerAppName, String sourceControlName, String xMsGithubAuxiliary, - Boolean ignoreWorkflowDeletionFailure, Boolean deleteWorkflow, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentResiliencyPoliciesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentResiliencyPoliciesClient.java deleted file mode 100644 index c057e69e3e88..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentResiliencyPoliciesClient.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (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.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner; - -/** - * An instance of this class provides access to all the operations defined in DaprComponentResiliencyPoliciesClient. - */ -public interface DaprComponentResiliencyPoliciesClient { - /** - * Get the resiliency policies for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 resiliency policies for a Dapr component as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName, - String componentName); - - /** - * Get the resiliency policies for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 resiliency policies for a Dapr component as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName, - String componentName, Context context); - - /** - * Get a Dapr component resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Dapr component resiliency policy along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String environmentName, - String componentName, String name, Context context); - - /** - * Get a Dapr component resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Dapr component resiliency policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DaprComponentResiliencyPolicyInner get(String resourceGroupName, String environmentName, String componentName, - String name); - - /** - * Creates or updates a Dapr component resiliency policy. - * - * Creates or updates a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. - * @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 dapr Component Resiliency Policy along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, - String environmentName, String componentName, String name, - DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope, Context context); - - /** - * Creates or updates a Dapr component resiliency policy. - * - * Creates or updates a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. - * @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 dapr Component Resiliency Policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DaprComponentResiliencyPolicyInner createOrUpdate(String resourceGroupName, String environmentName, - String componentName, String name, DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope); - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @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 Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, - String name, Context context); - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @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 environmentName, String componentName, String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentsClient.java deleted file mode 100644 index cac5b28a2004..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentsClient.java +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (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.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; - -/** - * An instance of this class provides access to all the operations defined in DaprComponentsClient. - */ -public interface DaprComponentsClient { - /** - * Get the Dapr Components for a 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.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 Dapr Components for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Get the Dapr Components for a 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.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 Dapr Components for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName, Context context); - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String environmentName, String componentName, - Context context); - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DaprComponentInner get(String resourceGroupName, String environmentName, String componentName); - - /** - * Creates or updates a Dapr Component. - * - * Creates or updates a Dapr Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @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 dapr Component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, - String componentName, DaprComponentInner daprComponentEnvelope, Context context); - - /** - * Creates or updates a Dapr Component. - * - * Creates or updates a Dapr Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @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 dapr Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DaprComponentInner createOrUpdate(String resourceGroupName, String environmentName, String componentName, - DaprComponentInner daprComponentEnvelope); - - /** - * Delete a Dapr Component. - * - * Delete a Dapr Component from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, - Context context); - - /** - * Delete a Dapr Component. - * - * Delete a Dapr Component from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 environmentName, String componentName); - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component Secrets Collection for ListSecrets Action along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listSecretsWithResponse(String resourceGroupName, String environmentName, - String componentName, Context context); - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component Secrets Collection for ListSecrets Action. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DaprSecretsCollectionInner listSecrets(String resourceGroupName, String environmentName, String componentName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprSubscriptionsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprSubscriptionsClient.java deleted file mode 100644 index 363e068ef7e3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprSubscriptionsClient.java +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (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.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; - -/** - * An instance of this class provides access to all the operations defined in DaprSubscriptionsClient. - */ -public interface DaprSubscriptionsClient { - /** - * Get the Dapr subscriptions for a 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.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 Dapr subscriptions for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Get the Dapr subscriptions for a 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.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 Dapr subscriptions for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName, Context context); - - /** - * Get a dapr subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr 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 a dapr subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String environmentName, String name, - Context context); - - /** - * Get a dapr subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DaprSubscriptionInner get(String resourceGroupName, String environmentName, String name); - - /** - * Creates or updates a Dapr subscription. - * - * Creates or updates a Dapr subscription in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param daprSubscriptionEnvelope Configuration details of the Dapr 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 dapr PubSub Event Subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, - String name, DaprSubscriptionInner daprSubscriptionEnvelope, Context context); - - /** - * Creates or updates a Dapr subscription. - * - * Creates or updates a Dapr subscription in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param daprSubscriptionEnvelope Configuration details of the Dapr subscription. - * @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 dapr PubSub Event Subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DaprSubscriptionInner createOrUpdate(String resourceGroupName, String environmentName, String name, - DaprSubscriptionInner daprSubscriptionEnvelope); - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr 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 {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String environmentName, String name, Context context); - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @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 environmentName, String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DotNetComponentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DotNetComponentsClient.java deleted file mode 100644 index f321e882b169..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DotNetComponentsClient.java +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright (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.DotNetComponentInner; - -/** - * An instance of this class provides access to all the operations defined in DotNetComponentsClient. - */ -public interface DotNetComponentsClient { - /** - * Get the .NET Components for a 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 the .NET Components for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Get the .NET Components for a 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 the .NET Components for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName, Context context); - - /** - * Get a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 .NET Component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String environmentName, String name, - Context context); - - /** - * Get a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DotNetComponentInner get(String resourceGroupName, String environmentName, String name); - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DotNetComponentInner> beginCreateOrUpdate(String resourceGroupName, - String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope); - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DotNetComponentInner> beginCreateOrUpdate(String resourceGroupName, - String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, Context context); - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return .NET Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DotNetComponentInner createOrUpdate(String resourceGroupName, String environmentName, String name, - DotNetComponentInner dotNetComponentEnvelope); - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return .NET Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DotNetComponentInner createOrUpdate(String resourceGroupName, String environmentName, String name, - DotNetComponentInner dotNetComponentEnvelope, Context context); - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DotNetComponentInner> beginUpdate(String resourceGroupName, - String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope); - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, DotNetComponentInner> beginUpdate(String resourceGroupName, - String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, Context context); - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return .NET Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DotNetComponentInner update(String resourceGroupName, String environmentName, String name, - DotNetComponentInner dotNetComponentEnvelope); - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return .NET Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DotNetComponentInner update(String resourceGroupName, String environmentName, String name, - DotNetComponentInner dotNetComponentEnvelope, Context context); - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 name); - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 name, - Context context); - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 name); - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 name, 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 deleted file mode 100644 index 45732c3aac77..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/FunctionsExtensionsClient.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.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/JavaComponentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JavaComponentsClient.java deleted file mode 100644 index 160ff1772826..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JavaComponentsClient.java +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright (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.JavaComponentInner; - -/** - * An instance of this class provides access to all the operations defined in JavaComponentsClient. - */ -public interface JavaComponentsClient { - /** - * Get the Java Components for a 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 the Java Components for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Get the Java Components for a 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 the Java Components for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName, Context context); - - /** - * Get a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 Java Component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String environmentName, String name, - Context context); - - /** - * Get a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 Java Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JavaComponentInner get(String resourceGroupName, String environmentName, String name); - - /** - * Creates or updates a Java Component. - * - * Creates or updates a Java Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of java Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JavaComponentInner> beginCreateOrUpdate(String resourceGroupName, - String environmentName, String name, JavaComponentInner javaComponentEnvelope); - - /** - * Creates or updates a Java Component. - * - * Creates or updates a Java Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of java Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JavaComponentInner> beginCreateOrUpdate(String resourceGroupName, - String environmentName, String name, JavaComponentInner javaComponentEnvelope, Context context); - - /** - * Creates or updates a Java Component. - * - * Creates or updates a Java Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return java Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JavaComponentInner createOrUpdate(String resourceGroupName, String environmentName, String name, - JavaComponentInner javaComponentEnvelope); - - /** - * Creates or updates a Java Component. - * - * Creates or updates a Java Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return java Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JavaComponentInner createOrUpdate(String resourceGroupName, String environmentName, String name, - JavaComponentInner javaComponentEnvelope, Context context); - - /** - * Update properties of a Java Component - * - * Patches a Java Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of java Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JavaComponentInner> beginUpdate(String resourceGroupName, - String environmentName, String name, JavaComponentInner javaComponentEnvelope); - - /** - * Update properties of a Java Component - * - * Patches a Java Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of java Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JavaComponentInner> beginUpdate(String resourceGroupName, - String environmentName, String name, JavaComponentInner javaComponentEnvelope, Context context); - - /** - * Update properties of a Java Component - * - * Patches a Java Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return java Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JavaComponentInner update(String resourceGroupName, String environmentName, String name, - JavaComponentInner javaComponentEnvelope); - - /** - * Update properties of a Java Component - * - * Patches a Java Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return java Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JavaComponentInner update(String resourceGroupName, String environmentName, String name, - JavaComponentInner javaComponentEnvelope, Context context); - - /** - * Delete a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 name); - - /** - * Delete a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 name, - Context context); - - /** - * Delete a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 name); - - /** - * Delete a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 name, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsClient.java deleted file mode 100644 index 929ace5c0ef5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsClient.java +++ /dev/null @@ -1,724 +0,0 @@ -// Copyright (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.ContainerAppJobExecutionsInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner; -import com.azure.resourcemanager.appcontainers.fluent.models.JobInner; -import com.azure.resourcemanager.appcontainers.fluent.models.JobSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; -import com.azure.resourcemanager.appcontainers.models.JobPatchProperties; - -/** - * An instance of this class provides access to all the operations defined in JobsClient. - */ -public interface JobsClient { - /** - * Get the list of diagnostics for a given Container App Job. - * - * Get the list of diagnostics for a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 list of diagnostics for a Container App Job as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDetectors(String resourceGroupName, String jobName); - - /** - * Get the list of diagnostics for a given Container App Job. - * - * Get the list of diagnostics for a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 list of diagnostics for a Container App Job as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listDetectors(String resourceGroupName, String jobName, Context context); - - /** - * Get the diagnostics data for a given Container App Job. - * - * Get the diagnostics data for a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param detectorName Name of the Container App Job detector. - * @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 diagnostics data for a Container App Job along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDetectorWithResponse(String resourceGroupName, String jobName, String detectorName, - Context context); - - /** - * Get the diagnostics data for a given Container App Job. - * - * Get the diagnostics data for a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param detectorName Name of the Container App Job detector. - * @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 diagnostics data for a Container App Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DiagnosticsInner getDetector(String resourceGroupName, String jobName, String detectorName); - - /** - * Get the properties for a given Container App Job. - * - * Get the properties of a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param apiName Proxy API Name for Container App Job. - * @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 Container App Job along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response proxyGetWithResponse(String resourceGroupName, String jobName, String apiName, Context context); - - /** - * Get the properties for a given Container App Job. - * - * Get the properties of a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param apiName Proxy API Name for Container App Job. - * @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 Container App Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner proxyGet(String resourceGroupName, String jobName, String apiName); - - /** - * Get the Container Apps Jobs 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 Container Apps Jobs in a given subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Get the Container Apps Jobs 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 Container Apps Jobs in a given subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Get the Container Apps Jobs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps Jobs in a given resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get the Container Apps Jobs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps Jobs in a given resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get the properties of a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 Container Apps Job along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String jobName, Context context); - - /** - * Get the properties of a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 Container Apps Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner getByResourceGroup(String resourceGroupName, String jobName); - - /** - * Create or Update a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginCreateOrUpdate(String resourceGroupName, String jobName, - JobInner jobEnvelope); - - /** - * Create or Update a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginCreateOrUpdate(String resourceGroupName, String jobName, - JobInner jobEnvelope, Context context); - - /** - * Create or Update a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner createOrUpdate(String resourceGroupName, String jobName, JobInner jobEnvelope); - - /** - * Create or Update a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner createOrUpdate(String resourceGroupName, String jobName, JobInner jobEnvelope, Context context); - - /** - * Delete a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 jobName); - - /** - * Delete a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 jobName, Context context); - - /** - * Delete a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 jobName); - - /** - * Delete a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 jobName, Context context); - - /** - * Update properties of a Container Apps Job - * - * Patches a Container Apps Job using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginUpdate(String resourceGroupName, String jobName, - JobPatchProperties jobEnvelope); - - /** - * Update properties of a Container Apps Job - * - * Patches a Container Apps Job using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginUpdate(String resourceGroupName, String jobName, - JobPatchProperties jobEnvelope, Context context); - - /** - * Update properties of a Container Apps Job - * - * Patches a Container Apps Job using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner update(String resourceGroupName, String jobName, JobPatchProperties jobEnvelope); - - /** - * Update properties of a Container Apps Job - * - * Patches a Container Apps Job using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner update(String resourceGroupName, String jobName, JobPatchProperties jobEnvelope, Context context); - - /** - * Start a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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's Job execution name. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobExecutionBaseInner> beginStart(String resourceGroupName, - String jobName); - - /** - * Start a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param template Properties used to start a job execution. - * @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's Job execution name. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobExecutionBaseInner> beginStart(String resourceGroupName, - String jobName, JobExecutionTemplate template, Context context); - - /** - * Start a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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's Job execution name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobExecutionBaseInner start(String resourceGroupName, String jobName); - - /** - * Start a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param template Properties used to start a job execution. - * @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's Job execution name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobExecutionBaseInner start(String resourceGroupName, String jobName, JobExecutionTemplate template, - Context context); - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @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> beginStopExecution(String resourceGroupName, String jobName, - String jobExecutionName); - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @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> beginStopExecution(String resourceGroupName, String jobName, - String jobExecutionName, Context context); - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @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 stopExecution(String resourceGroupName, String jobName, String jobExecutionName); - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @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 stopExecution(String resourceGroupName, String jobName, String jobExecutionName, Context context); - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 executions collection ARM resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppJobExecutionsInner> - beginStopMultipleExecutions(String resourceGroupName, String jobName); - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 executions collection ARM resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppJobExecutionsInner> - beginStopMultipleExecutions(String resourceGroupName, String jobName, Context context); - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 executions collection ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppJobExecutionsInner stopMultipleExecutions(String resourceGroupName, String jobName); - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 executions collection ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppJobExecutionsInner stopMultipleExecutions(String resourceGroupName, String jobName, Context context); - - /** - * List secrets for a container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 Apps Job Secrets Collection ARM resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listSecretsWithResponse(String resourceGroupName, String jobName, - Context context); - - /** - * List secrets for a container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 Apps Job Secrets Collection ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobSecretsCollectionInner listSecrets(String resourceGroupName, String jobName); - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginResume(String resourceGroupName, String jobName); - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginResume(String resourceGroupName, String jobName, Context context); - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner resume(String resourceGroupName, String jobName); - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner resume(String resourceGroupName, String jobName, Context context); - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginSuspend(String resourceGroupName, String jobName); - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is 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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginSuspend(String resourceGroupName, String jobName, Context context); - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner suspend(String resourceGroupName, String jobName); - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobInner suspend(String resourceGroupName, String jobName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsExecutionsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsExecutionsClient.java deleted file mode 100644 index d9c95e6f4a71..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsExecutionsClient.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.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.JobExecutionInner; - -/** - * An instance of this class provides access to all the operations defined in JobsExecutionsClient. - */ -public interface JobsExecutionsClient { - /** - * Get a Container Apps Job's executions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Container Apps Job's executions as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String jobName); - - /** - * Get a Container Apps Job's executions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Container Apps Job's executions as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String jobName, String filter, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/LogicAppsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/LogicAppsClient.java deleted file mode 100644 index 1ee60bcd1b3c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/LogicAppsClient.java +++ /dev/null @@ -1,288 +0,0 @@ -// Copyright (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.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.LogicAppInner; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkflowEnvelopeInner; -import com.azure.resourcemanager.appcontainers.models.LogicAppsProxyMethod; -import com.azure.resourcemanager.appcontainers.models.WorkflowArtifacts; - -/** - * An instance of this class provides access to all the operations defined in LogicAppsClient. - */ -public interface LogicAppsClient { - /** - * Gets a logic app extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 a logic app extension resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - Context context); - - /** - * Gets a logic app extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 a logic app extension resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LogicAppInner get(String resourceGroupName, String containerAppName, String logicAppName); - - /** - * Create or update a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param resource Logic app resource properties. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, LogicAppInner resource, Context context); - - /** - * Create or update a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param resource Logic app resource properties. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LogicAppInner createOrUpdate(String resourceGroupName, String containerAppName, String logicAppName, - LogicAppInner resource); - - /** - * Deletes a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - Context context); - - /** - * Deletes a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String containerAppName, String logicAppName); - - /** - * List the workflows for a logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 collection of workflow information elements as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listWorkflows(String resourceGroupName, String containerAppName, - String logicAppName); - - /** - * List the workflows for a logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 collection of workflow information elements as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listWorkflows(String resourceGroupName, String containerAppName, - String logicAppName, Context context); - - /** - * Get workflow information by its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowName Workflow name. - * @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 workflow information by its name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWorkflowWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, String workflowName, Context context); - - /** - * Get workflow information by its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowName Workflow name. - * @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 workflow information by its name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkflowEnvelopeInner getWorkflow(String resourceGroupName, String containerAppName, String logicAppName, - String workflowName); - - /** - * Creates or updates the artifacts for the logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowArtifacts Application settings and files of the workflow. - * @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 Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deployWorkflowArtifactsWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, WorkflowArtifacts workflowArtifacts, Context context); - - /** - * Creates or updates the artifacts for the logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void deployWorkflowArtifacts(String resourceGroupName, String containerAppName, String logicAppName); - - /** - * Gets logic app's connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 logic app's connections along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWorkflowsConnectionsWithResponse(String resourceGroupName, - String containerAppName, String logicAppName, Context context); - - /** - * Gets logic app's connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 logic app's connections. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - WorkflowEnvelopeInner listWorkflowsConnections(String resourceGroupName, String containerAppName, - String logicAppName); - - /** - * Proxies a the API call to the logic 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 logicAppName Name of the LogicApp App, the extension resource. - * @param xMsLogicAppsProxyPath The proxy path for the API call. - * @param xMsLogicAppsProxyMethod The proxy method for the API call. - * @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 any object along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response invokeWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - String xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod, Context context); - - /** - * Proxies a the API call to the logic 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 logicAppName Name of the LogicApp App, the extension resource. - * @param xMsLogicAppsProxyPath The proxy path for the API call. - * @param xMsLogicAppsProxyMethod The proxy method for the API call. - * @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 any object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Object invoke(String resourceGroupName, String containerAppName, String logicAppName, String xMsLogicAppsProxyPath, - LogicAppsProxyMethod xMsLogicAppsProxyMethod); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedCertificatesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedCertificatesClient.java deleted file mode 100644 index 37406c086470..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedCertificatesClient.java +++ /dev/null @@ -1,231 +0,0 @@ -// Copyright (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.ManagedCertificateInner; -import com.azure.resourcemanager.appcontainers.models.ManagedCertificatePatch; - -/** - * An instance of this class provides access to all the operations defined in ManagedCertificatesClient. - */ -public interface ManagedCertificatesClient { - /** - * Get the specified Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @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 specified Managed Certificate along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String environmentName, - String managedCertificateName, Context context); - - /** - * Get the specified Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @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 specified Managed Certificate. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCertificateInner get(String resourceGroupName, String environmentName, String managedCertificateName); - - /** - * Create or Update a Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 400. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed certificates used for Custom Domain bindings of Container - * Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedCertificateInner> - beginCreateOrUpdate(String resourceGroupName, String environmentName, String managedCertificateName); - - /** - * Create or Update a Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @param managedCertificateEnvelope Managed Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 400. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed certificates used for Custom Domain bindings of Container - * Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedCertificateInner> beginCreateOrUpdate( - String resourceGroupName, String environmentName, String managedCertificateName, - ManagedCertificateInner managedCertificateEnvelope, Context context); - - /** - * Create or Update a Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 400. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCertificateInner createOrUpdate(String resourceGroupName, String environmentName, - String managedCertificateName); - - /** - * Create or Update a Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @param managedCertificateEnvelope Managed Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 400. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCertificateInner createOrUpdate(String resourceGroupName, String environmentName, - String managedCertificateName, ManagedCertificateInner managedCertificateEnvelope, Context context); - - /** - * Deletes the specified Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @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 Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String environmentName, String managedCertificateName, - Context context); - - /** - * Deletes the specified Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @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 environmentName, String managedCertificateName); - - /** - * Update tags of a managed certificate - * - * Patches a managed certificate. Oly patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @param managedCertificateEnvelope Properties of a managed certificate that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse(String resourceGroupName, String environmentName, - String managedCertificateName, ManagedCertificatePatch managedCertificateEnvelope, Context context); - - /** - * Update tags of a managed certificate - * - * Patches a managed certificate. Oly patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @param managedCertificateEnvelope Properties of a managed certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCertificateInner update(String resourceGroupName, String environmentName, String managedCertificateName, - ManagedCertificatePatch managedCertificateEnvelope); - - /** - * Get the Managed Certificates in 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.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 Managed Certificates in a given managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Get the Managed Certificates in 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.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 Managed Certificates in a given managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentDiagnosticsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentDiagnosticsClient.java deleted file mode 100644 index 9969602d4353..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentDiagnosticsClient.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.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; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; - -/** - * An instance of this class provides access to all the operations defined in ManagedEnvironmentDiagnosticsClient. - */ -public interface ManagedEnvironmentDiagnosticsClient { - /** - * Get the list of diagnostics for a given Managed Environment. - * - * Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listDetectorsWithResponse(String resourceGroupName, String environmentName, - Context context); - - /** - * Get the list of diagnostics for a given Managed Environment. - * - * Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DiagnosticsCollectionInner listDetectors(String resourceGroupName, String environmentName); - - /** - * Get the diagnostics data for a given Managed Environment. - * - * Get the diagnostics data for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param detectorName Name of the Managed Environment detector. - * @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 diagnostics data for a Managed Environment used to host container apps along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getDetectorWithResponse(String resourceGroupName, String environmentName, - String detectorName, Context context); - - /** - * Get the diagnostics data for a given Managed Environment. - * - * Get the diagnostics data for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param detectorName Name of the Managed Environment detector. - * @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 diagnostics data for a Managed Environment used to host container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DiagnosticsInner getDetector(String resourceGroupName, String environmentName, String detectorName); -} 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 deleted file mode 100644 index 37a4ed33fe03..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentPrivateEndpointConnectionsClient.java +++ /dev/null @@ -1,219 +0,0 @@ -// Copyright (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 deleted file mode 100644 index 7235c21740e7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentPrivateLinkResourcesClient.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.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/ManagedEnvironmentUsagesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentUsagesClient.java deleted file mode 100644 index 3d9e05a007a2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentUsagesClient.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; - -/** - * An instance of this class provides access to all the operations defined in ManagedEnvironmentUsagesClient. - */ -public interface ManagedEnvironmentUsagesClient { - /** - * Gets the current usage information as well as the limits for environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as the limits for environment as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Gets the current usage information as well as the limits for environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as the limits for environment as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String resourceGroupName, String environmentName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsClient.java deleted file mode 100644 index 115d58555ac3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsClient.java +++ /dev/null @@ -1,395 +0,0 @@ -// Copyright (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.EnvironmentAuthTokenInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; - -/** - * An instance of this class provides access to all the operations defined in ManagedEnvironmentsClient. - */ -public interface ManagedEnvironmentsClient { - /** - * Get all Environments for a subscription. - * - * Get all Managed Environments for a 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 all Managed Environments for a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Get all Environments for a subscription. - * - * Get all Managed Environments for a 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 all Managed Environments for a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); - - /** - * Get all the Environments in a resource group. - * - * Get all the Managed Environments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Managed Environments in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get all the Environments in a resource group. - * - * Get all the Managed Environments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Managed Environments in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get the properties of a Managed Environment. - * - * Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse(String resourceGroupName, String environmentName, - Context context); - - /** - * Get the properties of a Managed Environment. - * - * Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentInner getByResourceGroup(String resourceGroupName, String environmentName); - - /** - * Creates or updates a Managed Environment. - * - * Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedEnvironmentInner> beginCreateOrUpdate( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); - - /** - * Creates or updates a Managed Environment. - * - * Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedEnvironmentInner> beginCreateOrUpdate( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); - - /** - * Creates or updates a Managed Environment. - * - * Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentInner createOrUpdate(String resourceGroupName, String environmentName, - ManagedEnvironmentInner environmentEnvelope); - - /** - * Creates or updates a Managed Environment. - * - * Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentInner createOrUpdate(String resourceGroupName, String environmentName, - ManagedEnvironmentInner environmentEnvelope, Context context); - - /** - * Delete a Managed Environment. - * - * Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName); - - /** - * Delete a Managed Environment. - * - * Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName, Context context); - - /** - * Delete a Managed Environment. - * - * Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String environmentName); - - /** - * Delete a Managed Environment. - * - * Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String environmentName, Context context); - - /** - * Update Managed Environment's properties. - * - * Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedEnvironmentInner> beginUpdate(String resourceGroupName, - String environmentName, ManagedEnvironmentInner environmentEnvelope); - - /** - * Update Managed Environment's properties. - * - * Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedEnvironmentInner> beginUpdate(String resourceGroupName, - String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); - - /** - * Update Managed Environment's properties. - * - * Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentInner update(String resourceGroupName, String environmentName, - ManagedEnvironmentInner environmentEnvelope); - - /** - * Update Managed Environment's properties. - * - * Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentInner update(String resourceGroupName, String environmentName, - ManagedEnvironmentInner environmentEnvelope, Context context); - - /** - * Get auth token for a managed environment - * - * Checks if resource name is available. - * - * @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.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 environment Auth Token along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getAuthTokenWithResponse(String resourceGroupName, String environmentName, - Context context); - - /** - * Get auth token for a managed environment - * - * Checks if resource name is available. - * - * @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.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 environment Auth Token. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - EnvironmentAuthTokenInner getAuthToken(String resourceGroupName, String environmentName); - - /** - * Get all workload Profile States for a Managed Environment.. - * - * Get all workload Profile States for a 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.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 all workload Profile States for a Managed Environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listWorkloadProfileStates(String resourceGroupName, - String environmentName); - - /** - * Get all workload Profile States for a Managed Environment.. - * - * Get all workload Profile States for a 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.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 all workload Profile States for a Managed Environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listWorkloadProfileStates(String resourceGroupName, - String environmentName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsDiagnosticsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsDiagnosticsClient.java deleted file mode 100644 index 1b4c03b2060d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsDiagnosticsClient.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.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; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; - -/** - * An instance of this class provides access to all the operations defined in ManagedEnvironmentsDiagnosticsClient. - */ -public interface ManagedEnvironmentsDiagnosticsClient { - /** - * Get the properties of a Managed Environment. - * - * Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getRootWithResponse(String resourceGroupName, String environmentName, - Context context); - - /** - * Get the properties of a Managed Environment. - * - * Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentInner getRoot(String resourceGroupName, String environmentName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsStoragesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsStoragesClient.java deleted file mode 100644 index d3f52ead4a63..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsStoragesClient.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (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; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner; - -/** - * An instance of this class provides access to all the operations defined in ManagedEnvironmentsStoragesClient. - */ -public interface ManagedEnvironmentsStoragesClient { - /** - * Get all storages for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse(String resourceGroupName, - String environmentName, Context context); - - /** - * Get all storages for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentStoragesCollectionInner list(String resourceGroupName, String environmentName); - - /** - * Get storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 storage for a managedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String resourceGroupName, String environmentName, - String storageName, Context context); - - /** - * Get storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 storage for a managedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentStorageInner get(String resourceGroupName, String environmentName, String storageName); - - /** - * Create or update storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @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 storage resource for managedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse(String resourceGroupName, - String environmentName, String storageName, ManagedEnvironmentStorageInner storageEnvelope, Context context); - - /** - * Create or update storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @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 storage resource for managedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentStorageInner createOrUpdate(String resourceGroupName, String environmentName, String storageName, - ManagedEnvironmentStorageInner storageEnvelope); - - /** - * Delete storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse(String resourceGroupName, String environmentName, String storageName, - Context context); - - /** - * Delete storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 environmentName, String storageName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/NamespacesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/NamespacesClient.java deleted file mode 100644 index df0db6b1e37e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/NamespacesClient.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.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; -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; - -/** - * An instance of this class provides access to all the operations defined in NamespacesClient. - */ -public interface NamespacesClient { - /** - * Checks the resource name availability. - * - * Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check name availability request. - * @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 check availability result along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse(String resourceGroupName, - String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context); - - /** - * Checks the resource name availability. - * - * Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check name availability request. - * @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 check availability result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - CheckNameAvailabilityResponseInner checkNameAvailability(String resourceGroupName, String environmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/OperationsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/OperationsClient.java deleted file mode 100644 index e421fd4a6c0a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/OperationsClient.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) 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.OperationDetailInner; - -/** - * An instance of this class provides access to all the operations defined in OperationsClient. - */ -public interface OperationsClient { - /** - * Lists all of the available RP operations. - * - * @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 available operations of the service as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(); - - /** - * Lists all of the available RP operations. - * - * @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 available operations of the service as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ResourceProvidersClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ResourceProvidersClient.java deleted file mode 100644 index 752dab23418d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ResourceProvidersClient.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.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; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; - -/** - * An instance of this class provides access to all the operations defined in ResourceProvidersClient. - */ -public interface ResourceProvidersClient { - /** - * Get details of a single job execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a single job execution along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response jobExecutionWithResponse(String resourceGroupName, String jobName, - String jobExecutionName, Context context); - - /** - * Get details of a single job execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a single job execution. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - JobExecutionInner jobExecution(String resourceGroupName, String jobName, String jobExecutionName); - - /** - * Get the verification id of a subscription used for verifying custom domains. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the verification id of a subscription used for verifying custom domains along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - Response getCustomDomainVerificationIdWithResponse(Context context); - - /** - * Get the verification id of a subscription used for verifying custom domains. - * - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the verification id of a subscription used for verifying custom domains. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - String getCustomDomainVerificationId(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/UsagesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/UsagesClient.java deleted file mode 100644 index d57572384b32..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/UsagesClient.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.fluent; - -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; - -/** - * An instance of this class provides access to all the operations defined in UsagesClient. - */ -public interface UsagesClient { - /** - * Gets, for the specified location, the current resource usage information as well as the limits under the - * subscription. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location); - - /** - * Gets, for the specified location, the current resource usage information as well as the limits under the - * subscription. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable list(String location, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AppResiliencyInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AppResiliencyInner.java deleted file mode 100644 index b214f81d1c97..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AppResiliencyInner.java +++ /dev/null @@ -1,298 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.CircuitBreakerPolicy; -import com.azure.resourcemanager.appcontainers.models.HttpConnectionPool; -import com.azure.resourcemanager.appcontainers.models.HttpRetryPolicy; -import com.azure.resourcemanager.appcontainers.models.TcpConnectionPool; -import com.azure.resourcemanager.appcontainers.models.TcpRetryPolicy; -import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; -import java.io.IOException; - -/** - * Configuration to setup App Resiliency. - */ -@Fluent -public final class AppResiliencyInner extends ProxyResource { - /* - * App Resiliency resource specific properties - */ - private AppResiliencyProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of AppResiliencyInner class. - */ - public AppResiliencyInner() { - } - - /** - * Get the innerProperties property: App Resiliency resource specific properties. - * - * @return the innerProperties value. - */ - private AppResiliencyProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the timeoutPolicy property: Policy to set request timeouts. - * - * @return the timeoutPolicy value. - */ - public TimeoutPolicy timeoutPolicy() { - return this.innerProperties() == null ? null : this.innerProperties().timeoutPolicy(); - } - - /** - * Set the timeoutPolicy property: Policy to set request timeouts. - * - * @param timeoutPolicy the timeoutPolicy value to set. - * @return the AppResiliencyInner object itself. - */ - public AppResiliencyInner withTimeoutPolicy(TimeoutPolicy timeoutPolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new AppResiliencyProperties(); - } - this.innerProperties().withTimeoutPolicy(timeoutPolicy); - return this; - } - - /** - * Get the httpRetryPolicy property: Policy that defines http request retry conditions. - * - * @return the httpRetryPolicy value. - */ - public HttpRetryPolicy httpRetryPolicy() { - return this.innerProperties() == null ? null : this.innerProperties().httpRetryPolicy(); - } - - /** - * Set the httpRetryPolicy property: Policy that defines http request retry conditions. - * - * @param httpRetryPolicy the httpRetryPolicy value to set. - * @return the AppResiliencyInner object itself. - */ - public AppResiliencyInner withHttpRetryPolicy(HttpRetryPolicy httpRetryPolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new AppResiliencyProperties(); - } - this.innerProperties().withHttpRetryPolicy(httpRetryPolicy); - return this; - } - - /** - * Get the tcpRetryPolicy property: Policy that defines tcp request retry conditions. - * - * @return the tcpRetryPolicy value. - */ - public TcpRetryPolicy tcpRetryPolicy() { - return this.innerProperties() == null ? null : this.innerProperties().tcpRetryPolicy(); - } - - /** - * Set the tcpRetryPolicy property: Policy that defines tcp request retry conditions. - * - * @param tcpRetryPolicy the tcpRetryPolicy value to set. - * @return the AppResiliencyInner object itself. - */ - public AppResiliencyInner withTcpRetryPolicy(TcpRetryPolicy tcpRetryPolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new AppResiliencyProperties(); - } - this.innerProperties().withTcpRetryPolicy(tcpRetryPolicy); - return this; - } - - /** - * Get the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. - * - * @return the circuitBreakerPolicy value. - */ - public CircuitBreakerPolicy circuitBreakerPolicy() { - return this.innerProperties() == null ? null : this.innerProperties().circuitBreakerPolicy(); - } - - /** - * Set the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. - * - * @param circuitBreakerPolicy the circuitBreakerPolicy value to set. - * @return the AppResiliencyInner object itself. - */ - public AppResiliencyInner withCircuitBreakerPolicy(CircuitBreakerPolicy circuitBreakerPolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new AppResiliencyProperties(); - } - this.innerProperties().withCircuitBreakerPolicy(circuitBreakerPolicy); - return this; - } - - /** - * Get the httpConnectionPool property: Defines parameters for http connection pooling. - * - * @return the httpConnectionPool value. - */ - public HttpConnectionPool httpConnectionPool() { - return this.innerProperties() == null ? null : this.innerProperties().httpConnectionPool(); - } - - /** - * Set the httpConnectionPool property: Defines parameters for http connection pooling. - * - * @param httpConnectionPool the httpConnectionPool value to set. - * @return the AppResiliencyInner object itself. - */ - public AppResiliencyInner withHttpConnectionPool(HttpConnectionPool httpConnectionPool) { - if (this.innerProperties() == null) { - this.innerProperties = new AppResiliencyProperties(); - } - this.innerProperties().withHttpConnectionPool(httpConnectionPool); - return this; - } - - /** - * Get the tcpConnectionPool property: Defines parameters for tcp connection pooling. - * - * @return the tcpConnectionPool value. - */ - public TcpConnectionPool tcpConnectionPool() { - return this.innerProperties() == null ? null : this.innerProperties().tcpConnectionPool(); - } - - /** - * Set the tcpConnectionPool property: Defines parameters for tcp connection pooling. - * - * @param tcpConnectionPool the tcpConnectionPool value to set. - * @return the AppResiliencyInner object itself. - */ - public AppResiliencyInner withTcpConnectionPool(TcpConnectionPool tcpConnectionPool) { - if (this.innerProperties() == null) { - this.innerProperties = new AppResiliencyProperties(); - } - this.innerProperties().withTcpConnectionPool(tcpConnectionPool); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AppResiliencyInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AppResiliencyInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AppResiliencyInner. - */ - public static AppResiliencyInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AppResiliencyInner deserializedAppResiliencyInner = new AppResiliencyInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedAppResiliencyInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedAppResiliencyInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedAppResiliencyInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedAppResiliencyInner.innerProperties = AppResiliencyProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedAppResiliencyInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAppResiliencyInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AppResiliencyProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AppResiliencyProperties.java deleted file mode 100644 index 83da18920e65..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AppResiliencyProperties.java +++ /dev/null @@ -1,257 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.CircuitBreakerPolicy; -import com.azure.resourcemanager.appcontainers.models.HttpConnectionPool; -import com.azure.resourcemanager.appcontainers.models.HttpRetryPolicy; -import com.azure.resourcemanager.appcontainers.models.TcpConnectionPool; -import com.azure.resourcemanager.appcontainers.models.TcpRetryPolicy; -import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; -import java.io.IOException; - -/** - * App Resiliency resource specific properties. - */ -@Fluent -public final class AppResiliencyProperties implements JsonSerializable { - /* - * Policy to set request timeouts - */ - private TimeoutPolicy timeoutPolicy; - - /* - * Policy that defines http request retry conditions - */ - private HttpRetryPolicy httpRetryPolicy; - - /* - * Policy that defines tcp request retry conditions - */ - private TcpRetryPolicy tcpRetryPolicy; - - /* - * Policy that defines circuit breaker conditions - */ - private CircuitBreakerPolicy circuitBreakerPolicy; - - /* - * Defines parameters for http connection pooling - */ - private HttpConnectionPool httpConnectionPool; - - /* - * Defines parameters for tcp connection pooling - */ - private TcpConnectionPool tcpConnectionPool; - - /** - * Creates an instance of AppResiliencyProperties class. - */ - public AppResiliencyProperties() { - } - - /** - * Get the timeoutPolicy property: Policy to set request timeouts. - * - * @return the timeoutPolicy value. - */ - public TimeoutPolicy timeoutPolicy() { - return this.timeoutPolicy; - } - - /** - * Set the timeoutPolicy property: Policy to set request timeouts. - * - * @param timeoutPolicy the timeoutPolicy value to set. - * @return the AppResiliencyProperties object itself. - */ - public AppResiliencyProperties withTimeoutPolicy(TimeoutPolicy timeoutPolicy) { - this.timeoutPolicy = timeoutPolicy; - return this; - } - - /** - * Get the httpRetryPolicy property: Policy that defines http request retry conditions. - * - * @return the httpRetryPolicy value. - */ - public HttpRetryPolicy httpRetryPolicy() { - return this.httpRetryPolicy; - } - - /** - * Set the httpRetryPolicy property: Policy that defines http request retry conditions. - * - * @param httpRetryPolicy the httpRetryPolicy value to set. - * @return the AppResiliencyProperties object itself. - */ - public AppResiliencyProperties withHttpRetryPolicy(HttpRetryPolicy httpRetryPolicy) { - this.httpRetryPolicy = httpRetryPolicy; - return this; - } - - /** - * Get the tcpRetryPolicy property: Policy that defines tcp request retry conditions. - * - * @return the tcpRetryPolicy value. - */ - public TcpRetryPolicy tcpRetryPolicy() { - return this.tcpRetryPolicy; - } - - /** - * Set the tcpRetryPolicy property: Policy that defines tcp request retry conditions. - * - * @param tcpRetryPolicy the tcpRetryPolicy value to set. - * @return the AppResiliencyProperties object itself. - */ - public AppResiliencyProperties withTcpRetryPolicy(TcpRetryPolicy tcpRetryPolicy) { - this.tcpRetryPolicy = tcpRetryPolicy; - return this; - } - - /** - * Get the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. - * - * @return the circuitBreakerPolicy value. - */ - public CircuitBreakerPolicy circuitBreakerPolicy() { - return this.circuitBreakerPolicy; - } - - /** - * Set the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. - * - * @param circuitBreakerPolicy the circuitBreakerPolicy value to set. - * @return the AppResiliencyProperties object itself. - */ - public AppResiliencyProperties withCircuitBreakerPolicy(CircuitBreakerPolicy circuitBreakerPolicy) { - this.circuitBreakerPolicy = circuitBreakerPolicy; - return this; - } - - /** - * Get the httpConnectionPool property: Defines parameters for http connection pooling. - * - * @return the httpConnectionPool value. - */ - public HttpConnectionPool httpConnectionPool() { - return this.httpConnectionPool; - } - - /** - * Set the httpConnectionPool property: Defines parameters for http connection pooling. - * - * @param httpConnectionPool the httpConnectionPool value to set. - * @return the AppResiliencyProperties object itself. - */ - public AppResiliencyProperties withHttpConnectionPool(HttpConnectionPool httpConnectionPool) { - this.httpConnectionPool = httpConnectionPool; - return this; - } - - /** - * Get the tcpConnectionPool property: Defines parameters for tcp connection pooling. - * - * @return the tcpConnectionPool value. - */ - public TcpConnectionPool tcpConnectionPool() { - return this.tcpConnectionPool; - } - - /** - * Set the tcpConnectionPool property: Defines parameters for tcp connection pooling. - * - * @param tcpConnectionPool the tcpConnectionPool value to set. - * @return the AppResiliencyProperties object itself. - */ - public AppResiliencyProperties withTcpConnectionPool(TcpConnectionPool tcpConnectionPool) { - this.tcpConnectionPool = tcpConnectionPool; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (timeoutPolicy() != null) { - timeoutPolicy().validate(); - } - if (httpRetryPolicy() != null) { - httpRetryPolicy().validate(); - } - if (tcpRetryPolicy() != null) { - tcpRetryPolicy().validate(); - } - if (circuitBreakerPolicy() != null) { - circuitBreakerPolicy().validate(); - } - if (httpConnectionPool() != null) { - httpConnectionPool().validate(); - } - if (tcpConnectionPool() != null) { - tcpConnectionPool().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("timeoutPolicy", this.timeoutPolicy); - jsonWriter.writeJsonField("httpRetryPolicy", this.httpRetryPolicy); - jsonWriter.writeJsonField("tcpRetryPolicy", this.tcpRetryPolicy); - jsonWriter.writeJsonField("circuitBreakerPolicy", this.circuitBreakerPolicy); - jsonWriter.writeJsonField("httpConnectionPool", this.httpConnectionPool); - jsonWriter.writeJsonField("tcpConnectionPool", this.tcpConnectionPool); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AppResiliencyProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AppResiliencyProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the AppResiliencyProperties. - */ - public static AppResiliencyProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AppResiliencyProperties deserializedAppResiliencyProperties = new AppResiliencyProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("timeoutPolicy".equals(fieldName)) { - deserializedAppResiliencyProperties.timeoutPolicy = TimeoutPolicy.fromJson(reader); - } else if ("httpRetryPolicy".equals(fieldName)) { - deserializedAppResiliencyProperties.httpRetryPolicy = HttpRetryPolicy.fromJson(reader); - } else if ("tcpRetryPolicy".equals(fieldName)) { - deserializedAppResiliencyProperties.tcpRetryPolicy = TcpRetryPolicy.fromJson(reader); - } else if ("circuitBreakerPolicy".equals(fieldName)) { - deserializedAppResiliencyProperties.circuitBreakerPolicy = CircuitBreakerPolicy.fromJson(reader); - } else if ("httpConnectionPool".equals(fieldName)) { - deserializedAppResiliencyProperties.httpConnectionPool = HttpConnectionPool.fromJson(reader); - } else if ("tcpConnectionPool".equals(fieldName)) { - deserializedAppResiliencyProperties.tcpConnectionPool = TcpConnectionPool.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAppResiliencyProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigInner.java deleted file mode 100644 index 5272539ad16f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigInner.java +++ /dev/null @@ -1,310 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import com.azure.resourcemanager.appcontainers.models.EncryptionSettings; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.IdentityProviders; -import com.azure.resourcemanager.appcontainers.models.Login; -import java.io.IOException; - -/** - * Configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. - */ -@Fluent -public final class AuthConfigInner extends ProxyResource { - /* - * AuthConfig resource specific properties - */ - private AuthConfigProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of AuthConfigInner class. - */ - public AuthConfigInner() { - } - - /** - * Get the innerProperties property: AuthConfig resource specific properties. - * - * @return the innerProperties value. - */ - private AuthConfigProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the platform property: The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization. - * - * @return the platform value. - */ - public AuthPlatform platform() { - return this.innerProperties() == null ? null : this.innerProperties().platform(); - } - - /** - * Set the platform property: The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization. - * - * @param platform the platform value to set. - * @return the AuthConfigInner object itself. - */ - public AuthConfigInner withPlatform(AuthPlatform platform) { - if (this.innerProperties() == null) { - this.innerProperties = new AuthConfigProperties(); - } - this.innerProperties().withPlatform(platform); - return this; - } - - /** - * Get the globalValidation property: The configuration settings that determines the validation flow of users using - * Service Authentication/Authorization. - * - * @return the globalValidation value. - */ - public GlobalValidation globalValidation() { - return this.innerProperties() == null ? null : this.innerProperties().globalValidation(); - } - - /** - * Set the globalValidation property: The configuration settings that determines the validation flow of users using - * Service Authentication/Authorization. - * - * @param globalValidation the globalValidation value to set. - * @return the AuthConfigInner object itself. - */ - public AuthConfigInner withGlobalValidation(GlobalValidation globalValidation) { - if (this.innerProperties() == null) { - this.innerProperties = new AuthConfigProperties(); - } - this.innerProperties().withGlobalValidation(globalValidation); - return this; - } - - /** - * Get the identityProviders property: The configuration settings of each of the identity providers used to - * configure ContainerApp Service Authentication/Authorization. - * - * @return the identityProviders value. - */ - public IdentityProviders identityProviders() { - return this.innerProperties() == null ? null : this.innerProperties().identityProviders(); - } - - /** - * Set the identityProviders property: The configuration settings of each of the identity providers used to - * configure ContainerApp Service Authentication/Authorization. - * - * @param identityProviders the identityProviders value to set. - * @return the AuthConfigInner object itself. - */ - public AuthConfigInner withIdentityProviders(IdentityProviders identityProviders) { - if (this.innerProperties() == null) { - this.innerProperties = new AuthConfigProperties(); - } - this.innerProperties().withIdentityProviders(identityProviders); - return this; - } - - /** - * Get the login property: The configuration settings of the login flow of users using ContainerApp Service - * Authentication/Authorization. - * - * @return the login value. - */ - public Login login() { - return this.innerProperties() == null ? null : this.innerProperties().login(); - } - - /** - * Set the login property: The configuration settings of the login flow of users using ContainerApp Service - * Authentication/Authorization. - * - * @param login the login value to set. - * @return the AuthConfigInner object itself. - */ - public AuthConfigInner withLogin(Login login) { - if (this.innerProperties() == null) { - this.innerProperties = new AuthConfigProperties(); - } - this.innerProperties().withLogin(login); - return this; - } - - /** - * Get the httpSettings property: The configuration settings of the HTTP requests for authentication and - * authorization requests made against ContainerApp Service Authentication/Authorization. - * - * @return the httpSettings value. - */ - public HttpSettings httpSettings() { - return this.innerProperties() == null ? null : this.innerProperties().httpSettings(); - } - - /** - * Set the httpSettings property: The configuration settings of the HTTP requests for authentication and - * authorization requests made against ContainerApp Service Authentication/Authorization. - * - * @param httpSettings the httpSettings value to set. - * @return the AuthConfigInner object itself. - */ - public AuthConfigInner withHttpSettings(HttpSettings httpSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new AuthConfigProperties(); - } - this.innerProperties().withHttpSettings(httpSettings); - return this; - } - - /** - * Get the encryptionSettings property: The configuration settings of the secrets references of encryption key and - * signing key for ContainerApp Service Authentication/Authorization. - * - * @return the encryptionSettings value. - */ - public EncryptionSettings encryptionSettings() { - return this.innerProperties() == null ? null : this.innerProperties().encryptionSettings(); - } - - /** - * Set the encryptionSettings property: The configuration settings of the secrets references of encryption key and - * signing key for ContainerApp Service Authentication/Authorization. - * - * @param encryptionSettings the encryptionSettings value to set. - * @return the AuthConfigInner object itself. - */ - public AuthConfigInner withEncryptionSettings(EncryptionSettings encryptionSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new AuthConfigProperties(); - } - this.innerProperties().withEncryptionSettings(encryptionSettings); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AuthConfigInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AuthConfigInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AuthConfigInner. - */ - public static AuthConfigInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AuthConfigInner deserializedAuthConfigInner = new AuthConfigInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedAuthConfigInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedAuthConfigInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedAuthConfigInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedAuthConfigInner.innerProperties = AuthConfigProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedAuthConfigInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAuthConfigInner; - }); - } -} 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 deleted file mode 100644 index 8cf1dcb0353c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigProperties.java +++ /dev/null @@ -1,273 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import com.azure.resourcemanager.appcontainers.models.EncryptionSettings; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.IdentityProviders; -import com.azure.resourcemanager.appcontainers.models.Login; -import java.io.IOException; - -/** - * AuthConfig resource specific properties. - */ -@Fluent -public final class AuthConfigProperties implements JsonSerializable { - /* - * The configuration settings of the platform of ContainerApp Service Authentication/Authorization. - */ - private AuthPlatform platform; - - /* - * The configuration settings that determines the validation flow of users using Service - * Authentication/Authorization. - */ - private GlobalValidation globalValidation; - - /* - * The configuration settings of each of the identity providers used to configure ContainerApp Service - * Authentication/Authorization. - */ - private IdentityProviders identityProviders; - - /* - * The configuration settings of the login flow of users using ContainerApp Service Authentication/Authorization. - */ - private Login login; - - /* - * The configuration settings of the HTTP requests for authentication and authorization requests made against - * ContainerApp Service Authentication/Authorization. - */ - private HttpSettings httpSettings; - - /* - * The configuration settings of the secrets references of encryption key and signing key for ContainerApp Service - * Authentication/Authorization. - */ - private EncryptionSettings encryptionSettings; - - /** - * Creates an instance of AuthConfigProperties class. - */ - public AuthConfigProperties() { - } - - /** - * Get the platform property: The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization. - * - * @return the platform value. - */ - public AuthPlatform platform() { - return this.platform; - } - - /** - * Set the platform property: The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization. - * - * @param platform the platform value to set. - * @return the AuthConfigProperties object itself. - */ - public AuthConfigProperties withPlatform(AuthPlatform platform) { - this.platform = platform; - return this; - } - - /** - * Get the globalValidation property: The configuration settings that determines the validation flow of users using - * Service Authentication/Authorization. - * - * @return the globalValidation value. - */ - public GlobalValidation globalValidation() { - return this.globalValidation; - } - - /** - * Set the globalValidation property: The configuration settings that determines the validation flow of users using - * Service Authentication/Authorization. - * - * @param globalValidation the globalValidation value to set. - * @return the AuthConfigProperties object itself. - */ - public AuthConfigProperties withGlobalValidation(GlobalValidation globalValidation) { - this.globalValidation = globalValidation; - return this; - } - - /** - * Get the identityProviders property: The configuration settings of each of the identity providers used to - * configure ContainerApp Service Authentication/Authorization. - * - * @return the identityProviders value. - */ - public IdentityProviders identityProviders() { - return this.identityProviders; - } - - /** - * Set the identityProviders property: The configuration settings of each of the identity providers used to - * configure ContainerApp Service Authentication/Authorization. - * - * @param identityProviders the identityProviders value to set. - * @return the AuthConfigProperties object itself. - */ - public AuthConfigProperties withIdentityProviders(IdentityProviders identityProviders) { - this.identityProviders = identityProviders; - return this; - } - - /** - * Get the login property: The configuration settings of the login flow of users using ContainerApp Service - * Authentication/Authorization. - * - * @return the login value. - */ - public Login login() { - return this.login; - } - - /** - * Set the login property: The configuration settings of the login flow of users using ContainerApp Service - * Authentication/Authorization. - * - * @param login the login value to set. - * @return the AuthConfigProperties object itself. - */ - public AuthConfigProperties withLogin(Login login) { - this.login = login; - return this; - } - - /** - * Get the httpSettings property: The configuration settings of the HTTP requests for authentication and - * authorization requests made against ContainerApp Service Authentication/Authorization. - * - * @return the httpSettings value. - */ - public HttpSettings httpSettings() { - return this.httpSettings; - } - - /** - * Set the httpSettings property: The configuration settings of the HTTP requests for authentication and - * authorization requests made against ContainerApp Service Authentication/Authorization. - * - * @param httpSettings the httpSettings value to set. - * @return the AuthConfigProperties object itself. - */ - public AuthConfigProperties withHttpSettings(HttpSettings httpSettings) { - this.httpSettings = httpSettings; - return this; - } - - /** - * Get the encryptionSettings property: The configuration settings of the secrets references of encryption key and - * signing key for ContainerApp Service Authentication/Authorization. - * - * @return the encryptionSettings value. - */ - public EncryptionSettings encryptionSettings() { - return this.encryptionSettings; - } - - /** - * Set the encryptionSettings property: The configuration settings of the secrets references of encryption key and - * signing key for ContainerApp Service Authentication/Authorization. - * - * @param encryptionSettings the encryptionSettings value to set. - * @return the AuthConfigProperties object itself. - */ - public AuthConfigProperties withEncryptionSettings(EncryptionSettings encryptionSettings) { - this.encryptionSettings = encryptionSettings; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (platform() != null) { - platform().validate(); - } - if (globalValidation() != null) { - globalValidation().validate(); - } - if (identityProviders() != null) { - identityProviders().validate(); - } - if (login() != null) { - login().validate(); - } - if (httpSettings() != null) { - httpSettings().validate(); - } - if (encryptionSettings() != null) { - encryptionSettings().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("platform", this.platform); - jsonWriter.writeJsonField("globalValidation", this.globalValidation); - jsonWriter.writeJsonField("identityProviders", this.identityProviders); - jsonWriter.writeJsonField("login", this.login); - jsonWriter.writeJsonField("httpSettings", this.httpSettings); - jsonWriter.writeJsonField("encryptionSettings", this.encryptionSettings); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AuthConfigProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AuthConfigProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the AuthConfigProperties. - */ - public static AuthConfigProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AuthConfigProperties deserializedAuthConfigProperties = new AuthConfigProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("platform".equals(fieldName)) { - deserializedAuthConfigProperties.platform = AuthPlatform.fromJson(reader); - } else if ("globalValidation".equals(fieldName)) { - deserializedAuthConfigProperties.globalValidation = GlobalValidation.fromJson(reader); - } else if ("identityProviders".equals(fieldName)) { - deserializedAuthConfigProperties.identityProviders = IdentityProviders.fromJson(reader); - } else if ("login".equals(fieldName)) { - deserializedAuthConfigProperties.login = Login.fromJson(reader); - } else if ("httpSettings".equals(fieldName)) { - deserializedAuthConfigProperties.httpSettings = HttpSettings.fromJson(reader); - } else if ("encryptionSettings".equals(fieldName)) { - deserializedAuthConfigProperties.encryptionSettings = EncryptionSettings.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAuthConfigProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AvailableWorkloadProfileInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AvailableWorkloadProfileInner.java deleted file mode 100644 index 4b7558ab82a2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AvailableWorkloadProfileInner.java +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import java.io.IOException; - -/** - * A workload profile with specific hardware configure to run container apps. - */ -@Fluent -public final class AvailableWorkloadProfileInner extends ProxyResource { - /* - * Region of the workload profile. - */ - private String location; - - /* - * Revision resource specific properties - */ - private AvailableWorkloadProfileProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of AvailableWorkloadProfileInner class. - */ - public AvailableWorkloadProfileInner() { - } - - /** - * Get the location property: Region of the workload profile. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Region of the workload profile. - * - * @param location the location value to set. - * @return the AvailableWorkloadProfileInner object itself. - */ - public AvailableWorkloadProfileInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the properties property: Revision resource specific properties. - * - * @return the properties value. - */ - public AvailableWorkloadProfileProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Revision resource specific properties. - * - * @param properties the properties value to set. - * @return the AvailableWorkloadProfileInner object itself. - */ - public AvailableWorkloadProfileInner withProperties(AvailableWorkloadProfileProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", this.location); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AvailableWorkloadProfileInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AvailableWorkloadProfileInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AvailableWorkloadProfileInner. - */ - public static AvailableWorkloadProfileInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AvailableWorkloadProfileInner deserializedAvailableWorkloadProfileInner - = new AvailableWorkloadProfileInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedAvailableWorkloadProfileInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedAvailableWorkloadProfileInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedAvailableWorkloadProfileInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedAvailableWorkloadProfileInner.location = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedAvailableWorkloadProfileInner.properties - = AvailableWorkloadProfileProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedAvailableWorkloadProfileInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAvailableWorkloadProfileInner; - }); - } -} 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 deleted file mode 100644 index b6befebdd3fa..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BillingMeterCollectionInner.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.BillingMeter; -import java.io.IOException; -import java.util.List; - -/** - * Collection of billing meters. - */ -@Fluent -public final class BillingMeterCollectionInner implements JsonSerializable { - /* - * Collection of billing meters. - */ - private List value; - - /** - * Creates an instance of BillingMeterCollectionInner class. - */ - public BillingMeterCollectionInner() { - } - - /** - * Get the value property: Collection of billing meters. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of billing meters. - * - * @param value the value value to set. - * @return the BillingMeterCollectionInner object itself. - */ - public BillingMeterCollectionInner withValue(List value) { - this.value = value; - 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 BillingMeterCollectionInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BillingMeterCollectionInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BillingMeterCollectionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BillingMeterCollectionInner if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BillingMeterCollectionInner. - */ - public static BillingMeterCollectionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BillingMeterCollectionInner deserializedBillingMeterCollectionInner = new BillingMeterCollectionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> BillingMeter.fromJson(reader1)); - deserializedBillingMeterCollectionInner.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedBillingMeterCollectionInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildProperties.java deleted file mode 100644 index 64c39b9e155d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildProperties.java +++ /dev/null @@ -1,215 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.BuildConfiguration; -import com.azure.resourcemanager.appcontainers.models.BuildProvisioningState; -import com.azure.resourcemanager.appcontainers.models.BuildStatus; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; -import java.io.IOException; - -/** - * The build properties. - */ -@Fluent -public final class BuildProperties implements JsonSerializable { - /* - * Build provisioning state. - */ - private BuildProvisioningState provisioningState; - - /* - * Status of the build once it has been provisioned. - */ - private BuildStatus buildStatus; - - /* - * Container registry that the final image will be uploaded to. - */ - private ContainerRegistryWithCustomImage destinationContainerRegistry; - - /* - * Configuration of the build. - */ - private BuildConfiguration configuration; - - /* - * Endpoint to which the source code should be uploaded. - */ - private String uploadEndpoint; - - /* - * Endpoint from which the build logs can be streamed. - */ - private String logStreamEndpoint; - - /* - * Endpoint to use to retrieve an authentication token for log streaming and uploading source code. - */ - private String tokenEndpoint; - - /** - * Creates an instance of BuildProperties class. - */ - public BuildProperties() { - } - - /** - * Get the provisioningState property: Build provisioning state. - * - * @return the provisioningState value. - */ - public BuildProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the buildStatus property: Status of the build once it has been provisioned. - * - * @return the buildStatus value. - */ - public BuildStatus buildStatus() { - return this.buildStatus; - } - - /** - * Get the destinationContainerRegistry property: Container registry that the final image will be uploaded to. - * - * @return the destinationContainerRegistry value. - */ - public ContainerRegistryWithCustomImage destinationContainerRegistry() { - return this.destinationContainerRegistry; - } - - /** - * Set the destinationContainerRegistry property: Container registry that the final image will be uploaded to. - * - * @param destinationContainerRegistry the destinationContainerRegistry value to set. - * @return the BuildProperties object itself. - */ - public BuildProperties - withDestinationContainerRegistry(ContainerRegistryWithCustomImage destinationContainerRegistry) { - this.destinationContainerRegistry = destinationContainerRegistry; - return this; - } - - /** - * Get the configuration property: Configuration of the build. - * - * @return the configuration value. - */ - public BuildConfiguration configuration() { - return this.configuration; - } - - /** - * Set the configuration property: Configuration of the build. - * - * @param configuration the configuration value to set. - * @return the BuildProperties object itself. - */ - public BuildProperties withConfiguration(BuildConfiguration configuration) { - this.configuration = configuration; - return this; - } - - /** - * Get the uploadEndpoint property: Endpoint to which the source code should be uploaded. - * - * @return the uploadEndpoint value. - */ - public String uploadEndpoint() { - return this.uploadEndpoint; - } - - /** - * Get the logStreamEndpoint property: Endpoint from which the build logs can be streamed. - * - * @return the logStreamEndpoint value. - */ - public String logStreamEndpoint() { - return this.logStreamEndpoint; - } - - /** - * Get the tokenEndpoint property: Endpoint to use to retrieve an authentication token for log streaming and - * uploading source code. - * - * @return the tokenEndpoint value. - */ - public String tokenEndpoint() { - return this.tokenEndpoint; - } - - /** - * 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(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("destinationContainerRegistry", this.destinationContainerRegistry); - jsonWriter.writeJsonField("configuration", this.configuration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BuildProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuildProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the BuildProperties. - */ - public static BuildProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuildProperties deserializedBuildProperties = new BuildProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedBuildProperties.provisioningState - = BuildProvisioningState.fromString(reader.getString()); - } else if ("buildStatus".equals(fieldName)) { - deserializedBuildProperties.buildStatus = BuildStatus.fromString(reader.getString()); - } else if ("destinationContainerRegistry".equals(fieldName)) { - deserializedBuildProperties.destinationContainerRegistry - = ContainerRegistryWithCustomImage.fromJson(reader); - } else if ("configuration".equals(fieldName)) { - deserializedBuildProperties.configuration = BuildConfiguration.fromJson(reader); - } else if ("uploadEndpoint".equals(fieldName)) { - deserializedBuildProperties.uploadEndpoint = reader.getString(); - } else if ("logStreamEndpoint".equals(fieldName)) { - deserializedBuildProperties.logStreamEndpoint = reader.getString(); - } else if ("tokenEndpoint".equals(fieldName)) { - deserializedBuildProperties.tokenEndpoint = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBuildProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildResourceInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildResourceInner.java deleted file mode 100644 index 6bbc11f9856b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildResourceInner.java +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.BuildConfiguration; -import com.azure.resourcemanager.appcontainers.models.BuildProvisioningState; -import com.azure.resourcemanager.appcontainers.models.BuildStatus; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; -import java.io.IOException; - -/** - * Information pertaining to an individual build. - */ -@Fluent -public final class BuildResourceInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private BuildProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of BuildResourceInner class. - */ - public BuildResourceInner() { - } - - /** - * Get the innerProperties property: The resource-specific properties for this resource. - * - * @return the innerProperties value. - */ - private BuildProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the provisioningState property: Build provisioning state. - * - * @return the provisioningState value. - */ - public BuildProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the buildStatus property: Status of the build once it has been provisioned. - * - * @return the buildStatus value. - */ - public BuildStatus buildStatus() { - return this.innerProperties() == null ? null : this.innerProperties().buildStatus(); - } - - /** - * Get the destinationContainerRegistry property: Container registry that the final image will be uploaded to. - * - * @return the destinationContainerRegistry value. - */ - public ContainerRegistryWithCustomImage destinationContainerRegistry() { - return this.innerProperties() == null ? null : this.innerProperties().destinationContainerRegistry(); - } - - /** - * Set the destinationContainerRegistry property: Container registry that the final image will be uploaded to. - * - * @param destinationContainerRegistry the destinationContainerRegistry value to set. - * @return the BuildResourceInner object itself. - */ - public BuildResourceInner - withDestinationContainerRegistry(ContainerRegistryWithCustomImage destinationContainerRegistry) { - if (this.innerProperties() == null) { - this.innerProperties = new BuildProperties(); - } - this.innerProperties().withDestinationContainerRegistry(destinationContainerRegistry); - return this; - } - - /** - * Get the configuration property: Configuration of the build. - * - * @return the configuration value. - */ - public BuildConfiguration configuration() { - return this.innerProperties() == null ? null : this.innerProperties().configuration(); - } - - /** - * Set the configuration property: Configuration of the build. - * - * @param configuration the configuration value to set. - * @return the BuildResourceInner object itself. - */ - public BuildResourceInner withConfiguration(BuildConfiguration configuration) { - if (this.innerProperties() == null) { - this.innerProperties = new BuildProperties(); - } - this.innerProperties().withConfiguration(configuration); - return this; - } - - /** - * Get the uploadEndpoint property: Endpoint to which the source code should be uploaded. - * - * @return the uploadEndpoint value. - */ - public String uploadEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().uploadEndpoint(); - } - - /** - * 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(); - } - - /** - * Get the tokenEndpoint property: Endpoint to use to retrieve an authentication token for log streaming and - * uploading source code. - * - * @return the tokenEndpoint value. - */ - public String tokenEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().tokenEndpoint(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BuildResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuildResourceInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BuildResourceInner. - */ - public static BuildResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuildResourceInner deserializedBuildResourceInner = new BuildResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedBuildResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedBuildResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedBuildResourceInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedBuildResourceInner.innerProperties = BuildProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedBuildResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBuildResourceInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildTokenInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildTokenInner.java deleted file mode 100644 index d3488fefeb98..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildTokenInner.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (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.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Build Auth Token. - */ -@Immutable -public final class BuildTokenInner implements JsonSerializable { - /* - * Authentication token. - */ - private String token; - - /* - * Token expiration date. - */ - private OffsetDateTime expires; - - /** - * Creates an instance of BuildTokenInner class. - */ - public BuildTokenInner() { - } - - /** - * Get the token property: Authentication token. - * - * @return the token value. - */ - public String token() { - return this.token; - } - - /** - * Get the expires property: Token expiration date. - * - * @return the expires value. - */ - public OffsetDateTime expires() { - return this.expires; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BuildTokenInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuildTokenInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the BuildTokenInner. - */ - public static BuildTokenInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuildTokenInner deserializedBuildTokenInner = new BuildTokenInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("token".equals(fieldName)) { - deserializedBuildTokenInner.token = reader.getString(); - } else if ("expires".equals(fieldName)) { - deserializedBuildTokenInner.expires = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedBuildTokenInner; - }); - } -} 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 deleted file mode 100644 index b1e954cd7a76..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderProperties.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.BuilderProvisioningState; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import java.io.IOException; -import java.util.List; - -/** - * The builder properties. - */ -@Fluent -public final class BuilderProperties implements JsonSerializable { - /* - * Provisioning state of a builder resource. - */ - private BuilderProvisioningState provisioningState; - - /* - * Resource ID of the container apps environment that the builder is associated with. - */ - private String environmentId; - - /* - * List of mappings of container registries and the managed identity used to connect to it. - */ - private List containerRegistries; - - /** - * Creates an instance of BuilderProperties class. - */ - public BuilderProperties() { - } - - /** - * Get the provisioningState property: Provisioning state of a builder resource. - * - * @return the provisioningState value. - */ - public BuilderProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the environmentId property: Resource ID of the container apps environment that the builder is associated - * with. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.environmentId; - } - - /** - * Set the environmentId property: Resource ID of the container apps environment that the builder is associated - * with. - * - * @param environmentId the environmentId value to set. - * @return the BuilderProperties object itself. - */ - public BuilderProperties withEnvironmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Get the containerRegistries property: List of mappings of container registries and the managed identity used to - * connect to it. - * - * @return the containerRegistries value. - */ - public List containerRegistries() { - return this.containerRegistries; - } - - /** - * Set the containerRegistries property: List of mappings of container registries and the managed identity used to - * connect to it. - * - * @param containerRegistries the containerRegistries value to set. - * @return the BuilderProperties object itself. - */ - public BuilderProperties withContainerRegistries(List containerRegistries) { - this.containerRegistries = containerRegistries; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (environmentId() == null) { - throw LOGGER.atError() - .log( - new IllegalArgumentException("Missing required property environmentId in model BuilderProperties")); - } - if (containerRegistries() != null) { - containerRegistries().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BuilderProperties.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("environmentId", this.environmentId); - jsonWriter.writeArrayField("containerRegistries", this.containerRegistries, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BuilderProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuilderProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BuilderProperties. - */ - public static BuilderProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuilderProperties deserializedBuilderProperties = new BuilderProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("environmentId".equals(fieldName)) { - deserializedBuilderProperties.environmentId = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedBuilderProperties.provisioningState - = BuilderProvisioningState.fromString(reader.getString()); - } else if ("containerRegistries".equals(fieldName)) { - List containerRegistries - = reader.readArray(reader1 -> ContainerRegistry.fromJson(reader1)); - deserializedBuilderProperties.containerRegistries = containerRegistries; - } else { - reader.skipChildren(); - } - } - - return deserializedBuilderProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceInner.java deleted file mode 100644 index 0ec2b3c5853e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceInner.java +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.BuilderProvisioningState; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Information about the SourceToCloud builder resource. - */ -@Fluent -public final class BuilderResourceInner extends Resource { - /* - * The resource-specific properties for this resource. - */ - private BuilderProperties innerProperties; - - /* - * The managed service identities assigned to this resource. - */ - private ManagedServiceIdentity identity; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of BuilderResourceInner class. - */ - public BuilderResourceInner() { - } - - /** - * Get the innerProperties property: The resource-specific properties for this resource. - * - * @return the innerProperties value. - */ - private BuilderProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The managed service identities assigned to this resource. - * - * @param identity the identity value to set. - * @return the BuilderResourceInner object itself. - */ - public BuilderResourceInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public BuilderResourceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public BuilderResourceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the provisioningState property: Provisioning state of a builder resource. - * - * @return the provisioningState value. - */ - public BuilderProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the environmentId property: Resource ID of the container apps environment that the builder is associated - * with. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.innerProperties() == null ? null : this.innerProperties().environmentId(); - } - - /** - * Set the environmentId property: Resource ID of the container apps environment that the builder is associated - * with. - * - * @param environmentId the environmentId value to set. - * @return the BuilderResourceInner object itself. - */ - public BuilderResourceInner withEnvironmentId(String environmentId) { - if (this.innerProperties() == null) { - this.innerProperties = new BuilderProperties(); - } - this.innerProperties().withEnvironmentId(environmentId); - return this; - } - - /** - * Get the containerRegistries property: List of mappings of container registries and the managed identity used to - * connect to it. - * - * @return the containerRegistries value. - */ - public List containerRegistries() { - return this.innerProperties() == null ? null : this.innerProperties().containerRegistries(); - } - - /** - * Set the containerRegistries property: List of mappings of container registries and the managed identity used to - * connect to it. - * - * @param containerRegistries the containerRegistries value to set. - * @return the BuilderResourceInner object itself. - */ - public BuilderResourceInner withContainerRegistries(List containerRegistries) { - if (this.innerProperties() == null) { - this.innerProperties = new BuilderProperties(); - } - this.innerProperties().withContainerRegistries(containerRegistries); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - if (identity() != null) { - identity().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - jsonWriter.writeJsonField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BuilderResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuilderResourceInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BuilderResourceInner. - */ - public static BuilderResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuilderResourceInner deserializedBuilderResourceInner = new BuilderResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedBuilderResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedBuilderResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedBuilderResourceInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedBuilderResourceInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedBuilderResourceInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedBuilderResourceInner.innerProperties = BuilderProperties.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedBuilderResourceInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedBuilderResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBuilderResourceInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceUpdateProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceUpdateProperties.java deleted file mode 100644 index 6e9a2c27bee2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceUpdateProperties.java +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The updatable properties of the BuilderResource. - */ -@Fluent -public final class BuilderResourceUpdateProperties implements JsonSerializable { - /* - * Resource ID of the container apps environment that the builder is associated with. - */ - private String environmentId; - - /** - * Creates an instance of BuilderResourceUpdateProperties class. - */ - public BuilderResourceUpdateProperties() { - } - - /** - * Get the environmentId property: Resource ID of the container apps environment that the builder is associated - * with. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.environmentId; - } - - /** - * Set the environmentId property: Resource ID of the container apps environment that the builder is associated - * with. - * - * @param environmentId the environmentId value to set. - * @return the BuilderResourceUpdateProperties object itself. - */ - public BuilderResourceUpdateProperties withEnvironmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("environmentId", this.environmentId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BuilderResourceUpdateProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuilderResourceUpdateProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the BuilderResourceUpdateProperties. - */ - public static BuilderResourceUpdateProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuilderResourceUpdateProperties deserializedBuilderResourceUpdateProperties - = new BuilderResourceUpdateProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("environmentId".equals(fieldName)) { - deserializedBuilderResourceUpdateProperties.environmentId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBuilderResourceUpdateProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CertificateInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CertificateInner.java deleted file mode 100644 index 7d3c6768dd29..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CertificateInner.java +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.CertificateProperties; -import java.io.IOException; -import java.util.Map; - -/** - * Certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ -@Fluent -public final class CertificateInner extends Resource { - /* - * Certificate resource specific properties - */ - private CertificateProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of CertificateInner class. - */ - public CertificateInner() { - } - - /** - * Get the properties property: Certificate resource specific properties. - * - * @return the properties value. - */ - public CertificateProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Certificate resource specific properties. - * - * @param properties the properties value to set. - * @return the CertificateInner object itself. - */ - public CertificateInner withProperties(CertificateProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public CertificateInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public CertificateInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CertificateInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CertificateInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CertificateInner. - */ - public static CertificateInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CertificateInner deserializedCertificateInner = new CertificateInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedCertificateInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedCertificateInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedCertificateInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedCertificateInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedCertificateInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedCertificateInner.properties = CertificateProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedCertificateInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCertificateInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CheckNameAvailabilityResponseInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CheckNameAvailabilityResponseInner.java deleted file mode 100644 index 56fc0492ebf6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CheckNameAvailabilityResponseInner.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; -import java.io.IOException; - -/** - * The check availability result. - */ -@Fluent -public final class CheckNameAvailabilityResponseInner implements JsonSerializable { - /* - * Indicates if the resource name is available. - */ - private Boolean nameAvailable; - - /* - * The reason why the given name is not available. - */ - private CheckNameAvailabilityReason reason; - - /* - * Detailed reason why the given name is available. - */ - private String message; - - /** - * Creates an instance of CheckNameAvailabilityResponseInner class. - */ - public CheckNameAvailabilityResponseInner() { - } - - /** - * Get the nameAvailable property: Indicates if the resource name is available. - * - * @return the nameAvailable value. - */ - public Boolean nameAvailable() { - return this.nameAvailable; - } - - /** - * Set the nameAvailable property: Indicates if the resource name is available. - * - * @param nameAvailable the nameAvailable value to set. - * @return the CheckNameAvailabilityResponseInner object itself. - */ - public CheckNameAvailabilityResponseInner withNameAvailable(Boolean nameAvailable) { - this.nameAvailable = nameAvailable; - return this; - } - - /** - * Get the reason property: The reason why the given name is not available. - * - * @return the reason value. - */ - public CheckNameAvailabilityReason reason() { - return this.reason; - } - - /** - * Set the reason property: The reason why the given name is not available. - * - * @param reason the reason value to set. - * @return the CheckNameAvailabilityResponseInner object itself. - */ - public CheckNameAvailabilityResponseInner withReason(CheckNameAvailabilityReason reason) { - this.reason = reason; - return this; - } - - /** - * Get the message property: Detailed reason why the given name is available. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: Detailed reason why the given name is available. - * - * @param message the message value to set. - * @return the CheckNameAvailabilityResponseInner object itself. - */ - public CheckNameAvailabilityResponseInner withMessage(String message) { - this.message = message; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("nameAvailable", this.nameAvailable); - jsonWriter.writeStringField("reason", this.reason == null ? null : this.reason.toString()); - jsonWriter.writeStringField("message", this.message); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CheckNameAvailabilityResponseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CheckNameAvailabilityResponseInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CheckNameAvailabilityResponseInner. - */ - public static CheckNameAvailabilityResponseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CheckNameAvailabilityResponseInner deserializedCheckNameAvailabilityResponseInner - = new CheckNameAvailabilityResponseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nameAvailable".equals(fieldName)) { - deserializedCheckNameAvailabilityResponseInner.nameAvailable - = reader.getNullable(JsonReader::getBoolean); - } else if ("reason".equals(fieldName)) { - deserializedCheckNameAvailabilityResponseInner.reason - = CheckNameAvailabilityReason.fromString(reader.getString()); - } else if ("message".equals(fieldName)) { - deserializedCheckNameAvailabilityResponseInner.message = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCheckNameAvailabilityResponseInner; - }); - } -} 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 deleted file mode 100644 index df547fc71373..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentInner.java +++ /dev/null @@ -1,314 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import java.io.IOException; -import java.util.Map; - -/** - * An environment for Kubernetes cluster specialized for web workloads by Azure App Service. - */ -@Fluent -public final class ConnectedEnvironmentInner extends Resource { - /* - * The complex type of the extended location. - */ - private ExtendedLocation extendedLocation; - - /* - * ConnectedEnvironment resource specific properties - */ - private ConnectedEnvironmentProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ConnectedEnvironmentInner class. - */ - public ConnectedEnvironmentInner() { - } - - /** - * Get the extendedLocation property: The complex type of the extended location. - * - * @return the extendedLocation value. - */ - public ExtendedLocation extendedLocation() { - return this.extendedLocation; - } - - /** - * Set the extendedLocation property: The complex type of the extended location. - * - * @param extendedLocation the extendedLocation value to set. - * @return the ConnectedEnvironmentInner object itself. - */ - public ConnectedEnvironmentInner withExtendedLocation(ExtendedLocation extendedLocation) { - this.extendedLocation = extendedLocation; - return this; - } - - /** - * Get the innerProperties property: ConnectedEnvironment resource specific properties. - * - * @return the innerProperties value. - */ - private ConnectedEnvironmentProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public ConnectedEnvironmentInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ConnectedEnvironmentInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the Kubernetes Environment. - * - * @return the provisioningState value. - */ - public ConnectedEnvironmentProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the deploymentErrors property: Any errors that occurred during deployment or deployment validation. - * - * @return the deploymentErrors value. - */ - public String deploymentErrors() { - return this.innerProperties() == null ? null : this.innerProperties().deploymentErrors(); - } - - /** - * Get the defaultDomain property: Default Domain Name for the cluster. - * - * @return the defaultDomain value. - */ - public String defaultDomain() { - return this.innerProperties() == null ? null : this.innerProperties().defaultDomain(); - } - - /** - * Get the staticIp property: Static IP of the connectedEnvironment. - * - * @return the staticIp value. - */ - public String staticIp() { - return this.innerProperties() == null ? null : this.innerProperties().staticIp(); - } - - /** - * Set the staticIp property: Static IP of the connectedEnvironment. - * - * @param staticIp the staticIp value to set. - * @return the ConnectedEnvironmentInner object itself. - */ - public ConnectedEnvironmentInner withStaticIp(String staticIp) { - if (this.innerProperties() == null) { - this.innerProperties = new ConnectedEnvironmentProperties(); - } - this.innerProperties().withStaticIp(staticIp); - return this; - } - - /** - * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * - * @return the daprAIConnectionString value. - */ - public String daprAIConnectionString() { - return this.innerProperties() == null ? null : this.innerProperties().daprAIConnectionString(); - } - - /** - * 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. - */ - public ConnectedEnvironmentInner withDaprAIConnectionString(String daprAIConnectionString) { - if (this.innerProperties() == null) { - this.innerProperties = new ConnectedEnvironmentProperties(); - } - this.innerProperties().withDaprAIConnectionString(daprAIConnectionString); - return this; - } - - /** - * Get the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @return the customDomainConfiguration value. - */ - public CustomDomainConfiguration customDomainConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().customDomainConfiguration(); - } - - /** - * Set the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @param customDomainConfiguration the customDomainConfiguration value to set. - * @return the ConnectedEnvironmentInner object itself. - */ - public ConnectedEnvironmentInner - withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new ConnectedEnvironmentProperties(); - } - this.innerProperties().withCustomDomainConfiguration(customDomainConfiguration); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (extendedLocation() != null) { - extendedLocation().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConnectedEnvironmentInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConnectedEnvironmentInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ConnectedEnvironmentInner. - */ - public static ConnectedEnvironmentInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConnectedEnvironmentInner deserializedConnectedEnvironmentInner = new ConnectedEnvironmentInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedConnectedEnvironmentInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedConnectedEnvironmentInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedConnectedEnvironmentInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedConnectedEnvironmentInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedConnectedEnvironmentInner.withTags(tags); - } else if ("extendedLocation".equals(fieldName)) { - deserializedConnectedEnvironmentInner.extendedLocation = ExtendedLocation.fromJson(reader); - } else if ("properties".equals(fieldName)) { - deserializedConnectedEnvironmentInner.innerProperties - = ConnectedEnvironmentProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedConnectedEnvironmentInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedConnectedEnvironmentInner; - }); - } -} 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 deleted file mode 100644 index b05be5ed6c4a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentProperties.java +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import java.io.IOException; - -/** - * ConnectedEnvironment resource specific properties. - */ -@Fluent -public final class ConnectedEnvironmentProperties implements JsonSerializable { - /* - * Provisioning state of the Kubernetes Environment. - */ - private ConnectedEnvironmentProvisioningState provisioningState; - - /* - * Any errors that occurred during deployment or deployment validation - */ - private String deploymentErrors; - - /* - * Default Domain Name for the cluster - */ - private String defaultDomain; - - /* - * Static IP of the connectedEnvironment - */ - private String staticIp; - - /* - * Application Insights connection string used by Dapr to export Service to Service communication telemetry - */ - private String daprAIConnectionString; - - /* - * Custom domain configuration for the environment - */ - private CustomDomainConfiguration customDomainConfiguration; - - /** - * Creates an instance of ConnectedEnvironmentProperties class. - */ - public ConnectedEnvironmentProperties() { - } - - /** - * Get the provisioningState property: Provisioning state of the Kubernetes Environment. - * - * @return the provisioningState value. - */ - public ConnectedEnvironmentProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the deploymentErrors property: Any errors that occurred during deployment or deployment validation. - * - * @return the deploymentErrors value. - */ - public String deploymentErrors() { - return this.deploymentErrors; - } - - /** - * Get the defaultDomain property: Default Domain Name for the cluster. - * - * @return the defaultDomain value. - */ - public String defaultDomain() { - return this.defaultDomain; - } - - /** - * Get the staticIp property: Static IP of the connectedEnvironment. - * - * @return the staticIp value. - */ - public String staticIp() { - return this.staticIp; - } - - /** - * Set the staticIp property: Static IP of the connectedEnvironment. - * - * @param staticIp the staticIp value to set. - * @return the ConnectedEnvironmentProperties object itself. - */ - public ConnectedEnvironmentProperties withStaticIp(String staticIp) { - this.staticIp = staticIp; - return this; - } - - /** - * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * - * @return the daprAIConnectionString value. - */ - public String daprAIConnectionString() { - return this.daprAIConnectionString; - } - - /** - * 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. - */ - public ConnectedEnvironmentProperties withDaprAIConnectionString(String daprAIConnectionString) { - this.daprAIConnectionString = daprAIConnectionString; - return this; - } - - /** - * Get the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @return the customDomainConfiguration value. - */ - public CustomDomainConfiguration customDomainConfiguration() { - return this.customDomainConfiguration; - } - - /** - * Set the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @param customDomainConfiguration the customDomainConfiguration value to set. - * @return the ConnectedEnvironmentProperties object itself. - */ - public ConnectedEnvironmentProperties - withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration) { - this.customDomainConfiguration = customDomainConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (customDomainConfiguration() != null) { - customDomainConfiguration().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("staticIp", this.staticIp); - jsonWriter.writeStringField("daprAIConnectionString", this.daprAIConnectionString); - jsonWriter.writeJsonField("customDomainConfiguration", this.customDomainConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConnectedEnvironmentProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConnectedEnvironmentProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ConnectedEnvironmentProperties. - */ - public static ConnectedEnvironmentProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConnectedEnvironmentProperties deserializedConnectedEnvironmentProperties - = new ConnectedEnvironmentProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedConnectedEnvironmentProperties.provisioningState - = ConnectedEnvironmentProvisioningState.fromString(reader.getString()); - } else if ("deploymentErrors".equals(fieldName)) { - deserializedConnectedEnvironmentProperties.deploymentErrors = reader.getString(); - } else if ("defaultDomain".equals(fieldName)) { - deserializedConnectedEnvironmentProperties.defaultDomain = reader.getString(); - } else if ("staticIp".equals(fieldName)) { - deserializedConnectedEnvironmentProperties.staticIp = reader.getString(); - } else if ("daprAIConnectionString".equals(fieldName)) { - deserializedConnectedEnvironmentProperties.daprAIConnectionString = reader.getString(); - } else if ("customDomainConfiguration".equals(fieldName)) { - deserializedConnectedEnvironmentProperties.customDomainConfiguration - = CustomDomainConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedConnectedEnvironmentProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java deleted file mode 100644 index b65ffd691147..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; -import java.io.IOException; - -/** - * Storage resource for connectedEnvironment. - */ -@Fluent -public final class ConnectedEnvironmentStorageInner extends ProxyResource { - /* - * Storage properties - */ - private ConnectedEnvironmentStorageProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ConnectedEnvironmentStorageInner class. - */ - public ConnectedEnvironmentStorageInner() { - } - - /** - * Get the properties property: Storage properties. - * - * @return the properties value. - */ - public ConnectedEnvironmentStorageProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Storage properties. - * - * @param properties the properties value to set. - * @return the ConnectedEnvironmentStorageInner object itself. - */ - public ConnectedEnvironmentStorageInner withProperties(ConnectedEnvironmentStorageProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConnectedEnvironmentStorageInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConnectedEnvironmentStorageInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ConnectedEnvironmentStorageInner. - */ - public static ConnectedEnvironmentStorageInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConnectedEnvironmentStorageInner deserializedConnectedEnvironmentStorageInner - = new ConnectedEnvironmentStorageInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedConnectedEnvironmentStorageInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedConnectedEnvironmentStorageInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedConnectedEnvironmentStorageInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedConnectedEnvironmentStorageInner.properties - = ConnectedEnvironmentStorageProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedConnectedEnvironmentStorageInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedConnectedEnvironmentStorageInner; - }); - } -} 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 deleted file mode 100644 index 167013bff41c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Collection of Storage for Environments. - */ -@Fluent -public final class ConnectedEnvironmentStoragesCollectionInner - implements JsonSerializable { - /* - * Collection of storage resources. - */ - private List value; - - /** - * Creates an instance of ConnectedEnvironmentStoragesCollectionInner class. - */ - public ConnectedEnvironmentStoragesCollectionInner() { - } - - /** - * Get the value property: Collection of storage resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of storage resources. - * - * @param value the value value to set. - * @return the ConnectedEnvironmentStoragesCollectionInner object itself. - */ - public ConnectedEnvironmentStoragesCollectionInner withValue(List value) { - this.value = value; - 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 ConnectedEnvironmentStoragesCollectionInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ConnectedEnvironmentStoragesCollectionInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConnectedEnvironmentStoragesCollectionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConnectedEnvironmentStoragesCollectionInner if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ConnectedEnvironmentStoragesCollectionInner. - */ - public static ConnectedEnvironmentStoragesCollectionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConnectedEnvironmentStoragesCollectionInner deserializedConnectedEnvironmentStoragesCollectionInner - = new ConnectedEnvironmentStoragesCollectionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ConnectedEnvironmentStorageInner.fromJson(reader1)); - deserializedConnectedEnvironmentStoragesCollectionInner.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedConnectedEnvironmentStoragesCollectionInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenInner.java deleted file mode 100644 index 41f852b59300..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenInner.java +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Map; - -/** - * Container App Auth Token. - */ -@Fluent -public final class ContainerAppAuthTokenInner extends Resource { - /* - * Container App auth token resource specific properties - */ - private ContainerAppAuthTokenProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ContainerAppAuthTokenInner class. - */ - public ContainerAppAuthTokenInner() { - } - - /** - * Get the innerProperties property: Container App auth token resource specific properties. - * - * @return the innerProperties value. - */ - private ContainerAppAuthTokenProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public ContainerAppAuthTokenInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ContainerAppAuthTokenInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the token property: Auth token value. - * - * @return the token value. - */ - public String token() { - return this.innerProperties() == null ? null : this.innerProperties().token(); - } - - /** - * Get the expires property: Token expiration date. - * - * @return the expires value. - */ - public OffsetDateTime expires() { - return this.innerProperties() == null ? null : this.innerProperties().expires(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppAuthTokenInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppAuthTokenInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContainerAppAuthTokenInner. - */ - public static ContainerAppAuthTokenInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppAuthTokenInner deserializedContainerAppAuthTokenInner = new ContainerAppAuthTokenInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedContainerAppAuthTokenInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedContainerAppAuthTokenInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedContainerAppAuthTokenInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedContainerAppAuthTokenInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedContainerAppAuthTokenInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedContainerAppAuthTokenInner.innerProperties - = ContainerAppAuthTokenProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedContainerAppAuthTokenInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppAuthTokenInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenProperties.java deleted file mode 100644 index bdd867f58da3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenProperties.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Container App auth token resource specific properties. - */ -@Immutable -public final class ContainerAppAuthTokenProperties implements JsonSerializable { - /* - * Auth token value. - */ - private String token; - - /* - * Token expiration date. - */ - private OffsetDateTime expires; - - /** - * Creates an instance of ContainerAppAuthTokenProperties class. - */ - public ContainerAppAuthTokenProperties() { - } - - /** - * Get the token property: Auth token value. - * - * @return the token value. - */ - public String token() { - return this.token; - } - - /** - * Get the expires property: Token expiration date. - * - * @return the expires value. - */ - public OffsetDateTime expires() { - return this.expires; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppAuthTokenProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppAuthTokenProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ContainerAppAuthTokenProperties. - */ - public static ContainerAppAuthTokenProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppAuthTokenProperties deserializedContainerAppAuthTokenProperties - = new ContainerAppAuthTokenProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("token".equals(fieldName)) { - deserializedContainerAppAuthTokenProperties.token = reader.getString(); - } else if ("expires".equals(fieldName)) { - deserializedContainerAppAuthTokenProperties.expires = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppAuthTokenProperties; - }); - } -} 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 deleted file mode 100644 index 7f2042e11bdf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java +++ /dev/null @@ -1,531 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -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 java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Container App. - */ -@Fluent -public final class ContainerAppInner extends Resource { - /* - * The complex type of the extended location. - */ - private ExtendedLocation extendedLocation; - - /* - * managed identities for the Container App to interact with other Azure services without maintaining any secrets or - * credentials in code. - */ - 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. - */ - 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. - */ - private Kind kind; - - /* - * ContainerApp resource specific properties - */ - private ContainerAppProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ContainerAppInner class. - */ - public ContainerAppInner() { - } - - /** - * Get the extendedLocation property: The complex type of the extended location. - * - * @return the extendedLocation value. - */ - public ExtendedLocation extendedLocation() { - return this.extendedLocation; - } - - /** - * Set the extendedLocation property: The complex type of the extended location. - * - * @param extendedLocation the extendedLocation value to set. - * @return the ContainerAppInner object itself. - */ - public ContainerAppInner withExtendedLocation(ExtendedLocation extendedLocation) { - this.extendedLocation = extendedLocation; - return this; - } - - /** - * 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. - */ - public ManagedServiceIdentity identity() { - return this.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. - * - * @param identity the identity value to set. - * @return the ContainerAppInner object itself. - */ - public ContainerAppInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * 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. - */ - public String managedBy() { - return this.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. - * - * @param managedBy the managedBy value to set. - * @return the ContainerAppInner object itself. - */ - public ContainerAppInner withManagedBy(String managedBy) { - this.managedBy = 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. - * - * @return the innerProperties value. - */ - private ContainerAppProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public ContainerAppInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ContainerAppInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the Container App. - * - * @return the provisioningState value. - */ - public ContainerAppProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the deploymentErrors property: Any errors that occurred during deployment. - * - * @return the deploymentErrors value. - */ - public String deploymentErrors() { - return this.innerProperties() == null ? null : this.innerProperties().deploymentErrors(); - } - - /** - * Get the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment. - * - * @return the managedEnvironmentId value. - */ - public String managedEnvironmentId() { - return this.innerProperties() == null ? null : this.innerProperties().managedEnvironmentId(); - } - - /** - * Set the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment. - * - * @param managedEnvironmentId the managedEnvironmentId value to set. - * @return the ContainerAppInner object itself. - */ - public ContainerAppInner withManagedEnvironmentId(String managedEnvironmentId) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerAppProperties(); - } - this.innerProperties().withManagedEnvironmentId(managedEnvironmentId); - return this; - } - - /** - * Get the environmentId property: Resource ID of environment. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.innerProperties() == null ? null : this.innerProperties().environmentId(); - } - - /** - * Set the environmentId property: Resource ID of environment. - * - * @param environmentId the environmentId value to set. - * @return the ContainerAppInner object itself. - */ - public ContainerAppInner withEnvironmentId(String environmentId) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerAppProperties(); - } - this.innerProperties().withEnvironmentId(environmentId); - return this; - } - - /** - * Get the workloadProfileName property: Workload profile name to pin for container app execution. - * - * @return the workloadProfileName value. - */ - public String workloadProfileName() { - return this.innerProperties() == null ? null : this.innerProperties().workloadProfileName(); - } - - /** - * Set the workloadProfileName property: Workload profile name to pin for container app execution. - * - * @param workloadProfileName the workloadProfileName value to set. - * @return the ContainerAppInner object itself. - */ - public ContainerAppInner withWorkloadProfileName(String workloadProfileName) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerAppProperties(); - } - this.innerProperties().withWorkloadProfileName(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. - * - * @return the latestRevisionName value. - */ - public String latestRevisionName() { - return this.innerProperties() == null ? null : this.innerProperties().latestRevisionName(); - } - - /** - * Get the latestReadyRevisionName property: Name of the latest ready revision of the Container App. - * - * @return the latestReadyRevisionName value. - */ - public String latestReadyRevisionName() { - return this.innerProperties() == null ? null : this.innerProperties().latestReadyRevisionName(); - } - - /** - * Get the latestRevisionFqdn property: Fully Qualified Domain Name of the latest revision of the Container App. - * - * @return the latestRevisionFqdn value. - */ - public String latestRevisionFqdn() { - return this.innerProperties() == null ? null : this.innerProperties().latestRevisionFqdn(); - } - - /** - * Get the customDomainVerificationId property: Id used to verify domain name ownership. - * - * @return the customDomainVerificationId value. - */ - public String customDomainVerificationId() { - return this.innerProperties() == null ? null : this.innerProperties().customDomainVerificationId(); - } - - /** - * Get the configuration property: Non versioned Container App configuration properties. - * - * @return the configuration value. - */ - public Configuration configuration() { - return this.innerProperties() == null ? null : this.innerProperties().configuration(); - } - - /** - * Set the configuration property: Non versioned Container App configuration properties. - * - * @param configuration the configuration value to set. - * @return the ContainerAppInner object itself. - */ - public ContainerAppInner withConfiguration(Configuration configuration) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerAppProperties(); - } - this.innerProperties().withConfiguration(configuration); - return this; - } - - /** - * Get the template property: Container App versioned application definition. - * - * @return the template value. - */ - public Template template() { - return this.innerProperties() == null ? null : this.innerProperties().template(); - } - - /** - * Set the template property: Container App versioned application definition. - * - * @param template the template value to set. - * @return the ContainerAppInner object itself. - */ - public ContainerAppInner withTemplate(Template template) { - if (this.innerProperties() == null) { - this.innerProperties = new ContainerAppProperties(); - } - this.innerProperties().withTemplate(template); - return this; - } - - /** - * Get the outboundIpAddresses property: Outbound IP Addresses for container app. - * - * @return the outboundIpAddresses value. - */ - public List outboundIpAddresses() { - return this.innerProperties() == null ? null : this.innerProperties().outboundIpAddresses(); - } - - /** - * Get the eventStreamEndpoint property: The endpoint of the eventstream of the container app. - * - * @return the eventStreamEndpoint value. - */ - public String eventStreamEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().eventStreamEndpoint(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (extendedLocation() != null) { - extendedLocation().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeStringField("managedBy", this.managedBy); - jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString()); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContainerAppInner. - */ - public static ContainerAppInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppInner deserializedContainerAppInner = new ContainerAppInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedContainerAppInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedContainerAppInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedContainerAppInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedContainerAppInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedContainerAppInner.withTags(tags); - } else if ("extendedLocation".equals(fieldName)) { - deserializedContainerAppInner.extendedLocation = ExtendedLocation.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedContainerAppInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("managedBy".equals(fieldName)) { - deserializedContainerAppInner.managedBy = reader.getString(); - } else if ("kind".equals(fieldName)) { - deserializedContainerAppInner.kind = Kind.fromString(reader.getString()); - } else if ("properties".equals(fieldName)) { - deserializedContainerAppInner.innerProperties = ContainerAppProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedContainerAppInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppInner; - }); - } -} 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 deleted file mode 100644 index 3b6331fec40d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppJobExecutionsInner.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Container App executions collection ARM resource. - */ -@Fluent -public final class ContainerAppJobExecutionsInner implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of ContainerAppJobExecutionsInner class. - */ - public ContainerAppJobExecutionsInner() { - } - - /** - * 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 ContainerAppJobExecutionsInner object itself. - */ - public ContainerAppJobExecutionsInner 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 ContainerAppJobExecutionsInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppJobExecutionsInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppJobExecutionsInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppJobExecutionsInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContainerAppJobExecutionsInner. - */ - public static ContainerAppJobExecutionsInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppJobExecutionsInner deserializedContainerAppJobExecutionsInner - = new ContainerAppJobExecutionsInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> JobExecutionInner.fromJson(reader1)); - deserializedContainerAppJobExecutionsInner.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedContainerAppJobExecutionsInner.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppJobExecutionsInner; - }); - } -} 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 deleted file mode 100644 index 1cf2f5032fc6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -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 java.io.IOException; -import java.util.List; - -/** - * ContainerApp resource specific properties. - */ -@Fluent -public final class ContainerAppProperties implements JsonSerializable { - /* - * Provisioning state of the Container App. - */ - private ContainerAppProvisioningState provisioningState; - - /* - * Any errors that occurred during deployment - */ - private String deploymentErrors; - - /* - * Deprecated. Resource ID of the Container App's environment. - */ - private String managedEnvironmentId; - - /* - * Resource ID of environment. - */ - private String environmentId; - - /* - * Workload profile name to pin for container app execution. - */ - private String workloadProfileName; - - /* - * Container App auto patch configuration. - */ - private ContainerAppPropertiesPatchingConfiguration patchingConfiguration; - - /* - * Name of the latest revision of the Container App. - */ - private String latestRevisionName; - - /* - * Name of the latest ready revision of the Container App. - */ - private String latestReadyRevisionName; - - /* - * Fully Qualified Domain Name of the latest revision of the Container App. - */ - private String latestRevisionFqdn; - - /* - * Id used to verify domain name ownership - */ - private String customDomainVerificationId; - - /* - * Non versioned Container App configuration properties. - */ - private Configuration configuration; - - /* - * Container App versioned application definition. - */ - private Template template; - - /* - * Outbound IP Addresses for container app. - */ - private List outboundIpAddresses; - - /* - * The endpoint of the eventstream of the container app. - */ - private String eventStreamEndpoint; - - /** - * Creates an instance of ContainerAppProperties class. - */ - public ContainerAppProperties() { - } - - /** - * Get the provisioningState property: Provisioning state of the Container App. - * - * @return the provisioningState value. - */ - public ContainerAppProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the deploymentErrors property: Any errors that occurred during deployment. - * - * @return the deploymentErrors value. - */ - public String deploymentErrors() { - return this.deploymentErrors; - } - - /** - * Get the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment. - * - * @return the managedEnvironmentId value. - */ - public String managedEnvironmentId() { - return this.managedEnvironmentId; - } - - /** - * Set the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment. - * - * @param managedEnvironmentId the managedEnvironmentId value to set. - * @return the ContainerAppProperties object itself. - */ - public ContainerAppProperties withManagedEnvironmentId(String managedEnvironmentId) { - this.managedEnvironmentId = managedEnvironmentId; - return this; - } - - /** - * Get the environmentId property: Resource ID of environment. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.environmentId; - } - - /** - * Set the environmentId property: Resource ID of environment. - * - * @param environmentId the environmentId value to set. - * @return the ContainerAppProperties object itself. - */ - public ContainerAppProperties withEnvironmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Get the workloadProfileName property: Workload profile name to pin for container app execution. - * - * @return the workloadProfileName value. - */ - public String workloadProfileName() { - return this.workloadProfileName; - } - - /** - * Set the workloadProfileName property: Workload profile name to pin for container app execution. - * - * @param workloadProfileName the workloadProfileName value to set. - * @return the ContainerAppProperties object itself. - */ - public ContainerAppProperties withWorkloadProfileName(String workloadProfileName) { - this.workloadProfileName = 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. - * - * @return the latestRevisionName value. - */ - public String latestRevisionName() { - return this.latestRevisionName; - } - - /** - * Get the latestReadyRevisionName property: Name of the latest ready revision of the Container App. - * - * @return the latestReadyRevisionName value. - */ - public String latestReadyRevisionName() { - return this.latestReadyRevisionName; - } - - /** - * Get the latestRevisionFqdn property: Fully Qualified Domain Name of the latest revision of the Container App. - * - * @return the latestRevisionFqdn value. - */ - public String latestRevisionFqdn() { - return this.latestRevisionFqdn; - } - - /** - * Get the customDomainVerificationId property: Id used to verify domain name ownership. - * - * @return the customDomainVerificationId value. - */ - public String customDomainVerificationId() { - return this.customDomainVerificationId; - } - - /** - * Get the configuration property: Non versioned Container App configuration properties. - * - * @return the configuration value. - */ - public Configuration configuration() { - return this.configuration; - } - - /** - * Set the configuration property: Non versioned Container App configuration properties. - * - * @param configuration the configuration value to set. - * @return the ContainerAppProperties object itself. - */ - public ContainerAppProperties withConfiguration(Configuration configuration) { - this.configuration = configuration; - return this; - } - - /** - * Get the template property: Container App versioned application definition. - * - * @return the template value. - */ - public Template template() { - return this.template; - } - - /** - * Set the template property: Container App versioned application definition. - * - * @param template the template value to set. - * @return the ContainerAppProperties object itself. - */ - public ContainerAppProperties withTemplate(Template template) { - this.template = template; - return this; - } - - /** - * Get the outboundIpAddresses property: Outbound IP Addresses for container app. - * - * @return the outboundIpAddresses value. - */ - public List outboundIpAddresses() { - return this.outboundIpAddresses; - } - - /** - * Get the eventStreamEndpoint property: The endpoint of the eventstream of the container app. - * - * @return the eventStreamEndpoint value. - */ - public String eventStreamEndpoint() { - return this.eventStreamEndpoint; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (patchingConfiguration() != null) { - patchingConfiguration().validate(); - } - if (configuration() != null) { - configuration().validate(); - } - if (template() != null) { - template().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("managedEnvironmentId", this.managedEnvironmentId); - jsonWriter.writeStringField("environmentId", this.environmentId); - jsonWriter.writeStringField("workloadProfileName", this.workloadProfileName); - jsonWriter.writeJsonField("patchingConfiguration", this.patchingConfiguration); - jsonWriter.writeJsonField("configuration", this.configuration); - jsonWriter.writeJsonField("template", this.template); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ContainerAppProperties. - */ - public static ContainerAppProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppProperties deserializedContainerAppProperties = new ContainerAppProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedContainerAppProperties.provisioningState - = ContainerAppProvisioningState.fromString(reader.getString()); - } else if ("deploymentErrors".equals(fieldName)) { - deserializedContainerAppProperties.deploymentErrors = reader.getString(); - } else if ("managedEnvironmentId".equals(fieldName)) { - deserializedContainerAppProperties.managedEnvironmentId = reader.getString(); - } else if ("environmentId".equals(fieldName)) { - deserializedContainerAppProperties.environmentId = reader.getString(); - } else if ("workloadProfileName".equals(fieldName)) { - deserializedContainerAppProperties.workloadProfileName = reader.getString(); - } else if ("patchingConfiguration".equals(fieldName)) { - deserializedContainerAppProperties.patchingConfiguration - = ContainerAppPropertiesPatchingConfiguration.fromJson(reader); - } else if ("latestRevisionName".equals(fieldName)) { - deserializedContainerAppProperties.latestRevisionName = reader.getString(); - } else if ("latestReadyRevisionName".equals(fieldName)) { - deserializedContainerAppProperties.latestReadyRevisionName = reader.getString(); - } else if ("latestRevisionFqdn".equals(fieldName)) { - deserializedContainerAppProperties.latestRevisionFqdn = reader.getString(); - } else if ("customDomainVerificationId".equals(fieldName)) { - deserializedContainerAppProperties.customDomainVerificationId = reader.getString(); - } else if ("configuration".equals(fieldName)) { - deserializedContainerAppProperties.configuration = Configuration.fromJson(reader); - } else if ("template".equals(fieldName)) { - deserializedContainerAppProperties.template = Template.fromJson(reader); - } else if ("outboundIpAddresses".equals(fieldName)) { - List outboundIpAddresses = reader.readArray(reader1 -> reader1.getString()); - deserializedContainerAppProperties.outboundIpAddresses = outboundIpAddresses; - } else if ("eventStreamEndpoint".equals(fieldName)) { - deserializedContainerAppProperties.eventStreamEndpoint = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppProperties; - }); - } -} 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 deleted file mode 100644 index 1c0f62c68141..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsBuildProperties.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.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 java.io.IOException; - -/** - * The ContainerAppBuild properties. - */ -@Immutable -public final class ContainerAppsBuildProperties implements JsonSerializable { - /* - * Build provisioning state. - */ - private BuildProvisioningState provisioningState; - - /* - * Status of the build once it has been provisioned. - */ - private BuildStatus buildStatus; - - /* - * Container registry that the final image will be uploaded to. - */ - private ContainerRegistryWithCustomImage destinationContainerRegistry; - - /* - * Configuration of the build. - */ - private ContainerAppsBuildConfiguration configuration; - - /* - * Endpoint from which the build logs can be streamed. - */ - 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(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppsBuildProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppsBuildProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ContainerAppsBuildProperties. - */ - public static ContainerAppsBuildProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppsBuildProperties deserializedContainerAppsBuildProperties = new ContainerAppsBuildProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedContainerAppsBuildProperties.provisioningState - = BuildProvisioningState.fromString(reader.getString()); - } else if ("buildStatus".equals(fieldName)) { - deserializedContainerAppsBuildProperties.buildStatus = BuildStatus.fromString(reader.getString()); - } else if ("destinationContainerRegistry".equals(fieldName)) { - deserializedContainerAppsBuildProperties.destinationContainerRegistry - = ContainerRegistryWithCustomImage.fromJson(reader); - } else if ("configuration".equals(fieldName)) { - deserializedContainerAppsBuildProperties.configuration - = ContainerAppsBuildConfiguration.fromJson(reader); - } else if ("logStreamEndpoint".equals(fieldName)) { - deserializedContainerAppsBuildProperties.logStreamEndpoint = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppsBuildProperties; - }); - } -} 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 deleted file mode 100644 index bebda57ec0da..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsBuildResourceInner.java +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -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 java.io.IOException; - -/** - * Information pertaining to an individual build. - */ -@Immutable -public final class ContainerAppsBuildResourceInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private ContainerAppsBuildProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of 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 type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the provisioningState property: 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(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppsBuildResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppsBuildResourceInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContainerAppsBuildResourceInner. - */ - public static ContainerAppsBuildResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppsBuildResourceInner deserializedContainerAppsBuildResourceInner - = new ContainerAppsBuildResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedContainerAppsBuildResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedContainerAppsBuildResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedContainerAppsBuildResourceInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedContainerAppsBuildResourceInner.innerProperties - = ContainerAppsBuildProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedContainerAppsBuildResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppsBuildResourceInner; - }); - } -} 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 deleted file mode 100644 index eb0ce921ef43..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsPatchResourceInner.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.PatchProperties; -import java.io.IOException; - -/** - * Container App Patch. - */ -@Immutable -public final class ContainerAppsPatchResourceInner extends ProxyResource { - /* - * Properties that describes current states of the patch resource. - */ - private PatchProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of 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; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppsPatchResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppsPatchResourceInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContainerAppsPatchResourceInner. - */ - public static ContainerAppsPatchResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppsPatchResourceInner deserializedContainerAppsPatchResourceInner - = new ContainerAppsPatchResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedContainerAppsPatchResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedContainerAppsPatchResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedContainerAppsPatchResourceInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedContainerAppsPatchResourceInner.properties = PatchProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedContainerAppsPatchResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppsPatchResourceInner; - }); - } -} 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 deleted file mode 100644 index 823e86dc321e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java +++ /dev/null @@ -1,343 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo; -import com.azure.resourcemanager.appcontainers.models.DnsVerificationTestResult; -import java.io.IOException; -import java.util.List; - -/** - * Custom domain analysis. - */ -@Fluent -public final class CustomHostnameAnalysisResultInner implements JsonSerializable { - /* - * Host name that was analyzed - */ - private String hostname; - - /* - * true if hostname is already verified; otherwise, false. - */ - private Boolean isHostnameAlreadyVerified; - - /* - * DNS verification test result. - */ - private DnsVerificationTestResult customDomainVerificationTest; - - /* - * Raw failure information if DNS verification fails. - */ - private CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo; - - /* - * true if there is a conflict on the Container App's managed environment; otherwise, - * false. - */ - private Boolean hasConflictOnManagedEnvironment; - - /* - * true if there is a conflict on the Container App's managed environment level custom domain; - * otherwise, false. - */ - private Boolean conflictWithEnvironmentCustomDomain; - - /* - * Name of the conflicting Container App on the Managed Environment if it's within the same subscription. - */ - private String conflictingContainerAppResourceId; - - /* - * CName records visible for this hostname. - */ - private List cNameRecords; - - /* - * TXT records visible for this hostname. - */ - private List txtRecords; - - /* - * A records visible for this hostname. - */ - private List aRecords; - - /* - * Alternate CName records visible for this hostname. - */ - private List alternateCNameRecords; - - /* - * Alternate TXT records visible for this hostname. - */ - private List alternateTxtRecords; - - /** - * Creates an instance of CustomHostnameAnalysisResultInner class. - */ - public CustomHostnameAnalysisResultInner() { - } - - /** - * Get the hostname property: Host name that was analyzed. - * - * @return the hostname value. - */ - public String hostname() { - return this.hostname; - } - - /** - * Get the isHostnameAlreadyVerified property: <code>true</code> if hostname is already verified; - * otherwise, <code>false</code>. - * - * @return the isHostnameAlreadyVerified value. - */ - public Boolean isHostnameAlreadyVerified() { - return this.isHostnameAlreadyVerified; - } - - /** - * Get the customDomainVerificationTest property: DNS verification test result. - * - * @return the customDomainVerificationTest value. - */ - public DnsVerificationTestResult customDomainVerificationTest() { - return this.customDomainVerificationTest; - } - - /** - * Get the customDomainVerificationFailureInfo property: Raw failure information if DNS verification fails. - * - * @return the customDomainVerificationFailureInfo value. - */ - public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo() { - return this.customDomainVerificationFailureInfo; - } - - /** - * Get the hasConflictOnManagedEnvironment property: <code>true</code> if there is a conflict on the - * Container App's managed environment; otherwise, <code>false</code>. - * - * @return the hasConflictOnManagedEnvironment value. - */ - public Boolean hasConflictOnManagedEnvironment() { - return this.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>. - * - * @return the conflictWithEnvironmentCustomDomain value. - */ - public Boolean conflictWithEnvironmentCustomDomain() { - return this.conflictWithEnvironmentCustomDomain; - } - - /** - * Get the conflictingContainerAppResourceId property: Name of the conflicting Container App on the Managed - * Environment if it's within the same subscription. - * - * @return the conflictingContainerAppResourceId value. - */ - public String conflictingContainerAppResourceId() { - return this.conflictingContainerAppResourceId; - } - - /** - * Get the cNameRecords property: CName records visible for this hostname. - * - * @return the cNameRecords value. - */ - public List cNameRecords() { - return this.cNameRecords; - } - - /** - * Set the cNameRecords property: CName records visible for this hostname. - * - * @param cNameRecords the cNameRecords value to set. - * @return the CustomHostnameAnalysisResultInner object itself. - */ - public CustomHostnameAnalysisResultInner withCNameRecords(List cNameRecords) { - this.cNameRecords = cNameRecords; - return this; - } - - /** - * Get the txtRecords property: TXT records visible for this hostname. - * - * @return the txtRecords value. - */ - public List txtRecords() { - return this.txtRecords; - } - - /** - * Set the txtRecords property: TXT records visible for this hostname. - * - * @param txtRecords the txtRecords value to set. - * @return the CustomHostnameAnalysisResultInner object itself. - */ - public CustomHostnameAnalysisResultInner withTxtRecords(List txtRecords) { - this.txtRecords = txtRecords; - return this; - } - - /** - * Get the aRecords property: A records visible for this hostname. - * - * @return the aRecords value. - */ - public List aRecords() { - return this.aRecords; - } - - /** - * Set the aRecords property: A records visible for this hostname. - * - * @param aRecords the aRecords value to set. - * @return the CustomHostnameAnalysisResultInner object itself. - */ - public CustomHostnameAnalysisResultInner withARecords(List aRecords) { - this.aRecords = aRecords; - return this; - } - - /** - * Get the alternateCNameRecords property: Alternate CName records visible for this hostname. - * - * @return the alternateCNameRecords value. - */ - public List alternateCNameRecords() { - return this.alternateCNameRecords; - } - - /** - * Set the alternateCNameRecords property: Alternate CName records visible for this hostname. - * - * @param alternateCNameRecords the alternateCNameRecords value to set. - * @return the CustomHostnameAnalysisResultInner object itself. - */ - public CustomHostnameAnalysisResultInner withAlternateCNameRecords(List alternateCNameRecords) { - this.alternateCNameRecords = alternateCNameRecords; - return this; - } - - /** - * Get the alternateTxtRecords property: Alternate TXT records visible for this hostname. - * - * @return the alternateTxtRecords value. - */ - public List alternateTxtRecords() { - return this.alternateTxtRecords; - } - - /** - * Set the alternateTxtRecords property: Alternate TXT records visible for this hostname. - * - * @param alternateTxtRecords the alternateTxtRecords value to set. - * @return the CustomHostnameAnalysisResultInner object itself. - */ - public CustomHostnameAnalysisResultInner withAlternateTxtRecords(List alternateTxtRecords) { - this.alternateTxtRecords = alternateTxtRecords; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (customDomainVerificationFailureInfo() != null) { - customDomainVerificationFailureInfo().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("cNameRecords", this.cNameRecords, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("txtRecords", this.txtRecords, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("aRecords", this.aRecords, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("alternateCNameRecords", this.alternateCNameRecords, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("alternateTxtRecords", this.alternateTxtRecords, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomHostnameAnalysisResultInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomHostnameAnalysisResultInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CustomHostnameAnalysisResultInner. - */ - public static CustomHostnameAnalysisResultInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomHostnameAnalysisResultInner deserializedCustomHostnameAnalysisResultInner - = new CustomHostnameAnalysisResultInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("hostName".equals(fieldName)) { - deserializedCustomHostnameAnalysisResultInner.hostname = reader.getString(); - } else if ("isHostnameAlreadyVerified".equals(fieldName)) { - deserializedCustomHostnameAnalysisResultInner.isHostnameAlreadyVerified - = reader.getNullable(JsonReader::getBoolean); - } else if ("customDomainVerificationTest".equals(fieldName)) { - deserializedCustomHostnameAnalysisResultInner.customDomainVerificationTest - = DnsVerificationTestResult.fromString(reader.getString()); - } else if ("customDomainVerificationFailureInfo".equals(fieldName)) { - deserializedCustomHostnameAnalysisResultInner.customDomainVerificationFailureInfo - = CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.fromJson(reader); - } else if ("hasConflictOnManagedEnvironment".equals(fieldName)) { - deserializedCustomHostnameAnalysisResultInner.hasConflictOnManagedEnvironment - = reader.getNullable(JsonReader::getBoolean); - } else if ("conflictWithEnvironmentCustomDomain".equals(fieldName)) { - deserializedCustomHostnameAnalysisResultInner.conflictWithEnvironmentCustomDomain - = reader.getNullable(JsonReader::getBoolean); - } else if ("conflictingContainerAppResourceId".equals(fieldName)) { - deserializedCustomHostnameAnalysisResultInner.conflictingContainerAppResourceId - = reader.getString(); - } else if ("cNameRecords".equals(fieldName)) { - List cNameRecords = reader.readArray(reader1 -> reader1.getString()); - deserializedCustomHostnameAnalysisResultInner.cNameRecords = cNameRecords; - } else if ("txtRecords".equals(fieldName)) { - List txtRecords = reader.readArray(reader1 -> reader1.getString()); - deserializedCustomHostnameAnalysisResultInner.txtRecords = txtRecords; - } else if ("aRecords".equals(fieldName)) { - List aRecords = reader.readArray(reader1 -> reader1.getString()); - deserializedCustomHostnameAnalysisResultInner.aRecords = aRecords; - } else if ("alternateCNameRecords".equals(fieldName)) { - List alternateCNameRecords = reader.readArray(reader1 -> reader1.getString()); - deserializedCustomHostnameAnalysisResultInner.alternateCNameRecords = alternateCNameRecords; - } else if ("alternateTxtRecords".equals(fieldName)) { - List alternateTxtRecords = reader.readArray(reader1 -> reader1.getString()); - deserializedCustomHostnameAnalysisResultInner.alternateTxtRecords = alternateTxtRecords; - } else { - reader.skipChildren(); - } - } - - return deserializedCustomHostnameAnalysisResultInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java deleted file mode 100644 index efd72c8da287..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java +++ /dev/null @@ -1,365 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; -import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import com.azure.resourcemanager.appcontainers.models.Secret; -import java.io.IOException; -import java.util.List; - -/** - * Dapr Component. - */ -@Fluent -public final class DaprComponentInner extends ProxyResource { - /* - * Dapr Component resource specific properties - */ - private DaprComponentProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of DaprComponentInner class. - */ - public DaprComponentInner() { - } - - /** - * Get the innerProperties property: Dapr Component resource specific properties. - * - * @return the innerProperties value. - */ - private DaprComponentProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the componentType property: Component type. - * - * @return the componentType value. - */ - public String componentType() { - return this.innerProperties() == null ? null : this.innerProperties().componentType(); - } - - /** - * Set the componentType property: Component type. - * - * @param componentType the componentType value to set. - * @return the DaprComponentInner object itself. - */ - public DaprComponentInner withComponentType(String componentType) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentProperties(); - } - this.innerProperties().withComponentType(componentType); - return this; - } - - /** - * Get the version property: Component version. - * - * @return the version value. - */ - public String version() { - return this.innerProperties() == null ? null : this.innerProperties().version(); - } - - /** - * Set the version property: Component version. - * - * @param version the version value to set. - * @return the DaprComponentInner object itself. - */ - public DaprComponentInner withVersion(String version) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentProperties(); - } - this.innerProperties().withVersion(version); - return this; - } - - /** - * Get the ignoreErrors property: Boolean describing if the component errors are ignores. - * - * @return the ignoreErrors value. - */ - public Boolean ignoreErrors() { - return this.innerProperties() == null ? null : this.innerProperties().ignoreErrors(); - } - - /** - * Set the ignoreErrors property: Boolean describing if the component errors are ignores. - * - * @param ignoreErrors the ignoreErrors value to set. - * @return the DaprComponentInner object itself. - */ - public DaprComponentInner withIgnoreErrors(Boolean ignoreErrors) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentProperties(); - } - this.innerProperties().withIgnoreErrors(ignoreErrors); - return this; - } - - /** - * Get the initTimeout property: Initialization timeout. - * - * @return the initTimeout value. - */ - public String initTimeout() { - return this.innerProperties() == null ? null : this.innerProperties().initTimeout(); - } - - /** - * Set the initTimeout property: Initialization timeout. - * - * @param initTimeout the initTimeout value to set. - * @return the DaprComponentInner object itself. - */ - public DaprComponentInner withInitTimeout(String initTimeout) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentProperties(); - } - this.innerProperties().withInitTimeout(initTimeout); - return this; - } - - /** - * Get the secrets property: Collection of secrets used by a Dapr component. - * - * @return the secrets value. - */ - public List secrets() { - return this.innerProperties() == null ? null : this.innerProperties().secrets(); - } - - /** - * Set the secrets property: Collection of secrets used by a Dapr component. - * - * @param secrets the secrets value to set. - * @return the DaprComponentInner object itself. - */ - public DaprComponentInner withSecrets(List secrets) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentProperties(); - } - this.innerProperties().withSecrets(secrets); - return this; - } - - /** - * Get the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * - * @return the secretStoreComponent value. - */ - public String secretStoreComponent() { - return this.innerProperties() == null ? null : this.innerProperties().secretStoreComponent(); - } - - /** - * Set the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * - * @param secretStoreComponent the secretStoreComponent value to set. - * @return the DaprComponentInner object itself. - */ - public DaprComponentInner withSecretStoreComponent(String secretStoreComponent) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentProperties(); - } - this.innerProperties().withSecretStoreComponent(secretStoreComponent); - return this; - } - - /** - * Get the metadata property: Component metadata. - * - * @return the metadata value. - */ - public List metadata() { - return this.innerProperties() == null ? null : this.innerProperties().metadata(); - } - - /** - * Set the metadata property: Component metadata. - * - * @param metadata the metadata value to set. - * @return the DaprComponentInner object itself. - */ - public DaprComponentInner withMetadata(List metadata) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentProperties(); - } - this.innerProperties().withMetadata(metadata); - return this; - } - - /** - * Get the scopes property: Names of container apps that can use this Dapr component. - * - * @return the scopes value. - */ - public List scopes() { - return this.innerProperties() == null ? null : this.innerProperties().scopes(); - } - - /** - * Set the scopes property: Names of container apps that can use this Dapr component. - * - * @param scopes the scopes value to set. - * @return the DaprComponentInner object itself. - */ - public DaprComponentInner withScopes(List scopes) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentProperties(); - } - this.innerProperties().withScopes(scopes); - return this; - } - - /** - * Get the serviceComponentBind property: List of container app services that are bound to the Dapr component. - * - * @return the serviceComponentBind value. - */ - public List serviceComponentBind() { - return this.innerProperties() == null ? null : this.innerProperties().serviceComponentBind(); - } - - /** - * Set the serviceComponentBind property: List of container app services that are bound to the Dapr component. - * - * @param serviceComponentBind the serviceComponentBind value to set. - * @return the DaprComponentInner object itself. - */ - public DaprComponentInner withServiceComponentBind(List serviceComponentBind) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentProperties(); - } - this.innerProperties().withServiceComponentBind(serviceComponentBind); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DaprComponentInner. - */ - public static DaprComponentInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentInner deserializedDaprComponentInner = new DaprComponentInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDaprComponentInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDaprComponentInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDaprComponentInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedDaprComponentInner.innerProperties = DaprComponentProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDaprComponentInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java deleted file mode 100644 index 2ea651f923a4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java +++ /dev/null @@ -1,336 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; -import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import com.azure.resourcemanager.appcontainers.models.Secret; -import java.io.IOException; -import java.util.List; - -/** - * Dapr Component resource specific properties. - */ -@Fluent -public final class DaprComponentProperties implements JsonSerializable { - /* - * Component type - */ - private String componentType; - - /* - * Component version - */ - private String version; - - /* - * Boolean describing if the component errors are ignores - */ - private Boolean ignoreErrors; - - /* - * Initialization timeout - */ - private String initTimeout; - - /* - * Collection of secrets used by a Dapr component - */ - private List secrets; - - /* - * Name of a Dapr component to retrieve component secrets from - */ - private String secretStoreComponent; - - /* - * Component metadata - */ - private List metadata; - - /* - * Names of container apps that can use this Dapr component - */ - private List scopes; - - /* - * List of container app services that are bound to the Dapr component - */ - private List serviceComponentBind; - - /** - * Creates an instance of DaprComponentProperties class. - */ - public DaprComponentProperties() { - } - - /** - * Get the componentType property: Component type. - * - * @return the componentType value. - */ - public String componentType() { - return this.componentType; - } - - /** - * Set the componentType property: Component type. - * - * @param componentType the componentType value to set. - * @return the DaprComponentProperties object itself. - */ - public DaprComponentProperties withComponentType(String componentType) { - this.componentType = componentType; - return this; - } - - /** - * Get the version property: Component version. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Set the version property: Component version. - * - * @param version the version value to set. - * @return the DaprComponentProperties object itself. - */ - public DaprComponentProperties withVersion(String version) { - this.version = version; - return this; - } - - /** - * Get the ignoreErrors property: Boolean describing if the component errors are ignores. - * - * @return the ignoreErrors value. - */ - public Boolean ignoreErrors() { - return this.ignoreErrors; - } - - /** - * Set the ignoreErrors property: Boolean describing if the component errors are ignores. - * - * @param ignoreErrors the ignoreErrors value to set. - * @return the DaprComponentProperties object itself. - */ - public DaprComponentProperties withIgnoreErrors(Boolean ignoreErrors) { - this.ignoreErrors = ignoreErrors; - return this; - } - - /** - * Get the initTimeout property: Initialization timeout. - * - * @return the initTimeout value. - */ - public String initTimeout() { - return this.initTimeout; - } - - /** - * Set the initTimeout property: Initialization timeout. - * - * @param initTimeout the initTimeout value to set. - * @return the DaprComponentProperties object itself. - */ - public DaprComponentProperties withInitTimeout(String initTimeout) { - this.initTimeout = initTimeout; - return this; - } - - /** - * Get the secrets property: Collection of secrets used by a Dapr component. - * - * @return the secrets value. - */ - public List secrets() { - return this.secrets; - } - - /** - * Set the secrets property: Collection of secrets used by a Dapr component. - * - * @param secrets the secrets value to set. - * @return the DaprComponentProperties object itself. - */ - public DaprComponentProperties withSecrets(List secrets) { - this.secrets = secrets; - return this; - } - - /** - * Get the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * - * @return the secretStoreComponent value. - */ - public String secretStoreComponent() { - return this.secretStoreComponent; - } - - /** - * Set the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * - * @param secretStoreComponent the secretStoreComponent value to set. - * @return the DaprComponentProperties object itself. - */ - public DaprComponentProperties withSecretStoreComponent(String secretStoreComponent) { - this.secretStoreComponent = secretStoreComponent; - return this; - } - - /** - * Get the metadata property: Component metadata. - * - * @return the metadata value. - */ - public List metadata() { - return this.metadata; - } - - /** - * Set the metadata property: Component metadata. - * - * @param metadata the metadata value to set. - * @return the DaprComponentProperties object itself. - */ - public DaprComponentProperties withMetadata(List metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the scopes property: Names of container apps that can use this Dapr component. - * - * @return the scopes value. - */ - public List scopes() { - return this.scopes; - } - - /** - * Set the scopes property: Names of container apps that can use this Dapr component. - * - * @param scopes the scopes value to set. - * @return the DaprComponentProperties object itself. - */ - public DaprComponentProperties withScopes(List scopes) { - this.scopes = scopes; - return this; - } - - /** - * Get the serviceComponentBind property: List of container app services that are bound to the Dapr component. - * - * @return the serviceComponentBind value. - */ - public List serviceComponentBind() { - return this.serviceComponentBind; - } - - /** - * Set the serviceComponentBind property: List of container app services that are bound to the Dapr component. - * - * @param serviceComponentBind the serviceComponentBind value to set. - * @return the DaprComponentProperties object itself. - */ - public DaprComponentProperties withServiceComponentBind(List serviceComponentBind) { - this.serviceComponentBind = serviceComponentBind; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (secrets() != null) { - secrets().forEach(e -> e.validate()); - } - if (metadata() != null) { - metadata().forEach(e -> e.validate()); - } - if (serviceComponentBind() != null) { - serviceComponentBind().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("componentType", this.componentType); - jsonWriter.writeStringField("version", this.version); - jsonWriter.writeBooleanField("ignoreErrors", this.ignoreErrors); - jsonWriter.writeStringField("initTimeout", this.initTimeout); - jsonWriter.writeArrayField("secrets", this.secrets, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("secretStoreComponent", this.secretStoreComponent); - jsonWriter.writeArrayField("metadata", this.metadata, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("scopes", this.scopes, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("serviceComponentBind", this.serviceComponentBind, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DaprComponentProperties. - */ - public static DaprComponentProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentProperties deserializedDaprComponentProperties = new DaprComponentProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("componentType".equals(fieldName)) { - deserializedDaprComponentProperties.componentType = reader.getString(); - } else if ("version".equals(fieldName)) { - deserializedDaprComponentProperties.version = reader.getString(); - } else if ("ignoreErrors".equals(fieldName)) { - deserializedDaprComponentProperties.ignoreErrors = reader.getNullable(JsonReader::getBoolean); - } else if ("initTimeout".equals(fieldName)) { - deserializedDaprComponentProperties.initTimeout = reader.getString(); - } else if ("secrets".equals(fieldName)) { - List secrets = reader.readArray(reader1 -> Secret.fromJson(reader1)); - deserializedDaprComponentProperties.secrets = secrets; - } else if ("secretStoreComponent".equals(fieldName)) { - deserializedDaprComponentProperties.secretStoreComponent = reader.getString(); - } else if ("metadata".equals(fieldName)) { - List metadata = reader.readArray(reader1 -> DaprMetadata.fromJson(reader1)); - deserializedDaprComponentProperties.metadata = metadata; - } else if ("scopes".equals(fieldName)) { - List scopes = reader.readArray(reader1 -> reader1.getString()); - deserializedDaprComponentProperties.scopes = scopes; - } else if ("serviceComponentBind".equals(fieldName)) { - List serviceComponentBind - = reader.readArray(reader1 -> DaprComponentServiceBinding.fromJson(reader1)); - deserializedDaprComponentProperties.serviceComponentBind = serviceComponentBind; - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentResiliencyPolicyInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentResiliencyPolicyInner.java deleted file mode 100644 index 6d4303b56664..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentResiliencyPolicyInner.java +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import java.io.IOException; - -/** - * Dapr Component Resiliency Policy. - */ -@Fluent -public final class DaprComponentResiliencyPolicyInner extends ProxyResource { - /* - * Dapr Component Resiliency Policy resource specific properties - */ - private DaprComponentResiliencyPolicyProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of DaprComponentResiliencyPolicyInner class. - */ - public DaprComponentResiliencyPolicyInner() { - } - - /** - * Get the innerProperties property: Dapr Component Resiliency Policy resource specific properties. - * - * @return the innerProperties value. - */ - private DaprComponentResiliencyPolicyProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the inboundPolicy property: The optional inbound component resiliency policy configuration. - * - * @return the inboundPolicy value. - */ - public DaprComponentResiliencyPolicyConfiguration inboundPolicy() { - return this.innerProperties() == null ? null : this.innerProperties().inboundPolicy(); - } - - /** - * Set the inboundPolicy property: The optional inbound component resiliency policy configuration. - * - * @param inboundPolicy the inboundPolicy value to set. - * @return the DaprComponentResiliencyPolicyInner object itself. - */ - public DaprComponentResiliencyPolicyInner - withInboundPolicy(DaprComponentResiliencyPolicyConfiguration inboundPolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentResiliencyPolicyProperties(); - } - this.innerProperties().withInboundPolicy(inboundPolicy); - return this; - } - - /** - * Get the outboundPolicy property: The optional outbound component resiliency policy configuration. - * - * @return the outboundPolicy value. - */ - public DaprComponentResiliencyPolicyConfiguration outboundPolicy() { - return this.innerProperties() == null ? null : this.innerProperties().outboundPolicy(); - } - - /** - * Set the outboundPolicy property: The optional outbound component resiliency policy configuration. - * - * @param outboundPolicy the outboundPolicy value to set. - * @return the DaprComponentResiliencyPolicyInner object itself. - */ - public DaprComponentResiliencyPolicyInner - withOutboundPolicy(DaprComponentResiliencyPolicyConfiguration outboundPolicy) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprComponentResiliencyPolicyProperties(); - } - this.innerProperties().withOutboundPolicy(outboundPolicy); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentResiliencyPolicyInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentResiliencyPolicyInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DaprComponentResiliencyPolicyInner. - */ - public static DaprComponentResiliencyPolicyInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentResiliencyPolicyInner deserializedDaprComponentResiliencyPolicyInner - = new DaprComponentResiliencyPolicyInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyInner.innerProperties - = DaprComponentResiliencyPolicyProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentResiliencyPolicyInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentResiliencyPolicyProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentResiliencyPolicyProperties.java deleted file mode 100644 index 2167772c38d6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentResiliencyPolicyProperties.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import java.io.IOException; - -/** - * Dapr Component Resiliency Policy resource specific properties. - */ -@Fluent -public final class DaprComponentResiliencyPolicyProperties - implements JsonSerializable { - /* - * The optional inbound component resiliency policy configuration - */ - private DaprComponentResiliencyPolicyConfiguration inboundPolicy; - - /* - * The optional outbound component resiliency policy configuration - */ - private DaprComponentResiliencyPolicyConfiguration outboundPolicy; - - /** - * Creates an instance of DaprComponentResiliencyPolicyProperties class. - */ - public DaprComponentResiliencyPolicyProperties() { - } - - /** - * Get the inboundPolicy property: The optional inbound component resiliency policy configuration. - * - * @return the inboundPolicy value. - */ - public DaprComponentResiliencyPolicyConfiguration inboundPolicy() { - return this.inboundPolicy; - } - - /** - * Set the inboundPolicy property: The optional inbound component resiliency policy configuration. - * - * @param inboundPolicy the inboundPolicy value to set. - * @return the DaprComponentResiliencyPolicyProperties object itself. - */ - public DaprComponentResiliencyPolicyProperties - withInboundPolicy(DaprComponentResiliencyPolicyConfiguration inboundPolicy) { - this.inboundPolicy = inboundPolicy; - return this; - } - - /** - * Get the outboundPolicy property: The optional outbound component resiliency policy configuration. - * - * @return the outboundPolicy value. - */ - public DaprComponentResiliencyPolicyConfiguration outboundPolicy() { - return this.outboundPolicy; - } - - /** - * Set the outboundPolicy property: The optional outbound component resiliency policy configuration. - * - * @param outboundPolicy the outboundPolicy value to set. - * @return the DaprComponentResiliencyPolicyProperties object itself. - */ - public DaprComponentResiliencyPolicyProperties - withOutboundPolicy(DaprComponentResiliencyPolicyConfiguration outboundPolicy) { - this.outboundPolicy = outboundPolicy; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (inboundPolicy() != null) { - inboundPolicy().validate(); - } - if (outboundPolicy() != null) { - outboundPolicy().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("inboundPolicy", this.inboundPolicy); - jsonWriter.writeJsonField("outboundPolicy", this.outboundPolicy); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentResiliencyPolicyProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentResiliencyPolicyProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DaprComponentResiliencyPolicyProperties. - */ - public static DaprComponentResiliencyPolicyProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentResiliencyPolicyProperties deserializedDaprComponentResiliencyPolicyProperties - = new DaprComponentResiliencyPolicyProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("inboundPolicy".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyProperties.inboundPolicy - = DaprComponentResiliencyPolicyConfiguration.fromJson(reader); - } else if ("outboundPolicy".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyProperties.outboundPolicy - = DaprComponentResiliencyPolicyConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentResiliencyPolicyProperties; - }); - } -} 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 deleted file mode 100644 index 0e76693a0119..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSecretsCollectionInner.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.DaprSecret; -import java.io.IOException; -import java.util.List; - -/** - * Dapr component Secrets Collection for ListSecrets Action. - */ -@Fluent -public final class DaprSecretsCollectionInner implements JsonSerializable { - /* - * Collection of secrets used by a Dapr component - */ - private List value; - - /** - * Creates an instance of DaprSecretsCollectionInner class. - */ - public DaprSecretsCollectionInner() { - } - - /** - * Get the value property: Collection of secrets used by a Dapr component. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of secrets used by a Dapr component. - * - * @param value the value value to set. - * @return the DaprSecretsCollectionInner object itself. - */ - public DaprSecretsCollectionInner withValue(List value) { - this.value = value; - 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 DaprSecretsCollectionInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DaprSecretsCollectionInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprSecretsCollectionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprSecretsCollectionInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DaprSecretsCollectionInner. - */ - public static DaprSecretsCollectionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprSecretsCollectionInner deserializedDaprSecretsCollectionInner = new DaprSecretsCollectionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> DaprSecret.fromJson(reader1)); - deserializedDaprSecretsCollectionInner.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedDaprSecretsCollectionInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSubscriptionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSubscriptionInner.java deleted file mode 100644 index 623eba27acae..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSubscriptionInner.java +++ /dev/null @@ -1,319 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Dapr PubSub Event Subscription. - */ -@Fluent -public final class DaprSubscriptionInner extends ProxyResource { - /* - * Dapr PubSub Event Subscription resource specific properties - */ - private DaprSubscriptionProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of DaprSubscriptionInner class. - */ - public DaprSubscriptionInner() { - } - - /** - * Get the innerProperties property: Dapr PubSub Event Subscription resource specific properties. - * - * @return the innerProperties value. - */ - private DaprSubscriptionProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the pubsubName property: Dapr PubSub component name. - * - * @return the pubsubName value. - */ - public String pubsubName() { - return this.innerProperties() == null ? null : this.innerProperties().pubsubName(); - } - - /** - * Set the pubsubName property: Dapr PubSub component name. - * - * @param pubsubName the pubsubName value to set. - * @return the DaprSubscriptionInner object itself. - */ - public DaprSubscriptionInner withPubsubName(String pubsubName) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprSubscriptionProperties(); - } - this.innerProperties().withPubsubName(pubsubName); - return this; - } - - /** - * Get the topic property: Topic name. - * - * @return the topic value. - */ - public String topic() { - return this.innerProperties() == null ? null : this.innerProperties().topic(); - } - - /** - * Set the topic property: Topic name. - * - * @param topic the topic value to set. - * @return the DaprSubscriptionInner object itself. - */ - public DaprSubscriptionInner withTopic(String topic) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprSubscriptionProperties(); - } - this.innerProperties().withTopic(topic); - return this; - } - - /** - * Get the deadLetterTopic property: Deadletter topic name. - * - * @return the deadLetterTopic value. - */ - public String deadLetterTopic() { - return this.innerProperties() == null ? null : this.innerProperties().deadLetterTopic(); - } - - /** - * Set the deadLetterTopic property: Deadletter topic name. - * - * @param deadLetterTopic the deadLetterTopic value to set. - * @return the DaprSubscriptionInner object itself. - */ - public DaprSubscriptionInner withDeadLetterTopic(String deadLetterTopic) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprSubscriptionProperties(); - } - this.innerProperties().withDeadLetterTopic(deadLetterTopic); - return this; - } - - /** - * Get the routes property: Subscription routes. - * - * @return the routes value. - */ - public DaprSubscriptionRoutes routes() { - return this.innerProperties() == null ? null : this.innerProperties().routes(); - } - - /** - * Set the routes property: Subscription routes. - * - * @param routes the routes value to set. - * @return the DaprSubscriptionInner object itself. - */ - public DaprSubscriptionInner withRoutes(DaprSubscriptionRoutes routes) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprSubscriptionProperties(); - } - this.innerProperties().withRoutes(routes); - return this; - } - - /** - * Get the scopes property: Application scopes to restrict the subscription to specific apps. - * - * @return the scopes value. - */ - public List scopes() { - return this.innerProperties() == null ? null : this.innerProperties().scopes(); - } - - /** - * Set the scopes property: Application scopes to restrict the subscription to specific apps. - * - * @param scopes the scopes value to set. - * @return the DaprSubscriptionInner object itself. - */ - public DaprSubscriptionInner withScopes(List scopes) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprSubscriptionProperties(); - } - this.innerProperties().withScopes(scopes); - return this; - } - - /** - * Get the metadata property: Subscription metadata. - * - * @return the metadata value. - */ - public Map metadata() { - return this.innerProperties() == null ? null : this.innerProperties().metadata(); - } - - /** - * Set the metadata property: Subscription metadata. - * - * @param metadata the metadata value to set. - * @return the DaprSubscriptionInner object itself. - */ - public DaprSubscriptionInner withMetadata(Map metadata) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprSubscriptionProperties(); - } - this.innerProperties().withMetadata(metadata); - return this; - } - - /** - * Get the bulkSubscribe property: Bulk subscription options. - * - * @return the bulkSubscribe value. - */ - public DaprSubscriptionBulkSubscribeOptions bulkSubscribe() { - return this.innerProperties() == null ? null : this.innerProperties().bulkSubscribe(); - } - - /** - * Set the bulkSubscribe property: Bulk subscription options. - * - * @param bulkSubscribe the bulkSubscribe value to set. - * @return the DaprSubscriptionInner object itself. - */ - public DaprSubscriptionInner withBulkSubscribe(DaprSubscriptionBulkSubscribeOptions bulkSubscribe) { - if (this.innerProperties() == null) { - this.innerProperties = new DaprSubscriptionProperties(); - } - this.innerProperties().withBulkSubscribe(bulkSubscribe); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprSubscriptionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprSubscriptionInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DaprSubscriptionInner. - */ - public static DaprSubscriptionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprSubscriptionInner deserializedDaprSubscriptionInner = new DaprSubscriptionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDaprSubscriptionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDaprSubscriptionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDaprSubscriptionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedDaprSubscriptionInner.innerProperties = DaprSubscriptionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDaprSubscriptionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprSubscriptionInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSubscriptionProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSubscriptionProperties.java deleted file mode 100644 index 94f636305390..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSubscriptionProperties.java +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Dapr PubSub Event Subscription resource specific properties. - */ -@Fluent -public final class DaprSubscriptionProperties implements JsonSerializable { - /* - * Dapr PubSub component name - */ - private String pubsubName; - - /* - * Topic name - */ - private String topic; - - /* - * Deadletter topic name - */ - private String deadLetterTopic; - - /* - * Subscription routes - */ - private DaprSubscriptionRoutes routes; - - /* - * Application scopes to restrict the subscription to specific apps. - */ - private List scopes; - - /* - * Subscription metadata - */ - private Map metadata; - - /* - * Bulk subscription options - */ - private DaprSubscriptionBulkSubscribeOptions bulkSubscribe; - - /** - * Creates an instance of DaprSubscriptionProperties class. - */ - public DaprSubscriptionProperties() { - } - - /** - * Get the pubsubName property: Dapr PubSub component name. - * - * @return the pubsubName value. - */ - public String pubsubName() { - return this.pubsubName; - } - - /** - * Set the pubsubName property: Dapr PubSub component name. - * - * @param pubsubName the pubsubName value to set. - * @return the DaprSubscriptionProperties object itself. - */ - public DaprSubscriptionProperties withPubsubName(String pubsubName) { - this.pubsubName = pubsubName; - return this; - } - - /** - * Get the topic property: Topic name. - * - * @return the topic value. - */ - public String topic() { - return this.topic; - } - - /** - * Set the topic property: Topic name. - * - * @param topic the topic value to set. - * @return the DaprSubscriptionProperties object itself. - */ - public DaprSubscriptionProperties withTopic(String topic) { - this.topic = topic; - return this; - } - - /** - * Get the deadLetterTopic property: Deadletter topic name. - * - * @return the deadLetterTopic value. - */ - public String deadLetterTopic() { - return this.deadLetterTopic; - } - - /** - * Set the deadLetterTopic property: Deadletter topic name. - * - * @param deadLetterTopic the deadLetterTopic value to set. - * @return the DaprSubscriptionProperties object itself. - */ - public DaprSubscriptionProperties withDeadLetterTopic(String deadLetterTopic) { - this.deadLetterTopic = deadLetterTopic; - return this; - } - - /** - * Get the routes property: Subscription routes. - * - * @return the routes value. - */ - public DaprSubscriptionRoutes routes() { - return this.routes; - } - - /** - * Set the routes property: Subscription routes. - * - * @param routes the routes value to set. - * @return the DaprSubscriptionProperties object itself. - */ - public DaprSubscriptionProperties withRoutes(DaprSubscriptionRoutes routes) { - this.routes = routes; - return this; - } - - /** - * Get the scopes property: Application scopes to restrict the subscription to specific apps. - * - * @return the scopes value. - */ - public List scopes() { - return this.scopes; - } - - /** - * Set the scopes property: Application scopes to restrict the subscription to specific apps. - * - * @param scopes the scopes value to set. - * @return the DaprSubscriptionProperties object itself. - */ - public DaprSubscriptionProperties withScopes(List scopes) { - this.scopes = scopes; - return this; - } - - /** - * Get the metadata property: Subscription metadata. - * - * @return the metadata value. - */ - public Map metadata() { - return this.metadata; - } - - /** - * Set the metadata property: Subscription metadata. - * - * @param metadata the metadata value to set. - * @return the DaprSubscriptionProperties object itself. - */ - public DaprSubscriptionProperties withMetadata(Map metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the bulkSubscribe property: Bulk subscription options. - * - * @return the bulkSubscribe value. - */ - public DaprSubscriptionBulkSubscribeOptions bulkSubscribe() { - return this.bulkSubscribe; - } - - /** - * Set the bulkSubscribe property: Bulk subscription options. - * - * @param bulkSubscribe the bulkSubscribe value to set. - * @return the DaprSubscriptionProperties object itself. - */ - public DaprSubscriptionProperties withBulkSubscribe(DaprSubscriptionBulkSubscribeOptions bulkSubscribe) { - this.bulkSubscribe = bulkSubscribe; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (routes() != null) { - routes().validate(); - } - if (bulkSubscribe() != null) { - bulkSubscribe().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("pubsubName", this.pubsubName); - jsonWriter.writeStringField("topic", this.topic); - jsonWriter.writeStringField("deadLetterTopic", this.deadLetterTopic); - jsonWriter.writeJsonField("routes", this.routes); - jsonWriter.writeArrayField("scopes", this.scopes, (writer, element) -> writer.writeString(element)); - jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("bulkSubscribe", this.bulkSubscribe); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprSubscriptionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprSubscriptionProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DaprSubscriptionProperties. - */ - public static DaprSubscriptionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprSubscriptionProperties deserializedDaprSubscriptionProperties = new DaprSubscriptionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("pubsubName".equals(fieldName)) { - deserializedDaprSubscriptionProperties.pubsubName = reader.getString(); - } else if ("topic".equals(fieldName)) { - deserializedDaprSubscriptionProperties.topic = reader.getString(); - } else if ("deadLetterTopic".equals(fieldName)) { - deserializedDaprSubscriptionProperties.deadLetterTopic = reader.getString(); - } else if ("routes".equals(fieldName)) { - deserializedDaprSubscriptionProperties.routes = DaprSubscriptionRoutes.fromJson(reader); - } else if ("scopes".equals(fieldName)) { - List scopes = reader.readArray(reader1 -> reader1.getString()); - deserializedDaprSubscriptionProperties.scopes = scopes; - } else if ("metadata".equals(fieldName)) { - Map metadata = reader.readMap(reader1 -> reader1.getString()); - deserializedDaprSubscriptionProperties.metadata = metadata; - } else if ("bulkSubscribe".equals(fieldName)) { - deserializedDaprSubscriptionProperties.bulkSubscribe - = DaprSubscriptionBulkSubscribeOptions.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprSubscriptionProperties; - }); - } -} 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 deleted file mode 100644 index 23eacdf53c2d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsCollectionInner.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Diagnostics data collection for a resource. - */ -@Fluent -public final class DiagnosticsCollectionInner implements JsonSerializable { - /* - * Collection of diagnostic data. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of DiagnosticsCollectionInner class. - */ - public DiagnosticsCollectionInner() { - } - - /** - * Get the value property: Collection of diagnostic data. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of diagnostic data. - * - * @param value the value value to set. - * @return the DiagnosticsCollectionInner object itself. - */ - public DiagnosticsCollectionInner 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 DiagnosticsCollectionInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DiagnosticsCollectionInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiagnosticsCollectionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiagnosticsCollectionInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DiagnosticsCollectionInner. - */ - public static DiagnosticsCollectionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiagnosticsCollectionInner deserializedDiagnosticsCollectionInner = new DiagnosticsCollectionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> DiagnosticsInner.fromJson(reader1)); - deserializedDiagnosticsCollectionInner.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDiagnosticsCollectionInner.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDiagnosticsCollectionInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsInner.java deleted file mode 100644 index f10dbcc28fe0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsInner.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import java.io.IOException; - -/** - * Diagnostics data for a resource. - */ -@Fluent -public final class DiagnosticsInner extends ProxyResource { - /* - * Diagnostics resource specific properties - */ - private DiagnosticsProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of DiagnosticsInner class. - */ - public DiagnosticsInner() { - } - - /** - * Get the properties property: Diagnostics resource specific properties. - * - * @return the properties value. - */ - public DiagnosticsProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Diagnostics resource specific properties. - * - * @param properties the properties value to set. - * @return the DiagnosticsInner object itself. - */ - public DiagnosticsInner withProperties(DiagnosticsProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiagnosticsInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiagnosticsInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DiagnosticsInner. - */ - public static DiagnosticsInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiagnosticsInner deserializedDiagnosticsInner = new DiagnosticsInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDiagnosticsInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDiagnosticsInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDiagnosticsInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedDiagnosticsInner.properties = DiagnosticsProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDiagnosticsInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDiagnosticsInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DotNetComponentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DotNetComponentInner.java deleted file mode 100644 index 8ff895f7f39d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DotNetComponentInner.java +++ /dev/null @@ -1,237 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.io.IOException; -import java.util.List; - -/** - * .NET Component. - */ -@Fluent -public final class DotNetComponentInner extends ProxyResource { - /* - * .NET Component resource specific properties - */ - private DotNetComponentProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of DotNetComponentInner class. - */ - public DotNetComponentInner() { - } - - /** - * Get the innerProperties property: .NET Component resource specific properties. - * - * @return the innerProperties value. - */ - private DotNetComponentProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the componentType property: Type of the .NET Component. - * - * @return the componentType value. - */ - public DotNetComponentType componentType() { - return this.innerProperties() == null ? null : this.innerProperties().componentType(); - } - - /** - * Set the componentType property: Type of the .NET Component. - * - * @param componentType the componentType value to set. - * @return the DotNetComponentInner object itself. - */ - public DotNetComponentInner withComponentType(DotNetComponentType componentType) { - if (this.innerProperties() == null) { - this.innerProperties = new DotNetComponentProperties(); - } - this.innerProperties().withComponentType(componentType); - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the .NET Component. - * - * @return the provisioningState value. - */ - public DotNetComponentProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the configurations property: List of .NET Components configuration properties. - * - * @return the configurations value. - */ - public List configurations() { - return this.innerProperties() == null ? null : this.innerProperties().configurations(); - } - - /** - * Set the configurations property: List of .NET Components configuration properties. - * - * @param configurations the configurations value to set. - * @return the DotNetComponentInner object itself. - */ - public DotNetComponentInner withConfigurations(List configurations) { - if (this.innerProperties() == null) { - this.innerProperties = new DotNetComponentProperties(); - } - this.innerProperties().withConfigurations(configurations); - return this; - } - - /** - * Get the serviceBinds property: List of .NET Components that are bound to the .NET component. - * - * @return the serviceBinds value. - */ - public List serviceBinds() { - return this.innerProperties() == null ? null : this.innerProperties().serviceBinds(); - } - - /** - * Set the serviceBinds property: List of .NET Components that are bound to the .NET component. - * - * @param serviceBinds the serviceBinds value to set. - * @return the DotNetComponentInner object itself. - */ - public DotNetComponentInner withServiceBinds(List serviceBinds) { - if (this.innerProperties() == null) { - this.innerProperties = new DotNetComponentProperties(); - } - this.innerProperties().withServiceBinds(serviceBinds); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DotNetComponentInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DotNetComponentInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DotNetComponentInner. - */ - public static DotNetComponentInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DotNetComponentInner deserializedDotNetComponentInner = new DotNetComponentInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDotNetComponentInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDotNetComponentInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedDotNetComponentInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedDotNetComponentInner.innerProperties = DotNetComponentProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedDotNetComponentInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDotNetComponentInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DotNetComponentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DotNetComponentProperties.java deleted file mode 100644 index 182ec5ce5887..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DotNetComponentProperties.java +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.io.IOException; -import java.util.List; - -/** - * .NET Component resource specific properties. - */ -@Fluent -public final class DotNetComponentProperties implements JsonSerializable { - /* - * Type of the .NET Component. - */ - private DotNetComponentType componentType; - - /* - * Provisioning state of the .NET Component. - */ - private DotNetComponentProvisioningState provisioningState; - - /* - * List of .NET Components configuration properties - */ - private List configurations; - - /* - * List of .NET Components that are bound to the .NET component - */ - private List serviceBinds; - - /** - * Creates an instance of DotNetComponentProperties class. - */ - public DotNetComponentProperties() { - } - - /** - * Get the componentType property: Type of the .NET Component. - * - * @return the componentType value. - */ - public DotNetComponentType componentType() { - return this.componentType; - } - - /** - * Set the componentType property: Type of the .NET Component. - * - * @param componentType the componentType value to set. - * @return the DotNetComponentProperties object itself. - */ - public DotNetComponentProperties withComponentType(DotNetComponentType componentType) { - this.componentType = componentType; - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the .NET Component. - * - * @return the provisioningState value. - */ - public DotNetComponentProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the configurations property: List of .NET Components configuration properties. - * - * @return the configurations value. - */ - public List configurations() { - return this.configurations; - } - - /** - * Set the configurations property: List of .NET Components configuration properties. - * - * @param configurations the configurations value to set. - * @return the DotNetComponentProperties object itself. - */ - public DotNetComponentProperties withConfigurations(List configurations) { - this.configurations = configurations; - return this; - } - - /** - * Get the serviceBinds property: List of .NET Components that are bound to the .NET component. - * - * @return the serviceBinds value. - */ - public List serviceBinds() { - return this.serviceBinds; - } - - /** - * Set the serviceBinds property: List of .NET Components that are bound to the .NET component. - * - * @param serviceBinds the serviceBinds value to set. - * @return the DotNetComponentProperties object itself. - */ - public DotNetComponentProperties withServiceBinds(List serviceBinds) { - this.serviceBinds = serviceBinds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (configurations() != null) { - configurations().forEach(e -> e.validate()); - } - if (serviceBinds() != null) { - serviceBinds().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("componentType", this.componentType == null ? null : this.componentType.toString()); - jsonWriter.writeArrayField("configurations", this.configurations, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("serviceBinds", this.serviceBinds, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DotNetComponentProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DotNetComponentProperties if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DotNetComponentProperties. - */ - public static DotNetComponentProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DotNetComponentProperties deserializedDotNetComponentProperties = new DotNetComponentProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("componentType".equals(fieldName)) { - deserializedDotNetComponentProperties.componentType - = DotNetComponentType.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedDotNetComponentProperties.provisioningState - = DotNetComponentProvisioningState.fromString(reader.getString()); - } else if ("configurations".equals(fieldName)) { - List configurations - = reader.readArray(reader1 -> DotNetComponentConfigurationProperty.fromJson(reader1)); - deserializedDotNetComponentProperties.configurations = configurations; - } else if ("serviceBinds".equals(fieldName)) { - List serviceBinds - = reader.readArray(reader1 -> DotNetComponentServiceBind.fromJson(reader1)); - deserializedDotNetComponentProperties.serviceBinds = serviceBinds; - } else { - reader.skipChildren(); - } - } - - return deserializedDotNetComponentProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenInner.java deleted file mode 100644 index 0e95d91fd757..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenInner.java +++ /dev/null @@ -1,200 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Map; - -/** - * Environment Auth Token. - */ -@Fluent -public final class EnvironmentAuthTokenInner extends Resource { - /* - * Environment auth token resource specific properties - */ - private EnvironmentAuthTokenProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of EnvironmentAuthTokenInner class. - */ - public EnvironmentAuthTokenInner() { - } - - /** - * Get the innerProperties property: Environment auth token resource specific properties. - * - * @return the innerProperties value. - */ - private EnvironmentAuthTokenProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public EnvironmentAuthTokenInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public EnvironmentAuthTokenInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the token property: Auth token value. - * - * @return the token value. - */ - public String token() { - return this.innerProperties() == null ? null : this.innerProperties().token(); - } - - /** - * Get the expires property: Token expiration date. - * - * @return the expires value. - */ - public OffsetDateTime expires() { - return this.innerProperties() == null ? null : this.innerProperties().expires(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EnvironmentAuthTokenInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EnvironmentAuthTokenInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EnvironmentAuthTokenInner. - */ - public static EnvironmentAuthTokenInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EnvironmentAuthTokenInner deserializedEnvironmentAuthTokenInner = new EnvironmentAuthTokenInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedEnvironmentAuthTokenInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedEnvironmentAuthTokenInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedEnvironmentAuthTokenInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedEnvironmentAuthTokenInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedEnvironmentAuthTokenInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedEnvironmentAuthTokenInner.innerProperties - = EnvironmentAuthTokenProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedEnvironmentAuthTokenInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedEnvironmentAuthTokenInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenProperties.java deleted file mode 100644 index 494d43da9dcd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenProperties.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Environment auth token resource specific properties. - */ -@Immutable -public final class EnvironmentAuthTokenProperties implements JsonSerializable { - /* - * Auth token value. - */ - private String token; - - /* - * Token expiration date. - */ - private OffsetDateTime expires; - - /** - * Creates an instance of EnvironmentAuthTokenProperties class. - */ - public EnvironmentAuthTokenProperties() { - } - - /** - * Get the token property: Auth token value. - * - * @return the token value. - */ - public String token() { - return this.token; - } - - /** - * Get the expires property: Token expiration date. - * - * @return the expires value. - */ - public OffsetDateTime expires() { - return this.expires; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EnvironmentAuthTokenProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EnvironmentAuthTokenProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the EnvironmentAuthTokenProperties. - */ - public static EnvironmentAuthTokenProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EnvironmentAuthTokenProperties deserializedEnvironmentAuthTokenProperties - = new EnvironmentAuthTokenProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("token".equals(fieldName)) { - deserializedEnvironmentAuthTokenProperties.token = reader.getString(); - } else if ("expires".equals(fieldName)) { - deserializedEnvironmentAuthTokenProperties.expires = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else { - reader.skipChildren(); - } - } - - return deserializedEnvironmentAuthTokenProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HeaderMatchMatch.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HeaderMatchMatch.java deleted file mode 100644 index 3f50c599fc2b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HeaderMatchMatch.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Type of match to perform. - */ -@Fluent -public final class HeaderMatchMatch implements JsonSerializable { - /* - * Exact value of the header - */ - private String exactMatch; - - /* - * Prefix value of the header - */ - private String prefixMatch; - - /* - * Suffix value of the header - */ - private String suffixMatch; - - /* - * Regex value of the header - */ - private String regexMatch; - - /** - * Creates an instance of HeaderMatchMatch class. - */ - public HeaderMatchMatch() { - } - - /** - * Get the exactMatch property: Exact value of the header. - * - * @return the exactMatch value. - */ - public String exactMatch() { - return this.exactMatch; - } - - /** - * Set the exactMatch property: Exact value of the header. - * - * @param exactMatch the exactMatch value to set. - * @return the HeaderMatchMatch object itself. - */ - public HeaderMatchMatch withExactMatch(String exactMatch) { - this.exactMatch = exactMatch; - return this; - } - - /** - * Get the prefixMatch property: Prefix value of the header. - * - * @return the prefixMatch value. - */ - public String prefixMatch() { - return this.prefixMatch; - } - - /** - * Set the prefixMatch property: Prefix value of the header. - * - * @param prefixMatch the prefixMatch value to set. - * @return the HeaderMatchMatch object itself. - */ - public HeaderMatchMatch withPrefixMatch(String prefixMatch) { - this.prefixMatch = prefixMatch; - return this; - } - - /** - * Get the suffixMatch property: Suffix value of the header. - * - * @return the suffixMatch value. - */ - public String suffixMatch() { - return this.suffixMatch; - } - - /** - * Set the suffixMatch property: Suffix value of the header. - * - * @param suffixMatch the suffixMatch value to set. - * @return the HeaderMatchMatch object itself. - */ - public HeaderMatchMatch withSuffixMatch(String suffixMatch) { - this.suffixMatch = suffixMatch; - return this; - } - - /** - * Get the regexMatch property: Regex value of the header. - * - * @return the regexMatch value. - */ - public String regexMatch() { - return this.regexMatch; - } - - /** - * Set the regexMatch property: Regex value of the header. - * - * @param regexMatch the regexMatch value to set. - * @return the HeaderMatchMatch object itself. - */ - public HeaderMatchMatch withRegexMatch(String regexMatch) { - this.regexMatch = regexMatch; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("exactMatch", this.exactMatch); - jsonWriter.writeStringField("prefixMatch", this.prefixMatch); - jsonWriter.writeStringField("suffixMatch", this.suffixMatch); - jsonWriter.writeStringField("regexMatch", this.regexMatch); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HeaderMatchMatch from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HeaderMatchMatch if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the HeaderMatchMatch. - */ - public static HeaderMatchMatch fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HeaderMatchMatch deserializedHeaderMatchMatch = new HeaderMatchMatch(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("exactMatch".equals(fieldName)) { - deserializedHeaderMatchMatch.exactMatch = reader.getString(); - } else if ("prefixMatch".equals(fieldName)) { - deserializedHeaderMatchMatch.prefixMatch = reader.getString(); - } else if ("suffixMatch".equals(fieldName)) { - deserializedHeaderMatchMatch.suffixMatch = reader.getString(); - } else if ("regexMatch".equals(fieldName)) { - deserializedHeaderMatchMatch.regexMatch = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHeaderMatchMatch; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRetryPolicyMatches.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRetryPolicyMatches.java deleted file mode 100644 index 6d94fe02bc2b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRetryPolicyMatches.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.HeaderMatch; -import java.io.IOException; -import java.util.List; - -/** - * Conditions that must be met for a request to be retried. - */ -@Fluent -public final class HttpRetryPolicyMatches implements JsonSerializable { - /* - * Headers that must be present for a request to be retried - */ - private List headers; - - /* - * Additional http status codes that can trigger a retry - */ - private List httpStatusCodes; - - /* - * Errors that can trigger a retry - */ - private List errors; - - /** - * Creates an instance of HttpRetryPolicyMatches class. - */ - public HttpRetryPolicyMatches() { - } - - /** - * Get the headers property: Headers that must be present for a request to be retried. - * - * @return the headers value. - */ - public List headers() { - return this.headers; - } - - /** - * Set the headers property: Headers that must be present for a request to be retried. - * - * @param headers the headers value to set. - * @return the HttpRetryPolicyMatches object itself. - */ - public HttpRetryPolicyMatches withHeaders(List headers) { - this.headers = headers; - return this; - } - - /** - * Get the httpStatusCodes property: Additional http status codes that can trigger a retry. - * - * @return the httpStatusCodes value. - */ - public List httpStatusCodes() { - return this.httpStatusCodes; - } - - /** - * Set the httpStatusCodes property: Additional http status codes that can trigger a retry. - * - * @param httpStatusCodes the httpStatusCodes value to set. - * @return the HttpRetryPolicyMatches object itself. - */ - public HttpRetryPolicyMatches withHttpStatusCodes(List httpStatusCodes) { - this.httpStatusCodes = httpStatusCodes; - return this; - } - - /** - * Get the errors property: Errors that can trigger a retry. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Set the errors property: Errors that can trigger a retry. - * - * @param errors the errors value to set. - * @return the HttpRetryPolicyMatches object itself. - */ - public HttpRetryPolicyMatches withErrors(List errors) { - this.errors = errors; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (headers() != null) { - headers().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("headers", this.headers, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("httpStatusCodes", this.httpStatusCodes, - (writer, element) -> writer.writeInt(element)); - jsonWriter.writeArrayField("errors", this.errors, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HttpRetryPolicyMatches from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HttpRetryPolicyMatches if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the HttpRetryPolicyMatches. - */ - public static HttpRetryPolicyMatches fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HttpRetryPolicyMatches deserializedHttpRetryPolicyMatches = new HttpRetryPolicyMatches(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("headers".equals(fieldName)) { - List headers = reader.readArray(reader1 -> HeaderMatch.fromJson(reader1)); - deserializedHttpRetryPolicyMatches.headers = headers; - } else if ("httpStatusCodes".equals(fieldName)) { - List httpStatusCodes = reader.readArray(reader1 -> reader1.getInt()); - deserializedHttpRetryPolicyMatches.httpStatusCodes = httpStatusCodes; - } else if ("errors".equals(fieldName)) { - List errors = reader.readArray(reader1 -> reader1.getString()); - deserializedHttpRetryPolicyMatches.errors = errors; - } else { - reader.skipChildren(); - } - } - - return deserializedHttpRetryPolicyMatches; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRetryPolicyRetryBackOff.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRetryPolicyRetryBackOff.java deleted file mode 100644 index b84e2a65d710..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRetryPolicyRetryBackOff.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Settings for retry backoff characteristics. - */ -@Fluent -public final class HttpRetryPolicyRetryBackOff implements JsonSerializable { - /* - * Initial delay, in milliseconds, before retrying a request - */ - private Long initialDelayInMilliseconds; - - /* - * Maximum interval, in milliseconds, between retries - */ - private Long maxIntervalInMilliseconds; - - /** - * Creates an instance of HttpRetryPolicyRetryBackOff class. - */ - public HttpRetryPolicyRetryBackOff() { - } - - /** - * Get the initialDelayInMilliseconds property: Initial delay, in milliseconds, before retrying a request. - * - * @return the initialDelayInMilliseconds value. - */ - public Long initialDelayInMilliseconds() { - return this.initialDelayInMilliseconds; - } - - /** - * Set the initialDelayInMilliseconds property: Initial delay, in milliseconds, before retrying a request. - * - * @param initialDelayInMilliseconds the initialDelayInMilliseconds value to set. - * @return the HttpRetryPolicyRetryBackOff object itself. - */ - public HttpRetryPolicyRetryBackOff withInitialDelayInMilliseconds(Long initialDelayInMilliseconds) { - this.initialDelayInMilliseconds = initialDelayInMilliseconds; - return this; - } - - /** - * Get the maxIntervalInMilliseconds property: Maximum interval, in milliseconds, between retries. - * - * @return the maxIntervalInMilliseconds value. - */ - public Long maxIntervalInMilliseconds() { - return this.maxIntervalInMilliseconds; - } - - /** - * Set the maxIntervalInMilliseconds property: Maximum interval, in milliseconds, between retries. - * - * @param maxIntervalInMilliseconds the maxIntervalInMilliseconds value to set. - * @return the HttpRetryPolicyRetryBackOff object itself. - */ - public HttpRetryPolicyRetryBackOff withMaxIntervalInMilliseconds(Long maxIntervalInMilliseconds) { - this.maxIntervalInMilliseconds = maxIntervalInMilliseconds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("initialDelayInMilliseconds", this.initialDelayInMilliseconds); - jsonWriter.writeNumberField("maxIntervalInMilliseconds", this.maxIntervalInMilliseconds); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HttpRetryPolicyRetryBackOff from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HttpRetryPolicyRetryBackOff if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the HttpRetryPolicyRetryBackOff. - */ - public static HttpRetryPolicyRetryBackOff fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HttpRetryPolicyRetryBackOff deserializedHttpRetryPolicyRetryBackOff = new HttpRetryPolicyRetryBackOff(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("initialDelayInMilliseconds".equals(fieldName)) { - deserializedHttpRetryPolicyRetryBackOff.initialDelayInMilliseconds - = reader.getNullable(JsonReader::getLong); - } else if ("maxIntervalInMilliseconds".equals(fieldName)) { - deserializedHttpRetryPolicyRetryBackOff.maxIntervalInMilliseconds - = reader.getNullable(JsonReader::getLong); - } else { - reader.skipChildren(); - } - } - - return deserializedHttpRetryPolicyRetryBackOff; - }); - } -} 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 deleted file mode 100644 index d7d89a61dd64..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JavaComponentInner.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.JavaComponentProperties; -import java.io.IOException; - -/** - * Java Component. - */ -@Fluent -public final class JavaComponentInner extends ProxyResource { - /* - * Java Component resource specific properties - */ - private JavaComponentProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of JavaComponentInner class. - */ - public JavaComponentInner() { - } - - /** - * Get the properties property: Java Component resource specific properties. - * - * @return the properties value. - */ - public JavaComponentProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Java Component resource specific properties. - * - * @param properties the properties value to set. - * @return the JavaComponentInner object itself. - */ - public JavaComponentInner withProperties(JavaComponentProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JavaComponentInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JavaComponentInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the JavaComponentInner. - */ - public static JavaComponentInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JavaComponentInner deserializedJavaComponentInner = new JavaComponentInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedJavaComponentInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedJavaComponentInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedJavaComponentInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedJavaComponentInner.properties = JavaComponentProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedJavaComponentInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedJavaComponentInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionBaseInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionBaseInner.java deleted file mode 100644 index 79e1d2fa6122..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionBaseInner.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container App's Job execution name. - */ -@Fluent -public final class JobExecutionBaseInner implements JsonSerializable { - /* - * Job execution name. - */ - private String name; - - /* - * Job execution Id. - */ - private String id; - - /** - * Creates an instance of JobExecutionBaseInner class. - */ - public JobExecutionBaseInner() { - } - - /** - * Get the name property: Job execution name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Job execution name. - * - * @param name the name value to set. - * @return the JobExecutionBaseInner object itself. - */ - public JobExecutionBaseInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the id property: Job execution Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Job execution Id. - * - * @param id the id value to set. - * @return the JobExecutionBaseInner object itself. - */ - public JobExecutionBaseInner withId(String id) { - this.id = id; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("id", this.id); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobExecutionBaseInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobExecutionBaseInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the JobExecutionBaseInner. - */ - public static JobExecutionBaseInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobExecutionBaseInner deserializedJobExecutionBaseInner = new JobExecutionBaseInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedJobExecutionBaseInner.name = reader.getString(); - } else if ("id".equals(fieldName)) { - deserializedJobExecutionBaseInner.id = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJobExecutionBaseInner; - }); - } -} 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 deleted file mode 100644 index e2a76d5a4b6e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionInner.java +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.ExecutionStatus; -import com.azure.resourcemanager.appcontainers.models.JobExecutionRunningState; -import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Container Apps Job execution. - */ -@Fluent -public final class JobExecutionInner implements JsonSerializable { - /* - * Job execution Name. - */ - private String name; - - /* - * Job execution Id. - */ - private String id; - - /* - * Job execution type - */ - private String type; - - /* - * Container Apps Job execution specific properties. - */ - private JobExecutionProperties innerProperties; - - /** - * Creates an instance of JobExecutionInner class. - */ - public JobExecutionInner() { - } - - /** - * Get the name property: Job execution Name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Job execution Name. - * - * @param name the name value to set. - * @return the JobExecutionInner object itself. - */ - public JobExecutionInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the id property: Job execution Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Job execution Id. - * - * @param id the id value to set. - * @return the JobExecutionInner object itself. - */ - public JobExecutionInner withId(String id) { - this.id = id; - return this; - } - - /** - * Get the type property: Job execution type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: Job execution type. - * - * @param type the type value to set. - * @return the JobExecutionInner object itself. - */ - public JobExecutionInner withType(String type) { - this.type = type; - return this; - } - - /** - * Get the innerProperties property: Container Apps Job execution specific properties. - * - * @return the innerProperties value. - */ - private JobExecutionProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the status property: Current running State of the job. - * - * @return the status value. - */ - public JobExecutionRunningState status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); - } - - /** - * Get the startTime property: Job execution start time. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.innerProperties() == null ? null : this.innerProperties().startTime(); - } - - /** - * Set the startTime property: Job execution start time. - * - * @param startTime the startTime value to set. - * @return the JobExecutionInner object itself. - */ - public JobExecutionInner withStartTime(OffsetDateTime startTime) { - if (this.innerProperties() == null) { - this.innerProperties = new JobExecutionProperties(); - } - this.innerProperties().withStartTime(startTime); - return this; - } - - /** - * Get the endTime property: Job execution end time. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.innerProperties() == null ? null : this.innerProperties().endTime(); - } - - /** - * Set the endTime property: Job execution end time. - * - * @param endTime the endTime value to set. - * @return the JobExecutionInner object itself. - */ - public JobExecutionInner withEndTime(OffsetDateTime endTime) { - if (this.innerProperties() == null) { - this.innerProperties = new JobExecutionProperties(); - } - this.innerProperties().withEndTime(endTime); - return this; - } - - /** - * Get the template property: Job's execution container. - * - * @return the template value. - */ - public JobExecutionTemplate template() { - return this.innerProperties() == null ? null : this.innerProperties().template(); - } - - /** - * Set the template property: Job's execution container. - * - * @param template the template value to set. - * @return the JobExecutionInner object itself. - */ - public JobExecutionInner withTemplate(JobExecutionTemplate template) { - if (this.innerProperties() == null) { - this.innerProperties = new JobExecutionProperties(); - } - this.innerProperties().withTemplate(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. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("type", this.type); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobExecutionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobExecutionInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the JobExecutionInner. - */ - public static JobExecutionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobExecutionInner deserializedJobExecutionInner = new JobExecutionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedJobExecutionInner.name = reader.getString(); - } else if ("id".equals(fieldName)) { - deserializedJobExecutionInner.id = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedJobExecutionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedJobExecutionInner.innerProperties = JobExecutionProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedJobExecutionInner; - }); - } -} 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 deleted file mode 100644 index f4c57c06efca..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionProperties.java +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright (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.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.ExecutionStatus; -import com.azure.resourcemanager.appcontainers.models.JobExecutionRunningState; -import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; - -/** - * Container Apps Job execution specific properties. - */ -@Fluent -public final class JobExecutionProperties implements JsonSerializable { - /* - * Current running State of the job - */ - private JobExecutionRunningState status; - - /* - * Job execution start time. - */ - private OffsetDateTime startTime; - - /* - * Job execution end time. - */ - private OffsetDateTime endTime; - - /* - * Job's execution container. - */ - private JobExecutionTemplate template; - - /* - * Detailed status of the job execution. - */ - private ExecutionStatus detailedStatus; - - /** - * Creates an instance of JobExecutionProperties class. - */ - public JobExecutionProperties() { - } - - /** - * Get the status property: Current running State of the job. - * - * @return the status value. - */ - public JobExecutionRunningState status() { - return this.status; - } - - /** - * Get the startTime property: Job execution start time. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Set the startTime property: Job execution start time. - * - * @param startTime the startTime value to set. - * @return the JobExecutionProperties object itself. - */ - public JobExecutionProperties withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime property: Job execution end time. - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Set the endTime property: Job execution end time. - * - * @param endTime the endTime value to set. - * @return the JobExecutionProperties object itself. - */ - public JobExecutionProperties withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the template property: Job's execution container. - * - * @return the template value. - */ - public JobExecutionTemplate template() { - return this.template; - } - - /** - * Set the template property: Job's execution container. - * - * @param template the template value to set. - * @return the JobExecutionProperties object itself. - */ - public JobExecutionProperties withTemplate(JobExecutionTemplate template) { - this.template = 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. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (template() != null) { - template().validate(); - } - if (detailedStatus() != null) { - detailedStatus().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("startTime", - this.startTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.startTime)); - jsonWriter.writeStringField("endTime", - this.endTime == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.endTime)); - jsonWriter.writeJsonField("template", this.template); - jsonWriter.writeJsonField("detailedStatus", this.detailedStatus); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobExecutionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobExecutionProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the JobExecutionProperties. - */ - public static JobExecutionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobExecutionProperties deserializedJobExecutionProperties = new JobExecutionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedJobExecutionProperties.status = JobExecutionRunningState.fromString(reader.getString()); - } else if ("startTime".equals(fieldName)) { - deserializedJobExecutionProperties.startTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("endTime".equals(fieldName)) { - deserializedJobExecutionProperties.endTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("template".equals(fieldName)) { - deserializedJobExecutionProperties.template = JobExecutionTemplate.fromJson(reader); - } else if ("detailedStatus".equals(fieldName)) { - deserializedJobExecutionProperties.detailedStatus = ExecutionStatus.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedJobExecutionProperties; - }); - } -} 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 deleted file mode 100644 index e1f409fb7cd1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobInner.java +++ /dev/null @@ -1,380 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.JobConfiguration; -import com.azure.resourcemanager.appcontainers.models.JobProvisioningState; -import com.azure.resourcemanager.appcontainers.models.JobRunningState; -import com.azure.resourcemanager.appcontainers.models.JobTemplate; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Container App Job. - */ -@Fluent -public final class JobInner extends Resource { - /* - * The complex type of the extended location. - */ - 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. - */ - private ManagedServiceIdentity identity; - - /* - * Container Apps Job resource specific properties. - */ - private JobProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of JobInner class. - */ - public JobInner() { - } - - /** - * Get the extendedLocation property: The complex type of the extended location. - * - * @return the extendedLocation value. - */ - public ExtendedLocation extendedLocation() { - return this.extendedLocation; - } - - /** - * Set the extendedLocation property: The complex type of the extended location. - * - * @param extendedLocation the extendedLocation value to set. - * @return the JobInner object itself. - */ - public JobInner withExtendedLocation(ExtendedLocation extendedLocation) { - this.extendedLocation = extendedLocation; - return this; - } - - /** - * 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. - */ - public ManagedServiceIdentity identity() { - return this.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. - * - * @param identity the identity value to set. - * @return the JobInner object itself. - */ - public JobInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the innerProperties property: Container Apps Job resource specific properties. - * - * @return the innerProperties value. - */ - private JobProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public JobInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public JobInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the Container Apps Job. - * - * @return the provisioningState value. - */ - public JobProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the runningState property: Current running state of the job. - * - * @return the runningState value. - */ - public JobRunningState runningState() { - return this.innerProperties() == null ? null : this.innerProperties().runningState(); - } - - /** - * Get the environmentId property: Resource ID of environment. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.innerProperties() == null ? null : this.innerProperties().environmentId(); - } - - /** - * Set the environmentId property: Resource ID of environment. - * - * @param environmentId the environmentId value to set. - * @return the JobInner object itself. - */ - public JobInner withEnvironmentId(String environmentId) { - if (this.innerProperties() == null) { - this.innerProperties = new JobProperties(); - } - this.innerProperties().withEnvironmentId(environmentId); - return this; - } - - /** - * Get the workloadProfileName property: Workload profile name to pin for container apps job execution. - * - * @return the workloadProfileName value. - */ - public String workloadProfileName() { - return this.innerProperties() == null ? null : this.innerProperties().workloadProfileName(); - } - - /** - * Set the workloadProfileName property: Workload profile name to pin for container apps job execution. - * - * @param workloadProfileName the workloadProfileName value to set. - * @return the JobInner object itself. - */ - public JobInner withWorkloadProfileName(String workloadProfileName) { - if (this.innerProperties() == null) { - this.innerProperties = new JobProperties(); - } - this.innerProperties().withWorkloadProfileName(workloadProfileName); - return this; - } - - /** - * Get the configuration property: Container Apps Job configuration properties. - * - * @return the configuration value. - */ - public JobConfiguration configuration() { - return this.innerProperties() == null ? null : this.innerProperties().configuration(); - } - - /** - * Set the configuration property: Container Apps Job configuration properties. - * - * @param configuration the configuration value to set. - * @return the JobInner object itself. - */ - public JobInner withConfiguration(JobConfiguration configuration) { - if (this.innerProperties() == null) { - this.innerProperties = new JobProperties(); - } - this.innerProperties().withConfiguration(configuration); - return this; - } - - /** - * Get the template property: Container Apps job definition. - * - * @return the template value. - */ - public JobTemplate template() { - return this.innerProperties() == null ? null : this.innerProperties().template(); - } - - /** - * Set the template property: Container Apps job definition. - * - * @param template the template value to set. - * @return the JobInner object itself. - */ - public JobInner withTemplate(JobTemplate template) { - if (this.innerProperties() == null) { - this.innerProperties = new JobProperties(); - } - this.innerProperties().withTemplate(template); - return this; - } - - /** - * Get the outboundIpAddresses property: Outbound IP Addresses of a container apps job. - * - * @return the outboundIpAddresses value. - */ - public List outboundIpAddresses() { - return this.innerProperties() == null ? null : this.innerProperties().outboundIpAddresses(); - } - - /** - * Get the eventStreamEndpoint property: The endpoint of the eventstream of the container apps job. - * - * @return the eventStreamEndpoint value. - */ - public String eventStreamEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().eventStreamEndpoint(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (extendedLocation() != null) { - extendedLocation().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobInner if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the JobInner. - */ - public static JobInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobInner deserializedJobInner = new JobInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedJobInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedJobInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedJobInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedJobInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedJobInner.withTags(tags); - } else if ("extendedLocation".equals(fieldName)) { - deserializedJobInner.extendedLocation = ExtendedLocation.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedJobInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("properties".equals(fieldName)) { - deserializedJobInner.innerProperties = JobProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedJobInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedJobInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobProperties.java deleted file mode 100644 index 07770179672f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobProperties.java +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.JobConfiguration; -import com.azure.resourcemanager.appcontainers.models.JobProvisioningState; -import com.azure.resourcemanager.appcontainers.models.JobRunningState; -import com.azure.resourcemanager.appcontainers.models.JobTemplate; -import java.io.IOException; -import java.util.List; - -/** - * Container Apps Job resource specific properties. - */ -@Fluent -public final class JobProperties implements JsonSerializable { - /* - * Provisioning state of the Container Apps Job. - */ - private JobProvisioningState provisioningState; - - /* - * Current running state of the job - */ - private JobRunningState runningState; - - /* - * Resource ID of environment. - */ - private String environmentId; - - /* - * Workload profile name to pin for container apps job execution. - */ - private String workloadProfileName; - - /* - * Container Apps Job configuration properties. - */ - private JobConfiguration configuration; - - /* - * Container Apps job definition. - */ - private JobTemplate template; - - /* - * Outbound IP Addresses of a container apps job. - */ - private List outboundIpAddresses; - - /* - * The endpoint of the eventstream of the container apps job. - */ - private String eventStreamEndpoint; - - /** - * Creates an instance of JobProperties class. - */ - public JobProperties() { - } - - /** - * Get the provisioningState property: Provisioning state of the Container Apps Job. - * - * @return the provisioningState value. - */ - public JobProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the runningState property: Current running state of the job. - * - * @return the runningState value. - */ - public JobRunningState runningState() { - return this.runningState; - } - - /** - * Get the environmentId property: Resource ID of environment. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.environmentId; - } - - /** - * Set the environmentId property: Resource ID of environment. - * - * @param environmentId the environmentId value to set. - * @return the JobProperties object itself. - */ - public JobProperties withEnvironmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Get the workloadProfileName property: Workload profile name to pin for container apps job execution. - * - * @return the workloadProfileName value. - */ - public String workloadProfileName() { - return this.workloadProfileName; - } - - /** - * Set the workloadProfileName property: Workload profile name to pin for container apps job execution. - * - * @param workloadProfileName the workloadProfileName value to set. - * @return the JobProperties object itself. - */ - public JobProperties withWorkloadProfileName(String workloadProfileName) { - this.workloadProfileName = workloadProfileName; - return this; - } - - /** - * Get the configuration property: Container Apps Job configuration properties. - * - * @return the configuration value. - */ - public JobConfiguration configuration() { - return this.configuration; - } - - /** - * Set the configuration property: Container Apps Job configuration properties. - * - * @param configuration the configuration value to set. - * @return the JobProperties object itself. - */ - public JobProperties withConfiguration(JobConfiguration configuration) { - this.configuration = configuration; - return this; - } - - /** - * Get the template property: Container Apps job definition. - * - * @return the template value. - */ - public JobTemplate template() { - return this.template; - } - - /** - * Set the template property: Container Apps job definition. - * - * @param template the template value to set. - * @return the JobProperties object itself. - */ - public JobProperties withTemplate(JobTemplate template) { - this.template = template; - return this; - } - - /** - * Get the outboundIpAddresses property: Outbound IP Addresses of a container apps job. - * - * @return the outboundIpAddresses value. - */ - public List outboundIpAddresses() { - return this.outboundIpAddresses; - } - - /** - * Get the eventStreamEndpoint property: The endpoint of the eventstream of the container apps job. - * - * @return the eventStreamEndpoint value. - */ - public String eventStreamEndpoint() { - return this.eventStreamEndpoint; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (configuration() != null) { - configuration().validate(); - } - if (template() != null) { - template().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("environmentId", this.environmentId); - jsonWriter.writeStringField("workloadProfileName", this.workloadProfileName); - jsonWriter.writeJsonField("configuration", this.configuration); - jsonWriter.writeJsonField("template", this.template); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the JobProperties. - */ - public static JobProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobProperties deserializedJobProperties = new JobProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedJobProperties.provisioningState = JobProvisioningState.fromString(reader.getString()); - } else if ("runningState".equals(fieldName)) { - deserializedJobProperties.runningState = JobRunningState.fromString(reader.getString()); - } else if ("environmentId".equals(fieldName)) { - deserializedJobProperties.environmentId = reader.getString(); - } else if ("workloadProfileName".equals(fieldName)) { - deserializedJobProperties.workloadProfileName = reader.getString(); - } else if ("configuration".equals(fieldName)) { - deserializedJobProperties.configuration = JobConfiguration.fromJson(reader); - } else if ("template".equals(fieldName)) { - deserializedJobProperties.template = JobTemplate.fromJson(reader); - } else if ("outboundIpAddresses".equals(fieldName)) { - List outboundIpAddresses = reader.readArray(reader1 -> reader1.getString()); - deserializedJobProperties.outboundIpAddresses = outboundIpAddresses; - } else if ("eventStreamEndpoint".equals(fieldName)) { - deserializedJobProperties.eventStreamEndpoint = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJobProperties; - }); - } -} 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 deleted file mode 100644 index db7a2b3b449f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobSecretsCollectionInner.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.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.Secret; -import java.io.IOException; -import java.util.List; - -/** - * Container Apps Job Secrets Collection ARM resource. - */ -@Fluent -public final class JobSecretsCollectionInner implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /** - * Creates an instance of JobSecretsCollectionInner class. - */ - public JobSecretsCollectionInner() { - } - - /** - * 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 JobSecretsCollectionInner object itself. - */ - public JobSecretsCollectionInner withValue(List value) { - this.value = value; - 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 JobSecretsCollectionInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JobSecretsCollectionInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobSecretsCollectionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobSecretsCollectionInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the JobSecretsCollectionInner. - */ - public static JobSecretsCollectionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobSecretsCollectionInner deserializedJobSecretsCollectionInner = new JobSecretsCollectionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> Secret.fromJson(reader1)); - deserializedJobSecretsCollectionInner.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedJobSecretsCollectionInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/LogicAppInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/LogicAppInner.java deleted file mode 100644 index eb646b6c0096..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/LogicAppInner.java +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A logic app extension resource. - */ -@Fluent -public final class LogicAppInner extends ProxyResource { - /* - * The resource-specific properties for this resource. - */ - private Object properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of LogicAppInner class. - */ - public LogicAppInner() { - } - - /** - * Get the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - public Object properties() { - return this.properties; - } - - /** - * Set the properties property: The resource-specific properties for this resource. - * - * @param properties the properties value to set. - * @return the LogicAppInner object itself. - */ - public LogicAppInner withProperties(Object properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeUntypedField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LogicAppInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LogicAppInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LogicAppInner. - */ - public static LogicAppInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LogicAppInner deserializedLogicAppInner = new LogicAppInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedLogicAppInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedLogicAppInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedLogicAppInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedLogicAppInner.properties = reader.readUntyped(); - } else if ("systemData".equals(fieldName)) { - deserializedLogicAppInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedLogicAppInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedCertificateInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedCertificateInner.java deleted file mode 100644 index cfdecdcf62b1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedCertificateInner.java +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.ManagedCertificateProperties; -import java.io.IOException; -import java.util.Map; - -/** - * Managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. - */ -@Fluent -public final class ManagedCertificateInner extends Resource { - /* - * Certificate resource specific properties - */ - private ManagedCertificateProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ManagedCertificateInner class. - */ - public ManagedCertificateInner() { - } - - /** - * Get the properties property: Certificate resource specific properties. - * - * @return the properties value. - */ - public ManagedCertificateProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Certificate resource specific properties. - * - * @param properties the properties value to set. - * @return the ManagedCertificateInner object itself. - */ - public ManagedCertificateInner withProperties(ManagedCertificateProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedCertificateInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedCertificateInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedCertificateInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedCertificateInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ManagedCertificateInner. - */ - public static ManagedCertificateInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedCertificateInner deserializedManagedCertificateInner = new ManagedCertificateInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedManagedCertificateInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedManagedCertificateInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedManagedCertificateInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedManagedCertificateInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedManagedCertificateInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedManagedCertificateInner.properties = ManagedCertificateProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedCertificateInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedCertificateInner; - }); - } -} 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 deleted file mode 100644 index 3bee1a560a9a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java +++ /dev/null @@ -1,672 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; -import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprConfiguration; -import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.KedaConfiguration; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfiguration; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; -import com.azure.resourcemanager.appcontainers.models.PublicNetworkAccess; -import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * An environment for hosting container apps. - */ -@Fluent -public final class ManagedEnvironmentInner extends Resource { - /* - * Kind of the Environment. - */ - private String kind; - - /* - * Managed identities for the Managed Environment to interact with other Azure services without maintaining any - * secrets or credentials in code. - */ - private ManagedServiceIdentity identity; - - /* - * Managed environment resource specific properties - */ - private ManagedEnvironmentProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ManagedEnvironmentInner class. - */ - public ManagedEnvironmentInner() { - } - - /** - * Get the kind property: Kind of the Environment. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: Kind of the Environment. - * - * @param kind the kind value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the identity property: Managed identities for the Managed Environment to interact with other Azure services - * without maintaining any secrets or credentials in code. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: Managed identities for the Managed Environment to interact with other Azure services - * without maintaining any secrets or credentials in code. - * - * @param identity the identity value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the innerProperties property: Managed environment resource specific properties. - * - * @return the innerProperties value. - */ - private ManagedEnvironmentProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedEnvironmentInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public ManagedEnvironmentInner withTags(Map tags) { - super.withTags(tags); - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the Environment. - * - * @return the provisioningState value. - */ - public EnvironmentProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export Service to - * Service communication telemetry. - * - * @return the daprAIInstrumentationKey value. - */ - public String daprAIInstrumentationKey() { - return this.innerProperties() == null ? null : this.innerProperties().daprAIInstrumentationKey(); - } - - /** - * Set the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export Service to - * Service communication telemetry. - * - * @param daprAIInstrumentationKey the daprAIInstrumentationKey value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withDaprAIInstrumentationKey(String daprAIInstrumentationKey) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withDaprAIInstrumentationKey(daprAIInstrumentationKey); - return this; - } - - /** - * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * - * @return the daprAIConnectionString value. - */ - public String daprAIConnectionString() { - return this.innerProperties() == null ? null : this.innerProperties().daprAIConnectionString(); - } - - /** - * 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. - */ - public ManagedEnvironmentInner withDaprAIConnectionString(String daprAIConnectionString) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withDaprAIConnectionString(daprAIConnectionString); - return this; - } - - /** - * Get the vnetConfiguration property: Vnet configuration for the environment. - * - * @return the vnetConfiguration value. - */ - public VnetConfiguration vnetConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().vnetConfiguration(); - } - - /** - * Set the vnetConfiguration property: Vnet configuration for the environment. - * - * @param vnetConfiguration the vnetConfiguration value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withVnetConfiguration(VnetConfiguration vnetConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withVnetConfiguration(vnetConfiguration); - return this; - } - - /** - * Get the deploymentErrors property: Any errors that occurred during deployment or deployment validation. - * - * @return the deploymentErrors value. - */ - public String deploymentErrors() { - return this.innerProperties() == null ? null : this.innerProperties().deploymentErrors(); - } - - /** - * Get the defaultDomain property: Default Domain Name for the cluster. - * - * @return the defaultDomain value. - */ - public String defaultDomain() { - return this.innerProperties() == null ? null : this.innerProperties().defaultDomain(); - } - - /** - * Get the staticIp property: Static IP of the Environment. - * - * @return the staticIp value. - */ - public String staticIp() { - return this.innerProperties() == null ? null : this.innerProperties().staticIp(); - } - - /** - * Get the appLogsConfiguration property: Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported. - * - * @return the appLogsConfiguration value. - */ - public AppLogsConfiguration appLogsConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().appLogsConfiguration(); - } - - /** - * Set the appLogsConfiguration property: Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported. - * - * @param appLogsConfiguration the appLogsConfiguration value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withAppLogsConfiguration(appLogsConfiguration); - return this; - } - - /** - * Get the appInsightsConfiguration property: Environment level Application Insights configuration. - * - * @return the appInsightsConfiguration value. - */ - public AppInsightsConfiguration appInsightsConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().appInsightsConfiguration(); - } - - /** - * Set the appInsightsConfiguration property: Environment level Application Insights configuration. - * - * @param appInsightsConfiguration the appInsightsConfiguration value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withAppInsightsConfiguration(AppInsightsConfiguration appInsightsConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withAppInsightsConfiguration(appInsightsConfiguration); - return this; - } - - /** - * Get the openTelemetryConfiguration property: Environment Open Telemetry configuration. - * - * @return the openTelemetryConfiguration value. - */ - public OpenTelemetryConfiguration openTelemetryConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().openTelemetryConfiguration(); - } - - /** - * Set the openTelemetryConfiguration property: Environment Open Telemetry configuration. - * - * @param openTelemetryConfiguration the openTelemetryConfiguration value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner - withOpenTelemetryConfiguration(OpenTelemetryConfiguration openTelemetryConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withOpenTelemetryConfiguration(openTelemetryConfiguration); - return this; - } - - /** - * Get the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. - * - * @return the zoneRedundant value. - */ - public Boolean zoneRedundant() { - return this.innerProperties() == null ? null : this.innerProperties().zoneRedundant(); - } - - /** - * Set the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. - * - * @param zoneRedundant the zoneRedundant value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withZoneRedundant(Boolean zoneRedundant) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withZoneRedundant(zoneRedundant); - return this; - } - - /** - * Get the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @return the customDomainConfiguration value. - */ - public CustomDomainConfiguration customDomainConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().customDomainConfiguration(); - } - - /** - * Set the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @param customDomainConfiguration the customDomainConfiguration value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withCustomDomainConfiguration(customDomainConfiguration); - return this; - } - - /** - * Get the eventStreamEndpoint property: The endpoint of the eventstream of the Environment. - * - * @return the eventStreamEndpoint value. - */ - public String eventStreamEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().eventStreamEndpoint(); - } - - /** - * Get the workloadProfiles property: Workload profiles configured for the Managed Environment. - * - * @return the workloadProfiles value. - */ - public List workloadProfiles() { - return this.innerProperties() == null ? null : this.innerProperties().workloadProfiles(); - } - - /** - * Set the workloadProfiles property: Workload profiles configured for the Managed Environment. - * - * @param workloadProfiles the workloadProfiles value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withWorkloadProfiles(List workloadProfiles) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withWorkloadProfiles(workloadProfiles); - return this; - } - - /** - * Get the kedaConfiguration property: The configuration of Keda component. - * - * @return the kedaConfiguration value. - */ - public KedaConfiguration kedaConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().kedaConfiguration(); - } - - /** - * Set the kedaConfiguration property: The configuration of Keda component. - * - * @param kedaConfiguration the kedaConfiguration value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withKedaConfiguration(KedaConfiguration kedaConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withKedaConfiguration(kedaConfiguration); - return this; - } - - /** - * Get the daprConfiguration property: The configuration of Dapr component. - * - * @return the daprConfiguration value. - */ - public DaprConfiguration daprConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().daprConfiguration(); - } - - /** - * Set the daprConfiguration property: The configuration of Dapr component. - * - * @param daprConfiguration the daprConfiguration value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withDaprConfiguration(DaprConfiguration daprConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withDaprConfiguration(daprConfiguration); - return this; - } - - /** - * 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. - */ - public String infrastructureResourceGroup() { - return this.innerProperties() == null ? null : this.innerProperties().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. - * - * @param infrastructureResourceGroup the infrastructureResourceGroup value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withInfrastructureResourceGroup(String infrastructureResourceGroup) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withInfrastructureResourceGroup(infrastructureResourceGroup); - return this; - } - - /** - * Get the peerAuthentication property: Peer authentication settings for the Managed Environment. - * - * @return the peerAuthentication value. - */ - public ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication() { - return this.innerProperties() == null ? null : this.innerProperties().peerAuthentication(); - } - - /** - * Set the peerAuthentication property: Peer authentication settings for the Managed Environment. - * - * @param peerAuthentication the peerAuthentication value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner - withPeerAuthentication(ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withPeerAuthentication(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(); - } - - /** - * Get the publicNetworkAccess property: Property to allow or block all public traffic. Allowed Values: 'Enabled', - * 'Disabled'. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); - } - - /** - * Set the publicNetworkAccess property: Property to allow or block all public traffic. Allowed Values: 'Enabled', - * 'Disabled'. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the ManagedEnvironmentInner object itself. - */ - public ManagedEnvironmentInner withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedEnvironmentProperties(); - } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("kind", this.kind); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedEnvironmentInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedEnvironmentInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ManagedEnvironmentInner. - */ - public static ManagedEnvironmentInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedEnvironmentInner deserializedManagedEnvironmentInner = new ManagedEnvironmentInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedManagedEnvironmentInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedManagedEnvironmentInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedManagedEnvironmentInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedManagedEnvironmentInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedManagedEnvironmentInner.withTags(tags); - } else if ("kind".equals(fieldName)) { - deserializedManagedEnvironmentInner.kind = reader.getString(); - } else if ("identity".equals(fieldName)) { - deserializedManagedEnvironmentInner.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("properties".equals(fieldName)) { - deserializedManagedEnvironmentInner.innerProperties = ManagedEnvironmentProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedEnvironmentInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedEnvironmentInner; - }); - } -} 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 deleted file mode 100644 index a2f8451b0f7f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java +++ /dev/null @@ -1,663 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; -import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprConfiguration; -import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.KedaConfiguration; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfiguration; -import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; -import com.azure.resourcemanager.appcontainers.models.PublicNetworkAccess; -import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; -import java.io.IOException; -import java.util.List; - -/** - * Managed environment resource specific properties. - */ -@Fluent -public final class ManagedEnvironmentProperties implements JsonSerializable { - /* - * Provisioning state of the Environment. - */ - private EnvironmentProvisioningState provisioningState; - - /* - * Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry - */ - private String daprAIInstrumentationKey; - - /* - * Application Insights connection string used by Dapr to export Service to Service communication telemetry - */ - private String daprAIConnectionString; - - /* - * Vnet configuration for the environment - */ - private VnetConfiguration vnetConfiguration; - - /* - * Any errors that occurred during deployment or deployment validation - */ - private String deploymentErrors; - - /* - * Default Domain Name for the cluster - */ - private String defaultDomain; - - /* - * Static IP of the Environment - */ - private String staticIp; - - /* - * Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported - */ - private AppLogsConfiguration appLogsConfiguration; - - /* - * Environment level Application Insights configuration - */ - private AppInsightsConfiguration appInsightsConfiguration; - - /* - * Environment Open Telemetry configuration - */ - private OpenTelemetryConfiguration openTelemetryConfiguration; - - /* - * Whether or not this Managed Environment is zone-redundant. - */ - private Boolean zoneRedundant; - - /* - * Custom domain configuration for the environment - */ - private CustomDomainConfiguration customDomainConfiguration; - - /* - * The endpoint of the eventstream of the Environment. - */ - private String eventStreamEndpoint; - - /* - * Workload profiles configured for the Managed Environment. - */ - private List workloadProfiles; - - /* - * The configuration of Keda component. - */ - private KedaConfiguration kedaConfiguration; - - /* - * The configuration of Dapr component. - */ - 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. - */ - private String infrastructureResourceGroup; - - /* - * Peer authentication settings for the Managed Environment - */ - private ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication; - - /* - * Peer traffic settings for the Managed Environment - */ - private ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration; - - /* - * Private endpoint connections to the resource. - */ - private List privateEndpointConnections; - - /* - * Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled'. - */ - private PublicNetworkAccess publicNetworkAccess; - - /** - * Creates an instance of ManagedEnvironmentProperties class. - */ - public ManagedEnvironmentProperties() { - } - - /** - * Get the provisioningState property: Provisioning state of the Environment. - * - * @return the provisioningState value. - */ - public EnvironmentProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export Service to - * Service communication telemetry. - * - * @return the daprAIInstrumentationKey value. - */ - public String daprAIInstrumentationKey() { - return this.daprAIInstrumentationKey; - } - - /** - * Set the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export Service to - * Service communication telemetry. - * - * @param daprAIInstrumentationKey the daprAIInstrumentationKey value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties withDaprAIInstrumentationKey(String daprAIInstrumentationKey) { - this.daprAIInstrumentationKey = daprAIInstrumentationKey; - return this; - } - - /** - * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * - * @return the daprAIConnectionString value. - */ - public String daprAIConnectionString() { - return this.daprAIConnectionString; - } - - /** - * 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. - */ - public ManagedEnvironmentProperties withDaprAIConnectionString(String daprAIConnectionString) { - this.daprAIConnectionString = daprAIConnectionString; - return this; - } - - /** - * Get the vnetConfiguration property: Vnet configuration for the environment. - * - * @return the vnetConfiguration value. - */ - public VnetConfiguration vnetConfiguration() { - return this.vnetConfiguration; - } - - /** - * Set the vnetConfiguration property: Vnet configuration for the environment. - * - * @param vnetConfiguration the vnetConfiguration value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties withVnetConfiguration(VnetConfiguration vnetConfiguration) { - this.vnetConfiguration = vnetConfiguration; - return this; - } - - /** - * Get the deploymentErrors property: Any errors that occurred during deployment or deployment validation. - * - * @return the deploymentErrors value. - */ - public String deploymentErrors() { - return this.deploymentErrors; - } - - /** - * Get the defaultDomain property: Default Domain Name for the cluster. - * - * @return the defaultDomain value. - */ - public String defaultDomain() { - return this.defaultDomain; - } - - /** - * Get the staticIp property: Static IP of the Environment. - * - * @return the staticIp value. - */ - public String staticIp() { - return this.staticIp; - } - - /** - * Get the appLogsConfiguration property: Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported. - * - * @return the appLogsConfiguration value. - */ - public AppLogsConfiguration appLogsConfiguration() { - return this.appLogsConfiguration; - } - - /** - * Set the appLogsConfiguration property: Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported. - * - * @param appLogsConfiguration the appLogsConfiguration value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration) { - this.appLogsConfiguration = appLogsConfiguration; - return this; - } - - /** - * Get the appInsightsConfiguration property: Environment level Application Insights configuration. - * - * @return the appInsightsConfiguration value. - */ - public AppInsightsConfiguration appInsightsConfiguration() { - return this.appInsightsConfiguration; - } - - /** - * Set the appInsightsConfiguration property: Environment level Application Insights configuration. - * - * @param appInsightsConfiguration the appInsightsConfiguration value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties - withAppInsightsConfiguration(AppInsightsConfiguration appInsightsConfiguration) { - this.appInsightsConfiguration = appInsightsConfiguration; - return this; - } - - /** - * Get the openTelemetryConfiguration property: Environment Open Telemetry configuration. - * - * @return the openTelemetryConfiguration value. - */ - public OpenTelemetryConfiguration openTelemetryConfiguration() { - return this.openTelemetryConfiguration; - } - - /** - * Set the openTelemetryConfiguration property: Environment Open Telemetry configuration. - * - * @param openTelemetryConfiguration the openTelemetryConfiguration value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties - withOpenTelemetryConfiguration(OpenTelemetryConfiguration openTelemetryConfiguration) { - this.openTelemetryConfiguration = openTelemetryConfiguration; - return this; - } - - /** - * Get the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. - * - * @return the zoneRedundant value. - */ - public Boolean zoneRedundant() { - return this.zoneRedundant; - } - - /** - * Set the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. - * - * @param zoneRedundant the zoneRedundant value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties withZoneRedundant(Boolean zoneRedundant) { - this.zoneRedundant = zoneRedundant; - return this; - } - - /** - * Get the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @return the customDomainConfiguration value. - */ - public CustomDomainConfiguration customDomainConfiguration() { - return this.customDomainConfiguration; - } - - /** - * Set the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @param customDomainConfiguration the customDomainConfiguration value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties - withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration) { - this.customDomainConfiguration = customDomainConfiguration; - return this; - } - - /** - * Get the eventStreamEndpoint property: The endpoint of the eventstream of the Environment. - * - * @return the eventStreamEndpoint value. - */ - public String eventStreamEndpoint() { - return this.eventStreamEndpoint; - } - - /** - * Get the workloadProfiles property: Workload profiles configured for the Managed Environment. - * - * @return the workloadProfiles value. - */ - public List workloadProfiles() { - return this.workloadProfiles; - } - - /** - * Set the workloadProfiles property: Workload profiles configured for the Managed Environment. - * - * @param workloadProfiles the workloadProfiles value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties withWorkloadProfiles(List workloadProfiles) { - this.workloadProfiles = workloadProfiles; - return this; - } - - /** - * Get the kedaConfiguration property: The configuration of Keda component. - * - * @return the kedaConfiguration value. - */ - public KedaConfiguration kedaConfiguration() { - return this.kedaConfiguration; - } - - /** - * Set the kedaConfiguration property: The configuration of Keda component. - * - * @param kedaConfiguration the kedaConfiguration value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties withKedaConfiguration(KedaConfiguration kedaConfiguration) { - this.kedaConfiguration = kedaConfiguration; - return this; - } - - /** - * Get the daprConfiguration property: The configuration of Dapr component. - * - * @return the daprConfiguration value. - */ - public DaprConfiguration daprConfiguration() { - return this.daprConfiguration; - } - - /** - * Set the daprConfiguration property: The configuration of Dapr component. - * - * @param daprConfiguration the daprConfiguration value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties withDaprConfiguration(DaprConfiguration daprConfiguration) { - this.daprConfiguration = daprConfiguration; - return this; - } - - /** - * 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. - */ - public String infrastructureResourceGroup() { - return this.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. - * - * @param infrastructureResourceGroup the infrastructureResourceGroup value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties withInfrastructureResourceGroup(String infrastructureResourceGroup) { - this.infrastructureResourceGroup = infrastructureResourceGroup; - return this; - } - - /** - * Get the peerAuthentication property: Peer authentication settings for the Managed Environment. - * - * @return the peerAuthentication value. - */ - public ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication() { - return this.peerAuthentication; - } - - /** - * Set the peerAuthentication property: Peer authentication settings for the Managed Environment. - * - * @param peerAuthentication the peerAuthentication value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties - withPeerAuthentication(ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication) { - this.peerAuthentication = 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; - } - - /** - * Get the publicNetworkAccess property: Property to allow or block all public traffic. Allowed Values: 'Enabled', - * 'Disabled'. - * - * @return the publicNetworkAccess value. - */ - public PublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Property to allow or block all public traffic. Allowed Values: 'Enabled', - * 'Disabled'. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the ManagedEnvironmentProperties object itself. - */ - public ManagedEnvironmentProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (vnetConfiguration() != null) { - vnetConfiguration().validate(); - } - if (appLogsConfiguration() != null) { - appLogsConfiguration().validate(); - } - if (appInsightsConfiguration() != null) { - appInsightsConfiguration().validate(); - } - if (openTelemetryConfiguration() != null) { - openTelemetryConfiguration().validate(); - } - if (customDomainConfiguration() != null) { - customDomainConfiguration().validate(); - } - if (workloadProfiles() != null) { - workloadProfiles().forEach(e -> e.validate()); - } - if (kedaConfiguration() != null) { - kedaConfiguration().validate(); - } - if (daprConfiguration() != null) { - daprConfiguration().validate(); - } - if (peerAuthentication() != null) { - peerAuthentication().validate(); - } - if (peerTrafficConfiguration() != null) { - peerTrafficConfiguration().validate(); - } - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("daprAIInstrumentationKey", this.daprAIInstrumentationKey); - jsonWriter.writeStringField("daprAIConnectionString", this.daprAIConnectionString); - jsonWriter.writeJsonField("vnetConfiguration", this.vnetConfiguration); - jsonWriter.writeJsonField("appLogsConfiguration", this.appLogsConfiguration); - jsonWriter.writeJsonField("appInsightsConfiguration", this.appInsightsConfiguration); - jsonWriter.writeJsonField("openTelemetryConfiguration", this.openTelemetryConfiguration); - jsonWriter.writeBooleanField("zoneRedundant", this.zoneRedundant); - jsonWriter.writeJsonField("customDomainConfiguration", this.customDomainConfiguration); - jsonWriter.writeArrayField("workloadProfiles", this.workloadProfiles, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("kedaConfiguration", this.kedaConfiguration); - jsonWriter.writeJsonField("daprConfiguration", this.daprConfiguration); - jsonWriter.writeStringField("infrastructureResourceGroup", this.infrastructureResourceGroup); - jsonWriter.writeJsonField("peerAuthentication", this.peerAuthentication); - jsonWriter.writeJsonField("peerTrafficConfiguration", this.peerTrafficConfiguration); - jsonWriter.writeStringField("publicNetworkAccess", - this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedEnvironmentProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedEnvironmentProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedEnvironmentProperties. - */ - public static ManagedEnvironmentProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedEnvironmentProperties deserializedManagedEnvironmentProperties = new ManagedEnvironmentProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedManagedEnvironmentProperties.provisioningState - = EnvironmentProvisioningState.fromString(reader.getString()); - } else if ("daprAIInstrumentationKey".equals(fieldName)) { - deserializedManagedEnvironmentProperties.daprAIInstrumentationKey = reader.getString(); - } else if ("daprAIConnectionString".equals(fieldName)) { - deserializedManagedEnvironmentProperties.daprAIConnectionString = reader.getString(); - } else if ("vnetConfiguration".equals(fieldName)) { - deserializedManagedEnvironmentProperties.vnetConfiguration = VnetConfiguration.fromJson(reader); - } else if ("deploymentErrors".equals(fieldName)) { - deserializedManagedEnvironmentProperties.deploymentErrors = reader.getString(); - } else if ("defaultDomain".equals(fieldName)) { - deserializedManagedEnvironmentProperties.defaultDomain = reader.getString(); - } else if ("staticIp".equals(fieldName)) { - deserializedManagedEnvironmentProperties.staticIp = reader.getString(); - } else if ("appLogsConfiguration".equals(fieldName)) { - deserializedManagedEnvironmentProperties.appLogsConfiguration - = AppLogsConfiguration.fromJson(reader); - } else if ("appInsightsConfiguration".equals(fieldName)) { - deserializedManagedEnvironmentProperties.appInsightsConfiguration - = AppInsightsConfiguration.fromJson(reader); - } else if ("openTelemetryConfiguration".equals(fieldName)) { - deserializedManagedEnvironmentProperties.openTelemetryConfiguration - = OpenTelemetryConfiguration.fromJson(reader); - } else if ("zoneRedundant".equals(fieldName)) { - deserializedManagedEnvironmentProperties.zoneRedundant = reader.getNullable(JsonReader::getBoolean); - } else if ("customDomainConfiguration".equals(fieldName)) { - deserializedManagedEnvironmentProperties.customDomainConfiguration - = CustomDomainConfiguration.fromJson(reader); - } else if ("eventStreamEndpoint".equals(fieldName)) { - deserializedManagedEnvironmentProperties.eventStreamEndpoint = reader.getString(); - } else if ("workloadProfiles".equals(fieldName)) { - List workloadProfiles - = reader.readArray(reader1 -> WorkloadProfile.fromJson(reader1)); - deserializedManagedEnvironmentProperties.workloadProfiles = workloadProfiles; - } else if ("kedaConfiguration".equals(fieldName)) { - deserializedManagedEnvironmentProperties.kedaConfiguration = KedaConfiguration.fromJson(reader); - } else if ("daprConfiguration".equals(fieldName)) { - deserializedManagedEnvironmentProperties.daprConfiguration = DaprConfiguration.fromJson(reader); - } else if ("infrastructureResourceGroup".equals(fieldName)) { - deserializedManagedEnvironmentProperties.infrastructureResourceGroup = reader.getString(); - } else if ("peerAuthentication".equals(fieldName)) { - deserializedManagedEnvironmentProperties.peerAuthentication - = ManagedEnvironmentPropertiesPeerAuthentication.fromJson(reader); - } else if ("peerTrafficConfiguration".equals(fieldName)) { - deserializedManagedEnvironmentProperties.peerTrafficConfiguration - = ManagedEnvironmentPropertiesPeerTrafficConfiguration.fromJson(reader); - } else if ("privateEndpointConnections".equals(fieldName)) { - List privateEndpointConnections - = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); - deserializedManagedEnvironmentProperties.privateEndpointConnections = privateEndpointConnections; - } else if ("publicNetworkAccess".equals(fieldName)) { - deserializedManagedEnvironmentProperties.publicNetworkAccess - = PublicNetworkAccess.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedEnvironmentProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java deleted file mode 100644 index 47955d01bdbf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorageProperties; -import java.io.IOException; - -/** - * Storage resource for managedEnvironment. - */ -@Fluent -public final class ManagedEnvironmentStorageInner extends ProxyResource { - /* - * Storage properties - */ - private ManagedEnvironmentStorageProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ManagedEnvironmentStorageInner class. - */ - public ManagedEnvironmentStorageInner() { - } - - /** - * Get the properties property: Storage properties. - * - * @return the properties value. - */ - public ManagedEnvironmentStorageProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Storage properties. - * - * @param properties the properties value to set. - * @return the ManagedEnvironmentStorageInner object itself. - */ - public ManagedEnvironmentStorageInner withProperties(ManagedEnvironmentStorageProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedEnvironmentStorageInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedEnvironmentStorageInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ManagedEnvironmentStorageInner. - */ - public static ManagedEnvironmentStorageInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedEnvironmentStorageInner deserializedManagedEnvironmentStorageInner - = new ManagedEnvironmentStorageInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedManagedEnvironmentStorageInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedManagedEnvironmentStorageInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedManagedEnvironmentStorageInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedManagedEnvironmentStorageInner.properties - = ManagedEnvironmentStorageProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedManagedEnvironmentStorageInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedEnvironmentStorageInner; - }); - } -} 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 deleted file mode 100644 index ca0c960c9eab..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStoragesCollectionInner.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Collection of Storage for Environments. - */ -@Fluent -public final class ManagedEnvironmentStoragesCollectionInner - implements JsonSerializable { - /* - * Collection of storage resources. - */ - private List value; - - /** - * Creates an instance of ManagedEnvironmentStoragesCollectionInner class. - */ - public ManagedEnvironmentStoragesCollectionInner() { - } - - /** - * Get the value property: Collection of storage resources. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of storage resources. - * - * @param value the value value to set. - * @return the ManagedEnvironmentStoragesCollectionInner object itself. - */ - public ManagedEnvironmentStoragesCollectionInner withValue(List value) { - this.value = value; - 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 ManagedEnvironmentStoragesCollectionInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentStoragesCollectionInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedEnvironmentStoragesCollectionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedEnvironmentStoragesCollectionInner if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ManagedEnvironmentStoragesCollectionInner. - */ - public static ManagedEnvironmentStoragesCollectionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedEnvironmentStoragesCollectionInner deserializedManagedEnvironmentStoragesCollectionInner - = new ManagedEnvironmentStoragesCollectionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ManagedEnvironmentStorageInner.fromJson(reader1)); - deserializedManagedEnvironmentStoragesCollectionInner.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedEnvironmentStoragesCollectionInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/OperationDetailInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/OperationDetailInner.java deleted file mode 100644 index d67f73e58a9b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/OperationDetailInner.java +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; -import java.io.IOException; - -/** - * Operation detail payload. - */ -@Fluent -public final class OperationDetailInner implements JsonSerializable { - /* - * Name of the operation - */ - private String name; - - /* - * Indicates whether the operation is a data action - */ - private Boolean isDataAction; - - /* - * Display of the operation - */ - private OperationDisplay display; - - /* - * Origin of the operation - */ - private String origin; - - /** - * Creates an instance of OperationDetailInner class. - */ - public OperationDetailInner() { - } - - /** - * Get the name property: Name of the operation. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the operation. - * - * @param name the name value to set. - * @return the OperationDetailInner object itself. - */ - public OperationDetailInner withName(String name) { - this.name = name; - return this; - } - - /** - * Get the isDataAction property: Indicates whether the operation is a data action. - * - * @return the isDataAction value. - */ - public Boolean isDataAction() { - return this.isDataAction; - } - - /** - * Set the isDataAction property: Indicates whether the operation is a data action. - * - * @param isDataAction the isDataAction value to set. - * @return the OperationDetailInner object itself. - */ - public OperationDetailInner withIsDataAction(Boolean isDataAction) { - this.isDataAction = isDataAction; - return this; - } - - /** - * Get the display property: Display of the operation. - * - * @return the display value. - */ - public OperationDisplay display() { - return this.display; - } - - /** - * Set the display property: Display of the operation. - * - * @param display the display value to set. - * @return the OperationDetailInner object itself. - */ - public OperationDetailInner withDisplay(OperationDisplay display) { - this.display = display; - return this; - } - - /** - * Get the origin property: Origin of the operation. - * - * @return the origin value. - */ - public String origin() { - return this.origin; - } - - /** - * Set the origin property: Origin of the operation. - * - * @param origin the origin value to set. - * @return the OperationDetailInner object itself. - */ - public OperationDetailInner withOrigin(String origin) { - this.origin = origin; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (display() != null) { - display().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeBooleanField("isDataAction", this.isDataAction); - jsonWriter.writeJsonField("display", this.display); - jsonWriter.writeStringField("origin", this.origin); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationDetailInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationDetailInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationDetailInner. - */ - public static OperationDetailInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationDetailInner deserializedOperationDetailInner = new OperationDetailInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedOperationDetailInner.name = reader.getString(); - } else if ("isDataAction".equals(fieldName)) { - deserializedOperationDetailInner.isDataAction = reader.getNullable(JsonReader::getBoolean); - } else if ("display".equals(fieldName)) { - deserializedOperationDetailInner.display = OperationDisplay.fromJson(reader); - } else if ("origin".equals(fieldName)) { - deserializedOperationDetailInner.origin = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationDetailInner; - }); - } -} 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 deleted file mode 100644 index 31fb3366ed03..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateEndpointConnectionInner.java +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpoint; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnectionProvisioningState; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; -import java.io.IOException; -import java.util.List; - -/** - * The Private Endpoint Connection resource. - */ -@Fluent -public final class PrivateEndpointConnectionInner extends ProxyResource { - /* - * Resource properties. - */ - private PrivateEndpointConnectionProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of 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 type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the 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(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointConnectionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointConnectionInner if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PrivateEndpointConnectionInner. - */ - public static PrivateEndpointConnectionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointConnectionInner deserializedPrivateEndpointConnectionInner - = new PrivateEndpointConnectionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.innerProperties - = PrivateEndpointConnectionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedPrivateEndpointConnectionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointConnectionInner; - }); - } -} 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 deleted file mode 100644 index 6ccaf7bee389..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateEndpointConnectionProperties.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpoint; -import com.azure.resourcemanager.appcontainers.models.PrivateEndpointConnectionProvisioningState; -import com.azure.resourcemanager.appcontainers.models.PrivateLinkServiceConnectionState; -import java.io.IOException; -import java.util.List; - -/** - * Properties of the private endpoint connection. - */ -@Fluent -public final class PrivateEndpointConnectionProperties - implements JsonSerializable { - /* - * The group ids for the private endpoint resource. - */ - private List groupIds; - - /* - * The resource of private end point. - */ - private PrivateEndpoint privateEndpoint; - - /* - * A collection of information about the state of the connection between service consumer and provider. - */ - private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; - - /* - * The provisioning state of the private endpoint connection resource. - */ - 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); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("privateLinkServiceConnectionState", this.privateLinkServiceConnectionState); - jsonWriter.writeJsonField("privateEndpoint", this.privateEndpoint); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointConnectionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointConnectionProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PrivateEndpointConnectionProperties. - */ - public static PrivateEndpointConnectionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointConnectionProperties deserializedPrivateEndpointConnectionProperties - = new PrivateEndpointConnectionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("privateLinkServiceConnectionState".equals(fieldName)) { - deserializedPrivateEndpointConnectionProperties.privateLinkServiceConnectionState - = PrivateLinkServiceConnectionState.fromJson(reader); - } else if ("groupIds".equals(fieldName)) { - List groupIds = reader.readArray(reader1 -> reader1.getString()); - deserializedPrivateEndpointConnectionProperties.groupIds = groupIds; - } else if ("privateEndpoint".equals(fieldName)) { - deserializedPrivateEndpointConnectionProperties.privateEndpoint = PrivateEndpoint.fromJson(reader); - } else if ("provisioningState".equals(fieldName)) { - deserializedPrivateEndpointConnectionProperties.provisioningState - = PrivateEndpointConnectionProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointConnectionProperties; - }); - } -} 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 deleted file mode 100644 index 279169e080d7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateLinkResourceInner.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * A private link resource. - */ -@Fluent -public final class PrivateLinkResourceInner extends ProxyResource { - /* - * Resource properties. - */ - private PrivateLinkResourceProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of 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 type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the 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(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkResourceInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResourceInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PrivateLinkResourceInner. - */ - public static PrivateLinkResourceInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResourceInner deserializedPrivateLinkResourceInner = new PrivateLinkResourceInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateLinkResourceInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedPrivateLinkResourceInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedPrivateLinkResourceInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedPrivateLinkResourceInner.innerProperties - = PrivateLinkResourceProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedPrivateLinkResourceInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResourceInner; - }); - } -} 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 deleted file mode 100644 index f47ea4ff34d9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/PrivateLinkResourceProperties.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Properties of a private link resource. - */ -@Fluent -public final class PrivateLinkResourceProperties implements JsonSerializable { - /* - * The private link resource group id. - */ - private String groupId; - - /* - * The private link resource required member names. - */ - private List requiredMembers; - - /* - * The private link resource private link DNS zone name. - */ - private List requiredZoneNames; - - /** - * Creates an instance of PrivateLinkResourceProperties class. - */ - 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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("requiredZoneNames", this.requiredZoneNames, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkResourceProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResourceProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateLinkResourceProperties. - */ - public static PrivateLinkResourceProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResourceProperties deserializedPrivateLinkResourceProperties - = new PrivateLinkResourceProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("groupId".equals(fieldName)) { - deserializedPrivateLinkResourceProperties.groupId = reader.getString(); - } else if ("requiredMembers".equals(fieldName)) { - List requiredMembers = reader.readArray(reader1 -> reader1.getString()); - deserializedPrivateLinkResourceProperties.requiredMembers = requiredMembers; - } else if ("requiredZoneNames".equals(fieldName)) { - List requiredZoneNames = reader.readArray(reader1 -> reader1.getString()); - deserializedPrivateLinkResourceProperties.requiredZoneNames = requiredZoneNames; - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResourceProperties; - }); - } -} diff --git a/sdk/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 deleted file mode 100644 index fb0c68b00763..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaCollectionInner.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Container App Revision Replicas collection ARM resource. - */ -@Fluent -public final class ReplicaCollectionInner implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /** - * Creates an instance of ReplicaCollectionInner class. - */ - public ReplicaCollectionInner() { - } - - /** - * 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 ReplicaCollectionInner object itself. - */ - public ReplicaCollectionInner withValue(List value) { - this.value = value; - 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 ReplicaCollectionInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ReplicaCollectionInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicaCollectionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicaCollectionInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ReplicaCollectionInner. - */ - public static ReplicaCollectionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicaCollectionInner deserializedReplicaCollectionInner = new ReplicaCollectionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> ReplicaInner.fromJson(reader1)); - deserializedReplicaCollectionInner.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedReplicaCollectionInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java deleted file mode 100644 index 883cb069be6f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java +++ /dev/null @@ -1,231 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.ContainerAppReplicaRunningState; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Container App Revision Replica. - */ -@Fluent -public final class ReplicaInner extends ProxyResource { - /* - * Replica resource specific properties - */ - private ReplicaProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of ReplicaInner class. - */ - public ReplicaInner() { - } - - /** - * Get the innerProperties property: Replica resource specific properties. - * - * @return the innerProperties value. - */ - private ReplicaProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the createdTime property: Timestamp describing when the pod was created by controller. - * - * @return the createdTime value. - */ - public OffsetDateTime createdTime() { - return this.innerProperties() == null ? null : this.innerProperties().createdTime(); - } - - /** - * Get the runningState property: Current running state of the replica. - * - * @return the runningState value. - */ - public ContainerAppReplicaRunningState runningState() { - return this.innerProperties() == null ? null : this.innerProperties().runningState(); - } - - /** - * Get the runningStateDetails property: The details of replica current running state. - * - * @return the runningStateDetails value. - */ - public String runningStateDetails() { - return this.innerProperties() == null ? null : this.innerProperties().runningStateDetails(); - } - - /** - * Get the containers property: The containers collection under a replica. - * - * @return the containers value. - */ - public List containers() { - return this.innerProperties() == null ? null : this.innerProperties().containers(); - } - - /** - * Set the containers property: The containers collection under a replica. - * - * @param containers the containers value to set. - * @return the ReplicaInner object itself. - */ - public ReplicaInner withContainers(List containers) { - if (this.innerProperties() == null) { - this.innerProperties = new ReplicaProperties(); - } - this.innerProperties().withContainers(containers); - return this; - } - - /** - * Get the initContainers property: The init containers collection under a replica. - * - * @return the initContainers value. - */ - public List initContainers() { - return this.innerProperties() == null ? null : this.innerProperties().initContainers(); - } - - /** - * Set the initContainers property: The init containers collection under a replica. - * - * @param initContainers the initContainers value to set. - * @return the ReplicaInner object itself. - */ - public ReplicaInner withInitContainers(List initContainers) { - if (this.innerProperties() == null) { - this.innerProperties = new ReplicaProperties(); - } - this.innerProperties().withInitContainers(initContainers); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicaInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicaInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ReplicaInner. - */ - public static ReplicaInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicaInner deserializedReplicaInner = new ReplicaInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedReplicaInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedReplicaInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedReplicaInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedReplicaInner.innerProperties = ReplicaProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedReplicaInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicaInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaProperties.java deleted file mode 100644 index f2ba7088effc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaProperties.java +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (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.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.ContainerAppReplicaRunningState; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Replica resource specific properties. - */ -@Fluent -public final class ReplicaProperties implements JsonSerializable { - /* - * Timestamp describing when the pod was created by controller - */ - private OffsetDateTime createdTime; - - /* - * Current running state of the replica - */ - private ContainerAppReplicaRunningState runningState; - - /* - * The details of replica current running state - */ - private String runningStateDetails; - - /* - * The containers collection under a replica. - */ - private List containers; - - /* - * The init containers collection under a replica. - */ - private List initContainers; - - /** - * Creates an instance of ReplicaProperties class. - */ - public ReplicaProperties() { - } - - /** - * Get the createdTime property: Timestamp describing when the pod was created by controller. - * - * @return the createdTime value. - */ - public OffsetDateTime createdTime() { - return this.createdTime; - } - - /** - * Get the runningState property: Current running state of the replica. - * - * @return the runningState value. - */ - public ContainerAppReplicaRunningState runningState() { - return this.runningState; - } - - /** - * Get the runningStateDetails property: The details of replica current running state. - * - * @return the runningStateDetails value. - */ - public String runningStateDetails() { - return this.runningStateDetails; - } - - /** - * Get the containers property: The containers collection under a replica. - * - * @return the containers value. - */ - public List containers() { - return this.containers; - } - - /** - * Set the containers property: The containers collection under a replica. - * - * @param containers the containers value to set. - * @return the ReplicaProperties object itself. - */ - public ReplicaProperties withContainers(List containers) { - this.containers = containers; - return this; - } - - /** - * Get the initContainers property: The init containers collection under a replica. - * - * @return the initContainers value. - */ - public List initContainers() { - return this.initContainers; - } - - /** - * Set the initContainers property: The init containers collection under a replica. - * - * @param initContainers the initContainers value to set. - * @return the ReplicaProperties object itself. - */ - public ReplicaProperties withInitContainers(List initContainers) { - this.initContainers = initContainers; - 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()); - } - if (initContainers() != null) { - initContainers().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("containers", this.containers, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("initContainers", this.initContainers, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicaProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicaProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicaProperties. - */ - public static ReplicaProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicaProperties deserializedReplicaProperties = new ReplicaProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("createdTime".equals(fieldName)) { - deserializedReplicaProperties.createdTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("runningState".equals(fieldName)) { - deserializedReplicaProperties.runningState - = ContainerAppReplicaRunningState.fromString(reader.getString()); - } else if ("runningStateDetails".equals(fieldName)) { - deserializedReplicaProperties.runningStateDetails = reader.getString(); - } else if ("containers".equals(fieldName)) { - List containers = reader.readArray(reader1 -> ReplicaContainer.fromJson(reader1)); - deserializedReplicaProperties.containers = containers; - } else if ("initContainers".equals(fieldName)) { - List initContainers - = reader.readArray(reader1 -> ReplicaContainer.fromJson(reader1)); - deserializedReplicaProperties.initContainers = initContainers; - } else { - reader.skipChildren(); - } - } - - return deserializedReplicaProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java deleted file mode 100644 index 7e1d14ba2e14..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java +++ /dev/null @@ -1,262 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.RevisionHealthState; -import com.azure.resourcemanager.appcontainers.models.RevisionProvisioningState; -import com.azure.resourcemanager.appcontainers.models.RevisionRunningState; -import com.azure.resourcemanager.appcontainers.models.Template; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Container App Revision. - */ -@Immutable -public final class RevisionInner extends ProxyResource { - /* - * Revision resource specific properties - */ - private RevisionProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of RevisionInner class. - */ - public RevisionInner() { - } - - /** - * Get the innerProperties property: Revision resource specific properties. - * - * @return the innerProperties value. - */ - private RevisionProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the createdTime property: Timestamp describing when the revision was created - * by controller. - * - * @return the createdTime value. - */ - public OffsetDateTime createdTime() { - return this.innerProperties() == null ? null : this.innerProperties().createdTime(); - } - - /** - * Get the lastActiveTime property: Timestamp describing when the revision was last active. Only meaningful when - * revision is inactive. - * - * @return the lastActiveTime value. - */ - public OffsetDateTime lastActiveTime() { - return this.innerProperties() == null ? null : this.innerProperties().lastActiveTime(); - } - - /** - * Get the fqdn property: Fully qualified domain name of the revision. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.innerProperties() == null ? null : this.innerProperties().fqdn(); - } - - /** - * Get the template property: Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated - * as they were at the creation time. - * - * @return the template value. - */ - public Template template() { - return this.innerProperties() == null ? null : this.innerProperties().template(); - } - - /** - * Get the active property: Boolean describing if the Revision is Active. - * - * @return the active value. - */ - public Boolean active() { - return this.innerProperties() == null ? null : this.innerProperties().active(); - } - - /** - * Get the replicas property: Number of pods currently running for this revision. - * - * @return the replicas value. - */ - public Integer replicas() { - return this.innerProperties() == null ? null : this.innerProperties().replicas(); - } - - /** - * Get the trafficWeight property: Traffic weight assigned to this revision. - * - * @return the trafficWeight value. - */ - public Integer trafficWeight() { - return this.innerProperties() == null ? null : this.innerProperties().trafficWeight(); - } - - /** - * Get the provisioningError property: Optional Field - Platform Error Message. - * - * @return the provisioningError value. - */ - public String provisioningError() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningError(); - } - - /** - * Get the healthState property: Current health State of the revision. - * - * @return the healthState value. - */ - public RevisionHealthState healthState() { - return this.innerProperties() == null ? null : this.innerProperties().healthState(); - } - - /** - * Get the provisioningState property: Current provisioning State of the revision. - * - * @return the provisioningState value. - */ - public RevisionProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the runningState property: Current running state of the revision. - * - * @return the runningState value. - */ - public RevisionRunningState runningState() { - return this.innerProperties() == null ? null : this.innerProperties().runningState(); - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RevisionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RevisionInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RevisionInner. - */ - public static RevisionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RevisionInner deserializedRevisionInner = new RevisionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedRevisionInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedRevisionInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedRevisionInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedRevisionInner.innerProperties = RevisionProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedRevisionInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRevisionInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionProperties.java deleted file mode 100644 index 29f8e0525ebb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionProperties.java +++ /dev/null @@ -1,260 +0,0 @@ -// Copyright (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.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.RevisionHealthState; -import com.azure.resourcemanager.appcontainers.models.RevisionProvisioningState; -import com.azure.resourcemanager.appcontainers.models.RevisionRunningState; -import com.azure.resourcemanager.appcontainers.models.Template; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Revision resource specific properties. - */ -@Immutable -public final class RevisionProperties implements JsonSerializable { - /* - * Timestamp describing when the revision was created - * by controller - */ - private OffsetDateTime createdTime; - - /* - * Timestamp describing when the revision was last active. Only meaningful when revision is inactive - */ - private OffsetDateTime lastActiveTime; - - /* - * Fully qualified domain name of the revision - */ - private String fqdn; - - /* - * Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated - * as they were at the creation time - */ - private Template template; - - /* - * Boolean describing if the Revision is Active - */ - private Boolean active; - - /* - * Number of pods currently running for this revision - */ - private Integer replicas; - - /* - * Traffic weight assigned to this revision - */ - private Integer trafficWeight; - - /* - * Optional Field - Platform Error Message - */ - private String provisioningError; - - /* - * Current health State of the revision - */ - private RevisionHealthState healthState; - - /* - * Current provisioning State of the revision - */ - private RevisionProvisioningState provisioningState; - - /* - * Current running state of the revision - */ - private RevisionRunningState runningState; - - /** - * Creates an instance of RevisionProperties class. - */ - public RevisionProperties() { - } - - /** - * Get the createdTime property: Timestamp describing when the revision was created - * by controller. - * - * @return the createdTime value. - */ - public OffsetDateTime createdTime() { - return this.createdTime; - } - - /** - * Get the lastActiveTime property: Timestamp describing when the revision was last active. Only meaningful when - * revision is inactive. - * - * @return the lastActiveTime value. - */ - public OffsetDateTime lastActiveTime() { - return this.lastActiveTime; - } - - /** - * Get the fqdn property: Fully qualified domain name of the revision. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Get the template property: Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated - * as they were at the creation time. - * - * @return the template value. - */ - public Template template() { - return this.template; - } - - /** - * Get the active property: Boolean describing if the Revision is Active. - * - * @return the active value. - */ - public Boolean active() { - return this.active; - } - - /** - * Get the replicas property: Number of pods currently running for this revision. - * - * @return the replicas value. - */ - public Integer replicas() { - return this.replicas; - } - - /** - * Get the trafficWeight property: Traffic weight assigned to this revision. - * - * @return the trafficWeight value. - */ - public Integer trafficWeight() { - return this.trafficWeight; - } - - /** - * Get the provisioningError property: Optional Field - Platform Error Message. - * - * @return the provisioningError value. - */ - public String provisioningError() { - return this.provisioningError; - } - - /** - * Get the healthState property: Current health State of the revision. - * - * @return the healthState value. - */ - public RevisionHealthState healthState() { - return this.healthState; - } - - /** - * Get the provisioningState property: Current provisioning State of the revision. - * - * @return the provisioningState value. - */ - public RevisionProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the runningState property: Current running state of the revision. - * - * @return the runningState value. - */ - public RevisionRunningState runningState() { - return this.runningState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (template() != null) { - template().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RevisionProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RevisionProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the RevisionProperties. - */ - public static RevisionProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RevisionProperties deserializedRevisionProperties = new RevisionProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("createdTime".equals(fieldName)) { - deserializedRevisionProperties.createdTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastActiveTime".equals(fieldName)) { - deserializedRevisionProperties.lastActiveTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("fqdn".equals(fieldName)) { - deserializedRevisionProperties.fqdn = reader.getString(); - } else if ("template".equals(fieldName)) { - deserializedRevisionProperties.template = Template.fromJson(reader); - } else if ("active".equals(fieldName)) { - deserializedRevisionProperties.active = reader.getNullable(JsonReader::getBoolean); - } else if ("replicas".equals(fieldName)) { - deserializedRevisionProperties.replicas = reader.getNullable(JsonReader::getInt); - } else if ("trafficWeight".equals(fieldName)) { - deserializedRevisionProperties.trafficWeight = reader.getNullable(JsonReader::getInt); - } else if ("provisioningError".equals(fieldName)) { - deserializedRevisionProperties.provisioningError = reader.getString(); - } else if ("healthState".equals(fieldName)) { - deserializedRevisionProperties.healthState = RevisionHealthState.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedRevisionProperties.provisioningState - = RevisionProvisioningState.fromString(reader.getString()); - } else if ("runningState".equals(fieldName)) { - deserializedRevisionProperties.runningState = RevisionRunningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedRevisionProperties; - }); - } -} 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 deleted file mode 100644 index 89c90347637c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SecretsCollectionInner.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.ContainerAppSecret; -import java.io.IOException; -import java.util.List; - -/** - * Container App Secrets Collection ARM resource. - */ -@Fluent -public final class SecretsCollectionInner implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /** - * Creates an instance of SecretsCollectionInner class. - */ - public SecretsCollectionInner() { - } - - /** - * 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 SecretsCollectionInner object itself. - */ - public SecretsCollectionInner withValue(List value) { - this.value = value; - 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 SecretsCollectionInner")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SecretsCollectionInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SecretsCollectionInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SecretsCollectionInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SecretsCollectionInner. - */ - public static SecretsCollectionInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SecretsCollectionInner deserializedSecretsCollectionInner = new SecretsCollectionInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> ContainerAppSecret.fromJson(reader1)); - deserializedSecretsCollectionInner.value = value; - } else { - reader.skipChildren(); - } - } - - return deserializedSecretsCollectionInner; - }); - } -} 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 deleted file mode 100644 index a75e266bb165..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolInner.java +++ /dev/null @@ -1,402 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -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.SessionNetworkConfiguration; -import com.azure.resourcemanager.appcontainers.models.SessionPoolProvisioningState; -import com.azure.resourcemanager.appcontainers.models.SessionPoolSecret; -import java.io.IOException; -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 - */ - private SessionPoolProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of 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; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * {@inheritDoc} - */ - @Override - public 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(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", location()); - jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SessionPoolInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SessionPoolInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SessionPoolInner. - */ - public static SessionPoolInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SessionPoolInner deserializedSessionPoolInner = new SessionPoolInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedSessionPoolInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedSessionPoolInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedSessionPoolInner.type = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedSessionPoolInner.withLocation(reader.getString()); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedSessionPoolInner.withTags(tags); - } else if ("properties".equals(fieldName)) { - deserializedSessionPoolInner.innerProperties = SessionPoolProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedSessionPoolInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSessionPoolInner; - }); - } -} 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 deleted file mode 100644 index 02214a703a37..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolProperties.java +++ /dev/null @@ -1,371 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -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.SessionNetworkConfiguration; -import com.azure.resourcemanager.appcontainers.models.SessionPoolProvisioningState; -import com.azure.resourcemanager.appcontainers.models.SessionPoolSecret; -import java.io.IOException; -import java.util.List; - -/** - * Container App session pool resource specific properties. - */ -@Fluent -public final class SessionPoolProperties implements JsonSerializable { - /* - * Resource ID of the session pool's environment. - */ - private String environmentId; - - /* - * The container type of the sessions. - */ - private ContainerType containerType; - - /* - * The pool management type of the session pool. - */ - private PoolManagementType poolManagementType; - - /* - * The number of nodes the session pool is using. - */ - private Integer nodeCount; - - /* - * The scale configuration of the session pool. - */ - private ScaleConfiguration scaleConfiguration; - - /* - * The secrets of the session pool. - */ - private List secrets; - - /* - * The pool configuration if the poolManagementType is dynamic. - */ - private DynamicPoolConfiguration dynamicPoolConfiguration; - - /* - * The custom container configuration if the containerType is CustomContainer. - */ - private CustomContainerTemplate customContainerTemplate; - - /* - * The network configuration of the sessions in the session pool. - */ - private SessionNetworkConfiguration sessionNetworkConfiguration; - - /* - * The endpoint to manage the pool. - */ - private String poolManagementEndpoint; - - /* - * Provisioning state of the session pool. - */ - 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(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("environmentId", this.environmentId); - jsonWriter.writeStringField("containerType", this.containerType == null ? null : this.containerType.toString()); - jsonWriter.writeStringField("poolManagementType", - this.poolManagementType == null ? null : this.poolManagementType.toString()); - jsonWriter.writeJsonField("scaleConfiguration", this.scaleConfiguration); - jsonWriter.writeArrayField("secrets", this.secrets, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("dynamicPoolConfiguration", this.dynamicPoolConfiguration); - jsonWriter.writeJsonField("customContainerTemplate", this.customContainerTemplate); - jsonWriter.writeJsonField("sessionNetworkConfiguration", this.sessionNetworkConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SessionPoolProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SessionPoolProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the SessionPoolProperties. - */ - public static SessionPoolProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SessionPoolProperties deserializedSessionPoolProperties = new SessionPoolProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("environmentId".equals(fieldName)) { - deserializedSessionPoolProperties.environmentId = reader.getString(); - } else if ("containerType".equals(fieldName)) { - deserializedSessionPoolProperties.containerType = ContainerType.fromString(reader.getString()); - } else if ("poolManagementType".equals(fieldName)) { - deserializedSessionPoolProperties.poolManagementType - = PoolManagementType.fromString(reader.getString()); - } else if ("nodeCount".equals(fieldName)) { - deserializedSessionPoolProperties.nodeCount = reader.getNullable(JsonReader::getInt); - } else if ("scaleConfiguration".equals(fieldName)) { - deserializedSessionPoolProperties.scaleConfiguration = ScaleConfiguration.fromJson(reader); - } else if ("secrets".equals(fieldName)) { - List secrets = reader.readArray(reader1 -> SessionPoolSecret.fromJson(reader1)); - deserializedSessionPoolProperties.secrets = secrets; - } else if ("dynamicPoolConfiguration".equals(fieldName)) { - deserializedSessionPoolProperties.dynamicPoolConfiguration - = DynamicPoolConfiguration.fromJson(reader); - } else if ("customContainerTemplate".equals(fieldName)) { - deserializedSessionPoolProperties.customContainerTemplate - = CustomContainerTemplate.fromJson(reader); - } else if ("sessionNetworkConfiguration".equals(fieldName)) { - deserializedSessionPoolProperties.sessionNetworkConfiguration - = SessionNetworkConfiguration.fromJson(reader); - } else if ("poolManagementEndpoint".equals(fieldName)) { - deserializedSessionPoolProperties.poolManagementEndpoint = reader.getString(); - } else if ("provisioningState".equals(fieldName)) { - deserializedSessionPoolProperties.provisioningState - = SessionPoolProvisioningState.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSessionPoolProperties; - }); - } -} 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 deleted file mode 100644 index d826fa30dd3e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SessionPoolUpdatablePropertiesProperties.java +++ /dev/null @@ -1,238 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -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.SessionNetworkConfiguration; -import com.azure.resourcemanager.appcontainers.models.SessionPoolSecret; -import java.io.IOException; -import java.util.List; - -/** - * Session pool resource specific updatable properties. - */ -@Fluent -public final class SessionPoolUpdatablePropertiesProperties - implements JsonSerializable { - /* - * The scale configuration of the session pool. - */ - private ScaleConfiguration scaleConfiguration; - - /* - * The secrets of the session pool. - */ - private List secrets; - - /* - * The pool configuration if the poolManagementType is dynamic. - */ - private DynamicPoolConfiguration dynamicPoolConfiguration; - - /* - * The custom container configuration if the containerType is CustomContainer. - */ - private CustomContainerTemplate customContainerTemplate; - - /* - * The network configuration of the sessions in the session pool. - */ - 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(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("scaleConfiguration", this.scaleConfiguration); - jsonWriter.writeArrayField("secrets", this.secrets, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("dynamicPoolConfiguration", this.dynamicPoolConfiguration); - jsonWriter.writeJsonField("customContainerTemplate", this.customContainerTemplate); - jsonWriter.writeJsonField("sessionNetworkConfiguration", this.sessionNetworkConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SessionPoolUpdatablePropertiesProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SessionPoolUpdatablePropertiesProperties if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SessionPoolUpdatablePropertiesProperties. - */ - public static SessionPoolUpdatablePropertiesProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SessionPoolUpdatablePropertiesProperties deserializedSessionPoolUpdatablePropertiesProperties - = new SessionPoolUpdatablePropertiesProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scaleConfiguration".equals(fieldName)) { - deserializedSessionPoolUpdatablePropertiesProperties.scaleConfiguration - = ScaleConfiguration.fromJson(reader); - } else if ("secrets".equals(fieldName)) { - List secrets = reader.readArray(reader1 -> SessionPoolSecret.fromJson(reader1)); - deserializedSessionPoolUpdatablePropertiesProperties.secrets = secrets; - } else if ("dynamicPoolConfiguration".equals(fieldName)) { - deserializedSessionPoolUpdatablePropertiesProperties.dynamicPoolConfiguration - = DynamicPoolConfiguration.fromJson(reader); - } else if ("customContainerTemplate".equals(fieldName)) { - deserializedSessionPoolUpdatablePropertiesProperties.customContainerTemplate - = CustomContainerTemplate.fromJson(reader); - } else if ("sessionNetworkConfiguration".equals(fieldName)) { - deserializedSessionPoolUpdatablePropertiesProperties.sessionNetworkConfiguration - = SessionNetworkConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSessionPoolUpdatablePropertiesProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlInner.java deleted file mode 100644 index 21c58f99bc1e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlInner.java +++ /dev/null @@ -1,238 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; -import com.azure.resourcemanager.appcontainers.models.SourceControlOperationState; -import java.io.IOException; - -/** - * Container App SourceControl. - */ -@Fluent -public final class SourceControlInner extends ProxyResource { - /* - * SourceControl resource specific properties - */ - private SourceControlProperties innerProperties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of SourceControlInner class. - */ - public SourceControlInner() { - } - - /** - * Get the innerProperties property: SourceControl resource specific properties. - * - * @return the innerProperties value. - */ - private SourceControlProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Get the operationState property: Current provisioning State of the operation. - * - * @return the operationState value. - */ - public SourceControlOperationState operationState() { - return this.innerProperties() == null ? null : this.innerProperties().operationState(); - } - - /** - * Get the repoUrl property: The repo url which will be integrated to ContainerApp. - * - * @return the repoUrl value. - */ - public String repoUrl() { - return this.innerProperties() == null ? null : this.innerProperties().repoUrl(); - } - - /** - * Set the repoUrl property: The repo url which will be integrated to ContainerApp. - * - * @param repoUrl the repoUrl value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withRepoUrl(String repoUrl) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withRepoUrl(repoUrl); - return this; - } - - /** - * Get the branch property: The branch which will trigger the auto deployment. - * - * @return the branch value. - */ - public String branch() { - return this.innerProperties() == null ? null : this.innerProperties().branch(); - } - - /** - * Set the branch property: The branch which will trigger the auto deployment. - * - * @param branch the branch value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withBranch(String branch) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withBranch(branch); - return this; - } - - /** - * Get the githubActionConfiguration property: Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated - * as they were at the creation time. - * - * @return the githubActionConfiguration value. - */ - public GithubActionConfiguration githubActionConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().githubActionConfiguration(); - } - - /** - * Set the githubActionConfiguration property: Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated - * as they were at the creation time. - * - * @param githubActionConfiguration the githubActionConfiguration value to set. - * @return the SourceControlInner object itself. - */ - public SourceControlInner withGithubActionConfiguration(GithubActionConfiguration githubActionConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new SourceControlProperties(); - } - this.innerProperties().withGithubActionConfiguration(githubActionConfiguration); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SourceControlInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SourceControlInner if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SourceControlInner. - */ - public static SourceControlInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SourceControlInner deserializedSourceControlInner = new SourceControlInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedSourceControlInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedSourceControlInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedSourceControlInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedSourceControlInner.innerProperties = SourceControlProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedSourceControlInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSourceControlInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlProperties.java deleted file mode 100644 index 798cb258d277..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlProperties.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; -import com.azure.resourcemanager.appcontainers.models.SourceControlOperationState; -import java.io.IOException; - -/** - * SourceControl resource specific properties. - */ -@Fluent -public final class SourceControlProperties implements JsonSerializable { - /* - * Current provisioning State of the operation - */ - private SourceControlOperationState operationState; - - /* - * The repo url which will be integrated to ContainerApp. - */ - private String repoUrl; - - /* - * The branch which will trigger the auto deployment - */ - private String branch; - - /* - * Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated - * as they were at the creation time - */ - private GithubActionConfiguration githubActionConfiguration; - - /** - * Creates an instance of SourceControlProperties class. - */ - public SourceControlProperties() { - } - - /** - * Get the operationState property: Current provisioning State of the operation. - * - * @return the operationState value. - */ - public SourceControlOperationState operationState() { - return this.operationState; - } - - /** - * Get the repoUrl property: The repo url which will be integrated to ContainerApp. - * - * @return the repoUrl value. - */ - public String repoUrl() { - return this.repoUrl; - } - - /** - * Set the repoUrl property: The repo url which will be integrated to ContainerApp. - * - * @param repoUrl the repoUrl value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withRepoUrl(String repoUrl) { - this.repoUrl = repoUrl; - return this; - } - - /** - * Get the branch property: The branch which will trigger the auto deployment. - * - * @return the branch value. - */ - public String branch() { - return this.branch; - } - - /** - * Set the branch property: The branch which will trigger the auto deployment. - * - * @param branch the branch value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withBranch(String branch) { - this.branch = branch; - return this; - } - - /** - * Get the githubActionConfiguration property: Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated - * as they were at the creation time. - * - * @return the githubActionConfiguration value. - */ - public GithubActionConfiguration githubActionConfiguration() { - return this.githubActionConfiguration; - } - - /** - * Set the githubActionConfiguration property: Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated - * as they were at the creation time. - * - * @param githubActionConfiguration the githubActionConfiguration value to set. - * @return the SourceControlProperties object itself. - */ - public SourceControlProperties withGithubActionConfiguration(GithubActionConfiguration githubActionConfiguration) { - this.githubActionConfiguration = githubActionConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (githubActionConfiguration() != null) { - githubActionConfiguration().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("repoUrl", this.repoUrl); - jsonWriter.writeStringField("branch", this.branch); - jsonWriter.writeJsonField("githubActionConfiguration", this.githubActionConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SourceControlProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SourceControlProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the SourceControlProperties. - */ - public static SourceControlProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SourceControlProperties deserializedSourceControlProperties = new SourceControlProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("operationState".equals(fieldName)) { - deserializedSourceControlProperties.operationState - = SourceControlOperationState.fromString(reader.getString()); - } else if ("repoUrl".equals(fieldName)) { - deserializedSourceControlProperties.repoUrl = reader.getString(); - } else if ("branch".equals(fieldName)) { - deserializedSourceControlProperties.branch = reader.getString(); - } else if ("githubActionConfiguration".equals(fieldName)) { - deserializedSourceControlProperties.githubActionConfiguration - = GithubActionConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSourceControlProperties; - }); - } -} 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 deleted file mode 100644 index 652f2a4fc567..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/UsageInner.java +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.UsageName; -import java.io.IOException; - -/** - * Describes Compute Resource Usage. - */ -@Fluent -public final class UsageInner implements JsonSerializable { - /* - * An enum describing the unit of usage measurement. - */ - private String unit = "Count"; - - /* - * The current usage of the resource. - */ - private float currentValue; - - /* - * The maximum permitted usage of the resource. - */ - private float limit; - - /* - * The name of the type of usage. - */ - private UsageName name; - - /** - * Creates an instance of UsageInner class. - */ - public UsageInner() { - } - - /** - * Get the unit property: An enum describing the unit of usage measurement. - * - * @return the unit value. - */ - public String unit() { - return this.unit; - } - - /** - * Set the unit property: An enum describing the unit of usage measurement. - * - * @param unit the unit value to set. - * @return the UsageInner object itself. - */ - public UsageInner withUnit(String unit) { - this.unit = unit; - return this; - } - - /** - * Get the currentValue property: The current usage of the resource. - * - * @return the currentValue value. - */ - public float currentValue() { - return this.currentValue; - } - - /** - * Set the currentValue property: The current usage of the resource. - * - * @param currentValue the currentValue value to set. - * @return the UsageInner object itself. - */ - public UsageInner withCurrentValue(float currentValue) { - this.currentValue = currentValue; - return this; - } - - /** - * Get the limit property: The maximum permitted usage of the resource. - * - * @return the limit value. - */ - public float limit() { - return this.limit; - } - - /** - * Set the limit property: The maximum permitted usage of the resource. - * - * @param limit the limit value to set. - * @return the UsageInner object itself. - */ - public UsageInner withLimit(float limit) { - this.limit = limit; - return this; - } - - /** - * Get the name property: The name of the type of usage. - * - * @return the name value. - */ - public UsageName name() { - return this.name; - } - - /** - * Set the name property: The name of the type of usage. - * - * @param name the name value to set. - * @return the UsageInner object itself. - */ - public UsageInner withName(UsageName name) { - this.name = name; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model UsageInner")); - } else { - name().validate(); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(UsageInner.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("unit", this.unit); - jsonWriter.writeFloatField("currentValue", this.currentValue); - jsonWriter.writeFloatField("limit", this.limit); - jsonWriter.writeJsonField("name", this.name); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of UsageInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of UsageInner if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the UsageInner. - */ - public static UsageInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - UsageInner deserializedUsageInner = new UsageInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("currentValue".equals(fieldName)) { - deserializedUsageInner.currentValue = reader.getFloat(); - } else if ("limit".equals(fieldName)) { - deserializedUsageInner.limit = reader.getFloat(); - } else if ("name".equals(fieldName)) { - deserializedUsageInner.name = UsageName.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedUsageInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkflowEnvelopeInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkflowEnvelopeInner.java deleted file mode 100644 index ed3a7ea4427c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkflowEnvelopeInner.java +++ /dev/null @@ -1,201 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.WorkflowEnvelopeProperties; -import java.io.IOException; - -/** - * Workflow properties definition. - */ -@Fluent -public final class WorkflowEnvelopeInner implements JsonSerializable { - /* - * The resource id. - */ - private String id; - - /* - * Gets the resource name. - */ - private String name; - - /* - * Gets the resource type. - */ - private String type; - - /* - * The resource kind. - */ - private String kind; - - /* - * The resource location. - */ - private String location; - - /* - * Additional workflow properties. - */ - private WorkflowEnvelopeProperties properties; - - /** - * Creates an instance of WorkflowEnvelopeInner class. - */ - public WorkflowEnvelopeInner() { - } - - /** - * Get the id property: The resource id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: Gets the resource name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the type property: Gets the resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the kind property: The resource kind. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: The resource kind. - * - * @param kind the kind value to set. - * @return the WorkflowEnvelopeInner object itself. - */ - public WorkflowEnvelopeInner withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the location property: The resource location. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: The resource location. - * - * @param location the location value to set. - * @return the WorkflowEnvelopeInner object itself. - */ - public WorkflowEnvelopeInner withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the properties property: Additional workflow properties. - * - * @return the properties value. - */ - public WorkflowEnvelopeProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Additional workflow properties. - * - * @param properties the properties value to set. - * @return the WorkflowEnvelopeInner object itself. - */ - public WorkflowEnvelopeInner withProperties(WorkflowEnvelopeProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("kind", this.kind); - jsonWriter.writeStringField("location", this.location); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkflowEnvelopeInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkflowEnvelopeInner if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the WorkflowEnvelopeInner. - */ - public static WorkflowEnvelopeInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkflowEnvelopeInner deserializedWorkflowEnvelopeInner = new WorkflowEnvelopeInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedWorkflowEnvelopeInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedWorkflowEnvelopeInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedWorkflowEnvelopeInner.type = reader.getString(); - } else if ("kind".equals(fieldName)) { - deserializedWorkflowEnvelopeInner.kind = reader.getString(); - } else if ("location".equals(fieldName)) { - deserializedWorkflowEnvelopeInner.location = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedWorkflowEnvelopeInner.properties = WorkflowEnvelopeProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkflowEnvelopeInner; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkloadProfileStatesInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkloadProfileStatesInner.java deleted file mode 100644 index 3bbd9fb5cca5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkloadProfileStatesInner.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; -import java.io.IOException; - -/** - * Collection of all the workload Profile States for a Managed Environment.. - */ -@Fluent -public final class WorkloadProfileStatesInner extends ProxyResource { - /* - * Workload Profile resource specific properties. - */ - private WorkloadProfileStatesProperties properties; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * The type of the resource. - */ - private String type; - - /* - * The name of the resource. - */ - private String name; - - /* - * Fully qualified resource Id for the resource. - */ - private String id; - - /** - * Creates an instance of WorkloadProfileStatesInner class. - */ - public WorkloadProfileStatesInner() { - } - - /** - * Get the properties property: Workload Profile resource specific properties. - * - * @return the properties value. - */ - public WorkloadProfileStatesProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Workload Profile resource specific properties. - * - * @param properties the properties value to set. - * @return the WorkloadProfileStatesInner object itself. - */ - public WorkloadProfileStatesInner withProperties(WorkloadProfileStatesProperties properties) { - this.properties = properties; - return this; - } - - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the type property: The type of the resource. - * - * @return the type value. - */ - @Override - public String type() { - return this.type; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - @Override - public String name() { - return this.name; - } - - /** - * Get the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - @Override - public String id() { - return this.id; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of WorkloadProfileStatesInner from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of WorkloadProfileStatesInner if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the WorkloadProfileStatesInner. - */ - public static WorkloadProfileStatesInner fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - WorkloadProfileStatesInner deserializedWorkloadProfileStatesInner = new WorkloadProfileStatesInner(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedWorkloadProfileStatesInner.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedWorkloadProfileStatesInner.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedWorkloadProfileStatesInner.type = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedWorkloadProfileStatesInner.properties - = WorkloadProfileStatesProperties.fromJson(reader); - } else if ("systemData".equals(fieldName)) { - deserializedWorkloadProfileStatesInner.systemData = SystemData.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedWorkloadProfileStatesInner; - }); - } -} 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 deleted file mode 100644 index f87287ab52d0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the inner data models for ContainerAppsApiClient. - * 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 deleted file mode 100644 index 0eba2fe983f2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the service clients for ContainerAppsApiClient. - * 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 deleted file mode 100644 index e117050a35fb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesClientImpl.java +++ /dev/null @@ -1,926 +0,0 @@ -// Copyright (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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.AppResilienciesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.AppResiliencyInner; -import com.azure.resourcemanager.appcontainers.models.AppResiliencyCollection; -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 AppResilienciesClient. - */ -public final class AppResilienciesClientImpl implements AppResilienciesClient { - /** - * The proxy service used to perform REST calls. - */ - private final AppResilienciesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of AppResilienciesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - AppResilienciesClientImpl(ContainerAppsApiClientImpl client) { - this.service - = RestProxy.create(AppResilienciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientAppResiliencies to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface AppResilienciesService { - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AppResiliencyInner resiliencyEnvelope, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AppResiliencyInner resiliencyEnvelope, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Create or update an application's resiliency policy. - * - * Create or update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to create or update. - * @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 configuration to setup App Resiliency along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String appName, - String name, AppResiliencyInner resiliencyEnvelope) { - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (resiliencyEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter resiliencyEnvelope is required and cannot be null.")); - } else { - resiliencyEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, appName, name, this.client.getApiVersion(), resiliencyEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update an application's resiliency policy. - * - * Create or update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to create or update. - * @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 configuration to setup App Resiliency along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String appName, - String name, AppResiliencyInner resiliencyEnvelope, 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (resiliencyEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter resiliencyEnvelope is required and cannot be null.")); - } else { - resiliencyEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - appName, name, this.client.getApiVersion(), resiliencyEnvelope, accept, context); - } - - /** - * Create or update an application's resiliency policy. - * - * Create or update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to create or update. - * @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 configuration to setup App Resiliency on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String appName, String name, - AppResiliencyInner resiliencyEnvelope) { - return createOrUpdateWithResponseAsync(resourceGroupName, appName, name, resiliencyEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update an application's resiliency policy. - * - * Create or update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to create or update. - * @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 configuration to setup App Resiliency along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String appName, - String name, AppResiliencyInner resiliencyEnvelope, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, appName, name, resiliencyEnvelope, context).block(); - } - - /** - * Create or update an application's resiliency policy. - * - * Create or update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to create or update. - * @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 configuration to setup App Resiliency. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AppResiliencyInner createOrUpdate(String resourceGroupName, String appName, String name, - AppResiliencyInner resiliencyEnvelope) { - return createOrUpdateWithResponse(resourceGroupName, appName, name, resiliencyEnvelope, Context.NONE) - .getValue(); - } - - /** - * Update an application's resiliency policy. - * - * Update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to update. - * @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 configuration to setup App Resiliency along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String appName, - String name, AppResiliencyInner resiliencyEnvelope) { - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (resiliencyEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter resiliencyEnvelope is required and cannot be null.")); - } else { - resiliencyEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, appName, name, this.client.getApiVersion(), resiliencyEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update an application's resiliency policy. - * - * Update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to update. - * @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 configuration to setup App Resiliency along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String appName, - String name, AppResiliencyInner resiliencyEnvelope, 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (resiliencyEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter resiliencyEnvelope is required and cannot be null.")); - } else { - resiliencyEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, appName, - name, this.client.getApiVersion(), resiliencyEnvelope, accept, context); - } - - /** - * Update an application's resiliency policy. - * - * Update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to update. - * @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 configuration to setup App Resiliency on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String appName, String name, - AppResiliencyInner resiliencyEnvelope) { - return updateWithResponseAsync(resourceGroupName, appName, name, resiliencyEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update an application's resiliency policy. - * - * Update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to update. - * @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 configuration to setup App Resiliency along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String appName, String name, - AppResiliencyInner resiliencyEnvelope, Context context) { - return updateWithResponseAsync(resourceGroupName, appName, name, resiliencyEnvelope, context).block(); - } - - /** - * Update an application's resiliency policy. - * - * Update container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @param resiliencyEnvelope The resiliency policy to update. - * @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 configuration to setup App Resiliency. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AppResiliencyInner update(String resourceGroupName, String appName, String name, - AppResiliencyInner resiliencyEnvelope) { - return updateWithResponse(resourceGroupName, appName, name, resiliencyEnvelope, Context.NONE).getValue(); - } - - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @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 appName, String name) { - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, appName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @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 appName, String name, - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, appName, - name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @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 appName, String name) { - return deleteWithResponseAsync(resourceGroupName, appName, name).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String appName, String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, appName, name, context).block(); - } - - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @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 appName, String name) { - deleteWithResponse(resourceGroupName, appName, name, Context.NONE); - } - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @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 resiliency policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String appName, - String name) { - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, appName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @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 resiliency policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String appName, - String name, 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, appName, name, - this.client.getApiVersion(), accept, context); - } - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @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 resiliency policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String appName, String name) { - return getWithResponseAsync(resourceGroupName, appName, name).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @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 resiliency policy along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String appName, String name, - Context context) { - return getWithResponseAsync(resourceGroupName, appName, name, context).block(); - } - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @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 resiliency policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AppResiliencyInner get(String resourceGroupName, String appName, String name) { - return getWithResponse(resourceGroupName, appName, name, Context.NONE).getValue(); - } - - /** - * List an application's resiliency policies. - * - * List container app resiliency policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @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 collection of AppResiliency policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String appName) { - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, appName, 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 an application's resiliency policies. - * - * List container app resiliency policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @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 collection of AppResiliency policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String appName, - 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 (appName == null) { - return Mono.error(new IllegalArgumentException("Parameter appName 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, appName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List an application's resiliency policies. - * - * List container app resiliency policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @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 collection of AppResiliency policies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String appName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, appName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List an application's resiliency policies. - * - * List container app resiliency policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @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 collection of AppResiliency policies as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String appName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, appName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List an application's resiliency policies. - * - * List container app resiliency policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @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 collection of AppResiliency policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String appName) { - return new PagedIterable<>(listAsync(resourceGroupName, appName)); - } - - /** - * List an application's resiliency policies. - * - * List container app resiliency policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @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 collection of AppResiliency policies as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String appName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, appName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of AppResiliency policies along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of AppResiliency policies 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/AppResilienciesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesImpl.java deleted file mode 100644 index d1884526629d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesImpl.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.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.AppResilienciesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.AppResiliencyInner; -import com.azure.resourcemanager.appcontainers.models.AppResiliencies; -import com.azure.resourcemanager.appcontainers.models.AppResiliency; - -public final class AppResilienciesImpl implements AppResiliencies { - private static final ClientLogger LOGGER = new ClientLogger(AppResilienciesImpl.class); - - private final AppResilienciesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public AppResilienciesImpl(AppResilienciesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response deleteWithResponse(String resourceGroupName, String appName, String name, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, appName, name, context); - } - - public void delete(String resourceGroupName, String appName, String name) { - this.serviceClient().delete(resourceGroupName, appName, name); - } - - public Response getWithResponse(String resourceGroupName, String appName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, appName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new AppResiliencyImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public AppResiliency get(String resourceGroupName, String appName, String name) { - AppResiliencyInner inner = this.serviceClient().get(resourceGroupName, appName, name); - if (inner != null) { - return new AppResiliencyImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list(String resourceGroupName, String appName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, appName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AppResiliencyImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String appName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, appName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AppResiliencyImpl(inner1, this.manager())); - } - - public AppResiliency 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 appName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (appName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); - } - return this.getWithResponse(resourceGroupName, appName, name, 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 appName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (appName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); - } - return this.getWithResponse(resourceGroupName, appName, name, 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 appName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (appName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); - } - this.deleteWithResponse(resourceGroupName, appName, name, Context.NONE); - } - - public Response 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 appName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (appName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); - } - return this.deleteWithResponse(resourceGroupName, appName, name, context); - } - - private AppResilienciesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public AppResiliencyImpl define(String name) { - return new AppResiliencyImpl(name, this.manager()); - } -} 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 deleted file mode 100644 index ac7c0ecd7a10..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResiliencyImpl.java +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (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.AppResiliencyInner; -import com.azure.resourcemanager.appcontainers.models.AppResiliency; -import com.azure.resourcemanager.appcontainers.models.CircuitBreakerPolicy; -import com.azure.resourcemanager.appcontainers.models.HttpConnectionPool; -import com.azure.resourcemanager.appcontainers.models.HttpRetryPolicy; -import com.azure.resourcemanager.appcontainers.models.TcpConnectionPool; -import com.azure.resourcemanager.appcontainers.models.TcpRetryPolicy; -import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; - -public final class AppResiliencyImpl implements AppResiliency, AppResiliency.Definition, AppResiliency.Update { - private AppResiliencyInner 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 TimeoutPolicy timeoutPolicy() { - return this.innerModel().timeoutPolicy(); - } - - public HttpRetryPolicy httpRetryPolicy() { - return this.innerModel().httpRetryPolicy(); - } - - public TcpRetryPolicy tcpRetryPolicy() { - return this.innerModel().tcpRetryPolicy(); - } - - public CircuitBreakerPolicy circuitBreakerPolicy() { - return this.innerModel().circuitBreakerPolicy(); - } - - public HttpConnectionPool httpConnectionPool() { - return this.innerModel().httpConnectionPool(); - } - - public TcpConnectionPool tcpConnectionPool() { - return this.innerModel().tcpConnectionPool(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public AppResiliencyInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String appName; - - private String name; - - public AppResiliencyImpl withExistingContainerApp(String resourceGroupName, String appName) { - this.resourceGroupName = resourceGroupName; - this.appName = appName; - return this; - } - - public AppResiliency create() { - 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(); - return this; - } - - AppResiliencyImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new AppResiliencyInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public AppResiliencyImpl update() { - return this; - } - - public AppResiliency apply() { - 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(); - return this; - } - - AppResiliencyImpl(AppResiliencyInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.appName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "containerApps"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resiliencyPolicies"); - } - - public AppResiliency refresh() { - 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(); - return this; - } - - public AppResiliencyImpl withTimeoutPolicy(TimeoutPolicy timeoutPolicy) { - this.innerModel().withTimeoutPolicy(timeoutPolicy); - return this; - } - - public AppResiliencyImpl withHttpRetryPolicy(HttpRetryPolicy httpRetryPolicy) { - this.innerModel().withHttpRetryPolicy(httpRetryPolicy); - return this; - } - - public AppResiliencyImpl withTcpRetryPolicy(TcpRetryPolicy tcpRetryPolicy) { - this.innerModel().withTcpRetryPolicy(tcpRetryPolicy); - return this; - } - - public AppResiliencyImpl withCircuitBreakerPolicy(CircuitBreakerPolicy circuitBreakerPolicy) { - this.innerModel().withCircuitBreakerPolicy(circuitBreakerPolicy); - return this; - } - - public AppResiliencyImpl withHttpConnectionPool(HttpConnectionPool httpConnectionPool) { - this.innerModel().withHttpConnectionPool(httpConnectionPool); - return this; - } - - public AppResiliencyImpl withTcpConnectionPool(TcpConnectionPool tcpConnectionPool) { - this.innerModel().withTcpConnectionPool(tcpConnectionPool); - 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 deleted file mode 100644 index dac6789aac8f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AuthConfigImpl.java +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (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.AuthConfigInner; -import com.azure.resourcemanager.appcontainers.models.AuthConfig; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import com.azure.resourcemanager.appcontainers.models.EncryptionSettings; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.IdentityProviders; -import com.azure.resourcemanager.appcontainers.models.Login; - -public final class AuthConfigImpl implements AuthConfig, AuthConfig.Definition, AuthConfig.Update { - private AuthConfigInner 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 AuthPlatform platform() { - return this.innerModel().platform(); - } - - public GlobalValidation globalValidation() { - return this.innerModel().globalValidation(); - } - - public IdentityProviders identityProviders() { - return this.innerModel().identityProviders(); - } - - public Login login() { - return this.innerModel().login(); - } - - public HttpSettings httpSettings() { - return this.innerModel().httpSettings(); - } - - public EncryptionSettings encryptionSettings() { - return this.innerModel().encryptionSettings(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public AuthConfigInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String containerAppName; - - private String authConfigName; - - public AuthConfigImpl withExistingContainerApp(String resourceGroupName, String containerAppName) { - this.resourceGroupName = resourceGroupName; - this.containerAppName = containerAppName; - return this; - } - - public AuthConfig create() { - 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() - .createOrUpdateWithResponse(resourceGroupName, containerAppName, authConfigName, this.innerModel(), context) - .getValue(); - return this; - } - - AuthConfigImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new AuthConfigInner(); - this.serviceManager = serviceManager; - this.authConfigName = name; - } - - public AuthConfigImpl update() { - return this; - } - - public AuthConfig apply() { - 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() - .createOrUpdateWithResponse(resourceGroupName, containerAppName, authConfigName, this.innerModel(), context) - .getValue(); - return this; - } - - AuthConfigImpl(AuthConfigInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.containerAppName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "containerApps"); - this.authConfigName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "authConfigs"); - } - - public AuthConfig refresh() { - 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(); - return this; - } - - public AuthConfigImpl withPlatform(AuthPlatform platform) { - this.innerModel().withPlatform(platform); - return this; - } - - public AuthConfigImpl withGlobalValidation(GlobalValidation globalValidation) { - this.innerModel().withGlobalValidation(globalValidation); - return this; - } - - public AuthConfigImpl withIdentityProviders(IdentityProviders identityProviders) { - this.innerModel().withIdentityProviders(identityProviders); - return this; - } - - public AuthConfigImpl withLogin(Login login) { - this.innerModel().withLogin(login); - return this; - } - - public AuthConfigImpl withHttpSettings(HttpSettings httpSettings) { - this.innerModel().withHttpSettings(httpSettings); - return this; - } - - public AuthConfigImpl withEncryptionSettings(EncryptionSettings encryptionSettings) { - this.innerModel().withEncryptionSettings(encryptionSettings); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfileImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfileImpl.java deleted file mode 100644 index a4636a09d35b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfileImpl.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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfile; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; - -public final class AvailableWorkloadProfileImpl implements AvailableWorkloadProfile { - private AvailableWorkloadProfileInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - AvailableWorkloadProfileImpl(AvailableWorkloadProfileInner 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 String location() { - return this.innerModel().location(); - } - - public AvailableWorkloadProfileProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public AvailableWorkloadProfileInner 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/AvailableWorkloadProfilesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesClientImpl.java deleted file mode 100644 index 12b04142d7af..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesClientImpl.java +++ /dev/null @@ -1,271 +0,0 @@ -// Copyright (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.AvailableWorkloadProfilesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfilesCollection; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in AvailableWorkloadProfilesClient. - */ -public final class AvailableWorkloadProfilesClientImpl implements AvailableWorkloadProfilesClient { - /** - * The proxy service used to perform REST calls. - */ - private final AvailableWorkloadProfilesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of AvailableWorkloadProfilesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - AvailableWorkloadProfilesClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(AvailableWorkloadProfilesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientAvailableWorkloadProfiles to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface AvailableWorkloadProfilesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/availableManagedEnvironmentsWorkloadProfileTypes") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get available workload profiles by location. - * - * Get all available workload profiles for a location. - * - * @param location The name of Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all available workload profiles for a location along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getSinglePageAsync(String location) { - 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, - 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 available workload profiles by location. - * - * Get all available workload profiles for a location. - * - * @param location The name of Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all available workload profiles for a location along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getSinglePageAsync(String location, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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(), location, this.client.getApiVersion(), - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get available workload profiles by location. - * - * Get all available workload profiles for a location. - * - * @param location The name of Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all available workload profiles for a location as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux getAsync(String location) { - return new PagedFlux<>(() -> getSinglePageAsync(location), nextLink -> getNextSinglePageAsync(nextLink)); - } - - /** - * Get available workload profiles by location. - * - * Get all available workload profiles for a location. - * - * @param location The name of Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all available workload profiles for a location as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux getAsync(String location, Context context) { - return new PagedFlux<>(() -> getSinglePageAsync(location, context), - nextLink -> getNextSinglePageAsync(nextLink, context)); - } - - /** - * Get available workload profiles by location. - * - * Get all available workload profiles for a location. - * - * @param location The name of Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all available workload profiles for a location as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable get(String location) { - return new PagedIterable<>(getAsync(location)); - } - - /** - * Get available workload profiles by location. - * - * Get all available workload profiles for a location. - * - * @param location The name of Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all available workload profiles for a location as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable get(String location, Context context) { - return new PagedIterable<>(getAsync(location, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of available workload profiles in the location along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getNextSinglePageAsync(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.getNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of available workload profiles in the location along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getNextSinglePageAsync(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.getNext(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/AvailableWorkloadProfilesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesImpl.java deleted file mode 100644 index de9fd579bec6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesImpl.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.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.AvailableWorkloadProfilesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfile; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfiles; - -public final class AvailableWorkloadProfilesImpl implements AvailableWorkloadProfiles { - private static final ClientLogger LOGGER = new ClientLogger(AvailableWorkloadProfilesImpl.class); - - private final AvailableWorkloadProfilesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public AvailableWorkloadProfilesImpl(AvailableWorkloadProfilesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable get(String location) { - PagedIterable inner = this.serviceClient().get(location); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailableWorkloadProfileImpl(inner1, this.manager())); - } - - public PagedIterable get(String location, Context context) { - PagedIterable inner = this.serviceClient().get(location, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailableWorkloadProfileImpl(inner1, this.manager())); - } - - private AvailableWorkloadProfilesClient 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/BillingMeterCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMeterCollectionImpl.java deleted file mode 100644 index b87bf3c7ed11..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMeterCollectionImpl.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.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; -import com.azure.resourcemanager.appcontainers.models.BillingMeter; -import com.azure.resourcemanager.appcontainers.models.BillingMeterCollection; -import java.util.Collections; -import java.util.List; - -public final class BillingMeterCollectionImpl implements BillingMeterCollection { - private BillingMeterCollectionInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - BillingMeterCollectionImpl(BillingMeterCollectionInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public BillingMeterCollectionInner 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/BillingMetersClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersClientImpl.java deleted file mode 100644 index 5d7a6a26b229..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersClientImpl.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (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.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.BillingMetersClient; -import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; -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 BillingMetersClient. - */ -public final class BillingMetersClientImpl implements BillingMetersClient { - /** - * The proxy service used to perform REST calls. - */ - private final BillingMetersService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of BillingMetersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BillingMetersClientImpl(ContainerAppsApiClientImpl client) { - this.service - = RestProxy.create(BillingMetersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientBillingMeters to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface BillingMetersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/billingMeters") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get billing meters by location. - * - * Get all billingMeters for a location. - * - * @param location The name of Azure region. - * @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 all billingMeters for a location along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location) { - 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 (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, - this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get billing meters by location. - * - * Get all billingMeters for a location. - * - * @param location The name of Azure region. - * @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 all billingMeters for a location along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String location, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location 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(), location, - this.client.getApiVersion(), accept, context); - } - - /** - * Get billing meters by location. - * - * Get all billingMeters for a location. - * - * @param location The name of Azure region. - * @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 all billingMeters for a location on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String location) { - return getWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get billing meters by location. - * - * Get all billingMeters for a location. - * - * @param location The name of Azure region. - * @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 all billingMeters for a location along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String location, Context context) { - return getWithResponseAsync(location, context).block(); - } - - /** - * Get billing meters by location. - * - * Get all billingMeters for a location. - * - * @param location The name of Azure region. - * @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 all billingMeters for a location. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BillingMeterCollectionInner get(String location) { - return getWithResponse(location, Context.NONE).getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersImpl.java deleted file mode 100644 index 8b793dcb1ac0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersImpl.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.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.BillingMetersClient; -import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; -import com.azure.resourcemanager.appcontainers.models.BillingMeterCollection; -import com.azure.resourcemanager.appcontainers.models.BillingMeters; - -public final class BillingMetersImpl implements BillingMeters { - private static final ClientLogger LOGGER = new ClientLogger(BillingMetersImpl.class); - - private final BillingMetersClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public BillingMetersImpl(BillingMetersClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String location, Context context) { - Response inner = this.serviceClient().getWithResponse(location, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BillingMeterCollectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public BillingMeterCollection get(String location) { - BillingMeterCollectionInner inner = this.serviceClient().get(location); - if (inner != null) { - return new BillingMeterCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - private BillingMetersClient 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/BuildAuthTokensClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensClientImpl.java deleted file mode 100644 index c41f96fc70bf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensClientImpl.java +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (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.management.exception.ManagementException; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.BuildAuthTokensClient; -import com.azure.resourcemanager.appcontainers.fluent.models.BuildTokenInner; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in BuildAuthTokensClient. - */ -public final class BuildAuthTokensClientImpl implements BuildAuthTokensClient { - /** - * The proxy service used to perform REST calls. - */ - private final BuildAuthTokensService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of BuildAuthTokensClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BuildAuthTokensClientImpl(ContainerAppsApiClientImpl client) { - this.service - = RestProxy.create(BuildAuthTokensService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientBuildAuthTokens to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface BuildAuthTokensService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}/listAuthToken") - @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("builderName") String builderName, - @PathParam("buildName") String buildName, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the token used to connect to the endpoint where source code can be uploaded for a build. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the token used to connect to the endpoint where source code can be uploaded for a build along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, String builderName, - String buildName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (buildName == null) { - return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, buildName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the token used to connect to the endpoint where source code can be uploaded for a build. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the token used to connect to the endpoint where source code can be uploaded for a build along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, String builderName, - String buildName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (buildName == null) { - return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, builderName, buildName, accept, context); - } - - /** - * Gets the token used to connect to the endpoint where source code can be uploaded for a build. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the token used to connect to the endpoint where source code can be uploaded for a build on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String resourceGroupName, String builderName, String buildName) { - return listWithResponseAsync(resourceGroupName, builderName, buildName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets the token used to connect to the endpoint where source code can be uploaded for a build. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the token used to connect to the endpoint where source code can be uploaded for a build along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(String resourceGroupName, String builderName, String buildName, - Context context) { - return listWithResponseAsync(resourceGroupName, builderName, buildName, context).block(); - } - - /** - * Gets the token used to connect to the endpoint where source code can be uploaded for a build. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the token used to connect to the endpoint where source code can be uploaded for a build. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BuildTokenInner list(String resourceGroupName, String builderName, String buildName) { - return listWithResponse(resourceGroupName, builderName, buildName, Context.NONE).getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensImpl.java deleted file mode 100644 index be90dbf62492..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensImpl.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.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.BuildAuthTokensClient; -import com.azure.resourcemanager.appcontainers.fluent.models.BuildTokenInner; -import com.azure.resourcemanager.appcontainers.models.BuildAuthTokens; -import com.azure.resourcemanager.appcontainers.models.BuildToken; - -public final class BuildAuthTokensImpl implements BuildAuthTokens { - private static final ClientLogger LOGGER = new ClientLogger(BuildAuthTokensImpl.class); - - private final BuildAuthTokensClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public BuildAuthTokensImpl(BuildAuthTokensClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response listWithResponse(String resourceGroupName, String builderName, String buildName, - Context context) { - Response inner - = this.serviceClient().listWithResponse(resourceGroupName, builderName, buildName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BuildTokenImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public BuildToken list(String resourceGroupName, String builderName, String buildName) { - BuildTokenInner inner = this.serviceClient().list(resourceGroupName, builderName, buildName); - if (inner != null) { - return new BuildTokenImpl(inner, this.manager()); - } else { - return null; - } - } - - private BuildAuthTokensClient 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/BuildResourceImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildResourceImpl.java deleted file mode 100644 index f254e9354fc1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildResourceImpl.java +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.implementation; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuildConfiguration; -import com.azure.resourcemanager.appcontainers.models.BuildProvisioningState; -import com.azure.resourcemanager.appcontainers.models.BuildResource; -import com.azure.resourcemanager.appcontainers.models.BuildStatus; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; - -public final class BuildResourceImpl implements BuildResource, BuildResource.Definition, BuildResource.Update { - private BuildResourceInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public BuildProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public BuildStatus buildStatus() { - return this.innerModel().buildStatus(); - } - - public ContainerRegistryWithCustomImage destinationContainerRegistry() { - return this.innerModel().destinationContainerRegistry(); - } - - public BuildConfiguration configuration() { - return this.innerModel().configuration(); - } - - public String uploadEndpoint() { - return this.innerModel().uploadEndpoint(); - } - - public String logStreamEndpoint() { - return this.innerModel().logStreamEndpoint(); - } - - public String tokenEndpoint() { - return this.innerModel().tokenEndpoint(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public BuildResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String builderName; - - private String buildName; - - public BuildResourceImpl withExistingBuilder(String resourceGroupName, String builderName) { - this.resourceGroupName = resourceGroupName; - this.builderName = builderName; - return this; - } - - public BuildResource create() { - this.innerObject = serviceManager.serviceClient() - .getBuilds() - .createOrUpdate(resourceGroupName, builderName, buildName, this.innerModel(), Context.NONE); - return this; - } - - public BuildResource create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getBuilds() - .createOrUpdate(resourceGroupName, builderName, buildName, this.innerModel(), context); - return this; - } - - BuildResourceImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new BuildResourceInner(); - this.serviceManager = serviceManager; - this.buildName = name; - } - - public BuildResourceImpl update() { - return this; - } - - public BuildResource apply() { - this.innerObject = serviceManager.serviceClient() - .getBuilds() - .createOrUpdate(resourceGroupName, builderName, buildName, this.innerModel(), Context.NONE); - return this; - } - - public BuildResource apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getBuilds() - .createOrUpdate(resourceGroupName, builderName, buildName, this.innerModel(), context); - return this; - } - - BuildResourceImpl(BuildResourceInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.builderName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "builders"); - this.buildName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "builds"); - } - - public BuildResource refresh() { - this.innerObject = serviceManager.serviceClient() - .getBuilds() - .getWithResponse(resourceGroupName, builderName, buildName, Context.NONE) - .getValue(); - return this; - } - - public BuildResource refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getBuilds() - .getWithResponse(resourceGroupName, builderName, buildName, context) - .getValue(); - return this; - } - - public BuildResourceImpl - withDestinationContainerRegistry(ContainerRegistryWithCustomImage destinationContainerRegistry) { - this.innerModel().withDestinationContainerRegistry(destinationContainerRegistry); - return this; - } - - public BuildResourceImpl withConfiguration(BuildConfiguration configuration) { - this.innerModel().withConfiguration(configuration); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildTokenImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildTokenImpl.java deleted file mode 100644 index cd7d3b491370..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildTokenImpl.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.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.BuildTokenInner; -import com.azure.resourcemanager.appcontainers.models.BuildToken; -import java.time.OffsetDateTime; - -public final class BuildTokenImpl implements BuildToken { - private BuildTokenInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - BuildTokenImpl(BuildTokenInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String token() { - return this.innerModel().token(); - } - - public OffsetDateTime expires() { - return this.innerModel().expires(); - } - - public BuildTokenInner 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/BuilderResourceImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuilderResourceImpl.java deleted file mode 100644 index 14d509009b5e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuilderResourceImpl.java +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.implementation; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuilderProvisioningState; -import com.azure.resourcemanager.appcontainers.models.BuilderResource; -import com.azure.resourcemanager.appcontainers.models.BuilderResourceUpdate; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class BuilderResourceImpl implements BuilderResource, BuilderResource.Definition, BuilderResource.Update { - private BuilderResourceInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public String location() { - return this.innerModel().location(); - } - - public Map tags() { - Map inner = this.innerModel().tags(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public BuilderProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String environmentId() { - return this.innerModel().environmentId(); - } - - public List containerRegistries() { - List inner = this.innerModel().containerRegistries(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public BuilderResourceInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String builderName; - - private BuilderResourceUpdate updateBuilderEnvelope; - - public BuilderResourceImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public BuilderResource create() { - this.innerObject = serviceManager.serviceClient() - .getBuilders() - .createOrUpdate(resourceGroupName, builderName, this.innerModel(), Context.NONE); - return this; - } - - public BuilderResource create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getBuilders() - .createOrUpdate(resourceGroupName, builderName, this.innerModel(), context); - return this; - } - - BuilderResourceImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new BuilderResourceInner(); - this.serviceManager = serviceManager; - this.builderName = name; - } - - public BuilderResourceImpl update() { - this.updateBuilderEnvelope = new BuilderResourceUpdate(); - return this; - } - - public BuilderResource apply() { - this.innerObject = serviceManager.serviceClient() - .getBuilders() - .update(resourceGroupName, builderName, updateBuilderEnvelope, Context.NONE); - return this; - } - - public BuilderResource apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getBuilders() - .update(resourceGroupName, builderName, updateBuilderEnvelope, context); - return this; - } - - BuilderResourceImpl(BuilderResourceInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.builderName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "builders"); - } - - public BuilderResource refresh() { - this.innerObject = serviceManager.serviceClient() - .getBuilders() - .getByResourceGroupWithResponse(resourceGroupName, builderName, Context.NONE) - .getValue(); - return this; - } - - public BuilderResource refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getBuilders() - .getByResourceGroupWithResponse(resourceGroupName, builderName, context) - .getValue(); - return this; - } - - public BuilderResourceImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public BuilderResourceImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public BuilderResourceImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateBuilderEnvelope.withTags(tags); - return this; - } - } - - public BuilderResourceImpl withIdentity(ManagedServiceIdentity identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateBuilderEnvelope.withIdentity(identity); - return this; - } - } - - public BuilderResourceImpl withEnvironmentId(String environmentId) { - if (isInCreateMode()) { - this.innerModel().withEnvironmentId(environmentId); - return this; - } else { - this.updateBuilderEnvelope.withEnvironmentId(environmentId); - return this; - } - } - - public BuilderResourceImpl withContainerRegistries(List containerRegistries) { - this.innerModel().withContainerRegistries(containerRegistries); - return this; - } - - private boolean isInCreateMode() { - return this.innerModel().id() == null; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersClientImpl.java deleted file mode 100644 index 573cee8d22d9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersClientImpl.java +++ /dev/null @@ -1,1282 +0,0 @@ -// Copyright (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.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.BuildersClient; -import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuilderCollection; -import com.azure.resourcemanager.appcontainers.models.BuilderResourceUpdate; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in BuildersClient. - */ -public final class BuildersClientImpl implements BuildersClient { - /** - * The proxy service used to perform REST calls. - */ - private final BuildersService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of BuildersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BuildersClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(BuildersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientBuilders to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface BuildersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/builders") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> listByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, - @BodyParam("application/json") BuilderResourceInner builderEnvelope, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, - @BodyParam("application/json") BuilderResourceUpdate builderEnvelope, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}") - @ExpectedResponses({ 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("builderName") String builderName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.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(ManagementException.class) - Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * List BuilderResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List BuilderResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, - context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List BuilderResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * List BuilderResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); - } - - /** - * List BuilderResource resources by subscription ID. - * - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * List BuilderResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * List BuilderResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List BuilderResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List BuilderResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * List BuilderResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); - } - - /** - * List BuilderResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * List BuilderResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); - } - - /** - * Get a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 BuilderResource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String builderName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 BuilderResource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String builderName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, accept, context); - } - - /** - * Get a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 BuilderResource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String builderName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, builderName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 BuilderResource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String builderName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, builderName, context).block(); - } - - /** - * Get a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 BuilderResource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BuilderResourceInner getByResourceGroup(String resourceGroupName, String builderName) { - return getByResourceGroupWithResponse(resourceGroupName, builderName, Context.NONE).getValue(); - } - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the SourceToCloud builder resource along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String builderName, BuilderResourceInner builderEnvelope) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (builderEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter builderEnvelope is required and cannot be null.")); - } else { - builderEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, builderEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the SourceToCloud builder resource along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String builderName, BuilderResourceInner builderEnvelope, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (builderEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter builderEnvelope is required and cannot be null.")); - } else { - builderEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, builderEnvelope, accept, context); - } - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BuilderResourceInner> - beginCreateOrUpdateAsync(String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, builderName, builderEnvelope); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BuilderResourceInner.class, BuilderResourceInner.class, this.client.getContext()); - } - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BuilderResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, builderName, builderEnvelope, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BuilderResourceInner.class, BuilderResourceInner.class, context); - } - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BuilderResourceInner> - beginCreateOrUpdate(String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope) { - return this.beginCreateOrUpdateAsync(resourceGroupName, builderName, builderEnvelope).getSyncPoller(); - } - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BuilderResourceInner> beginCreateOrUpdate( - String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, builderName, builderEnvelope, context).getSyncPoller(); - } - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the SourceToCloud builder resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String builderName, - BuilderResourceInner builderEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, builderName, builderEnvelope).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the SourceToCloud builder resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String builderName, - BuilderResourceInner builderEnvelope, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, builderName, builderEnvelope, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BuilderResourceInner createOrUpdate(String resourceGroupName, String builderName, - BuilderResourceInner builderEnvelope) { - return createOrUpdateAsync(resourceGroupName, builderName, builderEnvelope).block(); - } - - /** - * Create or update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope Resource create parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BuilderResourceInner createOrUpdate(String resourceGroupName, String builderName, - BuilderResourceInner builderEnvelope, Context context) { - return createOrUpdateAsync(resourceGroupName, builderName, builderEnvelope, context).block(); - } - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the SourceToCloud builder resource along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String builderName, - BuilderResourceUpdate builderEnvelope) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (builderEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter builderEnvelope is required and cannot be null.")); - } else { - builderEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, builderEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the SourceToCloud builder resource along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String builderName, - BuilderResourceUpdate builderEnvelope, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (builderEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter builderEnvelope is required and cannot be null.")); - } else { - builderEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, builderName, builderEnvelope, accept, context); - } - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BuilderResourceInner> - beginUpdateAsync(String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, builderName, builderEnvelope); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BuilderResourceInner.class, BuilderResourceInner.class, this.client.getContext()); - } - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BuilderResourceInner> beginUpdateAsync( - String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, builderName, builderEnvelope, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BuilderResourceInner.class, BuilderResourceInner.class, context); - } - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BuilderResourceInner> beginUpdate(String resourceGroupName, - String builderName, BuilderResourceUpdate builderEnvelope) { - return this.beginUpdateAsync(resourceGroupName, builderName, builderEnvelope).getSyncPoller(); - } - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BuilderResourceInner> beginUpdate(String resourceGroupName, - String builderName, BuilderResourceUpdate builderEnvelope, Context context) { - return this.beginUpdateAsync(resourceGroupName, builderName, builderEnvelope, context).getSyncPoller(); - } - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the SourceToCloud builder resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String builderName, - BuilderResourceUpdate builderEnvelope) { - return beginUpdateAsync(resourceGroupName, builderName, builderEnvelope).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the SourceToCloud builder resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String builderName, - BuilderResourceUpdate builderEnvelope, Context context) { - return beginUpdateAsync(resourceGroupName, builderName, builderEnvelope, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BuilderResourceInner update(String resourceGroupName, String builderName, - BuilderResourceUpdate builderEnvelope) { - return updateAsync(resourceGroupName, builderName, builderEnvelope).block(); - } - - /** - * Update a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param builderEnvelope The resource properties to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information about the SourceToCloud builder resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BuilderResourceInner update(String resourceGroupName, String builderName, - BuilderResourceUpdate builderEnvelope, Context context) { - return updateAsync(resourceGroupName, builderName, builderEnvelope, context).block(); - } - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String builderName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String builderName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, builderName, accept, context); - } - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String builderName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, builderName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String builderName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, builderName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String builderName) { - return this.beginDeleteAsync(resourceGroupName, builderName).getSyncPoller(); - } - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String builderName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, builderName, context).getSyncPoller(); - } - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 builderName) { - return beginDeleteAsync(resourceGroupName, builderName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 builderName, Context context) { - return beginDeleteAsync(resourceGroupName, builderName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 builderName) { - deleteAsync(resourceGroupName, builderName).block(); - } - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 builderName, Context context) { - deleteAsync(resourceGroupName, builderName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, - Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersImpl.java deleted file mode 100644 index afb724f88caf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersImpl.java +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.SimpleResponse; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.fluent.BuildersClient; -import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuilderResource; -import com.azure.resourcemanager.appcontainers.models.Builders; - -public final class BuildersImpl implements Builders { - private static final ClientLogger LOGGER = new ClientLogger(BuildersImpl.class); - - private final BuildersClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public BuildersImpl(BuildersClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BuilderResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BuilderResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BuilderResourceImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BuilderResourceImpl(inner1, this.manager())); - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String builderName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, builderName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BuilderResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public BuilderResource getByResourceGroup(String resourceGroupName, String builderName) { - BuilderResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, builderName); - if (inner != null) { - return new BuilderResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String builderName) { - this.serviceClient().delete(resourceGroupName, builderName); - } - - public void delete(String resourceGroupName, String builderName, Context context) { - this.serviceClient().delete(resourceGroupName, builderName, context); - } - - public BuilderResource getById(String id) { - String resourceGroupName = 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 builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); - if (builderName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, builderName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = 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 builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); - if (builderName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, builderName, context); - } - - public void deleteById(String id) { - String resourceGroupName = 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 builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); - if (builderName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); - } - this.delete(resourceGroupName, builderName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = 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 builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); - if (builderName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); - } - this.delete(resourceGroupName, builderName, context); - } - - private BuildersClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public BuilderResourceImpl define(String name) { - return new BuilderResourceImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsByBuilderResourcesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsByBuilderResourcesClientImpl.java deleted file mode 100644 index e5110840118b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsByBuilderResourcesClientImpl.java +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright (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.BuildsByBuilderResourcesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuildCollection; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in BuildsByBuilderResourcesClient. - */ -public final class BuildsByBuilderResourcesClientImpl implements BuildsByBuilderResourcesClient { - /** - * The proxy service used to perform REST calls. - */ - private final BuildsByBuilderResourcesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of BuildsByBuilderResourcesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BuildsByBuilderResourcesClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(BuildsByBuilderResourcesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientBuildsByBuilderResources to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface BuildsByBuilderResourcesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/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("builderName") String builderName, - @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 BuildResource resources by BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuildResource list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String builderName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List BuildResource resources by BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuildResource list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String builderName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, builderName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List BuildResource resources by BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuildResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String builderName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, builderName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * List BuildResource resources by BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuildResource list operation as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String builderName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, builderName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * List BuildResource resources by BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuildResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String builderName) { - return new PagedIterable<>(listAsync(resourceGroupName, builderName)); - } - - /** - * List BuildResource resources by BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuildResource list operation as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String builderName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, builderName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuildResource 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuildResource list operation along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> 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/BuildsByBuilderResourcesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsByBuilderResourcesImpl.java deleted file mode 100644 index d1222c2dc55d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsByBuilderResourcesImpl.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.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.BuildsByBuilderResourcesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuildResource; -import com.azure.resourcemanager.appcontainers.models.BuildsByBuilderResources; - -public final class BuildsByBuilderResourcesImpl implements BuildsByBuilderResources { - private static final ClientLogger LOGGER = new ClientLogger(BuildsByBuilderResourcesImpl.class); - - private final BuildsByBuilderResourcesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public BuildsByBuilderResourcesImpl(BuildsByBuilderResourcesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String builderName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, builderName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BuildResourceImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String builderName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, builderName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new BuildResourceImpl(inner1, this.manager())); - } - - private BuildsByBuilderResourcesClient 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/BuildsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsClientImpl.java deleted file mode 100644 index c297118316ac..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsClientImpl.java +++ /dev/null @@ -1,696 +0,0 @@ -// Copyright (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.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.BuildsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in BuildsClient. - */ -public final class BuildsClientImpl implements BuildsClient { - /** - * The proxy service used to perform REST calls. - */ - private final BuildsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of BuildsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - BuildsClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(BuildsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientBuilds to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface BuildsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{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("builderName") String builderName, - @PathParam("buildName") String buildName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, - @PathParam("buildName") String buildName, @BodyParam("application/json") BuildResourceInner buildEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}") - @ExpectedResponses({ 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("builderName") String builderName, - @PathParam("buildName") String buildName, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 BuildResource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String builderName, - String buildName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (buildName == null) { - return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, buildName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 BuildResource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String builderName, - String buildName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (buildName == null) { - return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, builderName, buildName, accept, context); - } - - /** - * Get a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 BuildResource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String builderName, String buildName) { - return getWithResponseAsync(resourceGroupName, builderName, buildName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 BuildResource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String builderName, String buildName, - Context context) { - return getWithResponseAsync(resourceGroupName, builderName, buildName, context).block(); - } - - /** - * Get a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 BuildResource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BuildResourceInner get(String resourceGroupName, String builderName, String buildName) { - return getWithResponse(resourceGroupName, builderName, buildName, Context.NONE).getValue(); - } - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information pertaining to an individual build along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String builderName, String buildName, BuildResourceInner buildEnvelope) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (buildName == null) { - return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); - } - if (buildEnvelope == null) { - return Mono.error(new IllegalArgumentException("Parameter buildEnvelope is required and cannot be null.")); - } else { - buildEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, buildName, buildEnvelope, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or update parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information pertaining to an individual build along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String builderName, String buildName, BuildResourceInner buildEnvelope, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (buildName == null) { - return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); - } - if (buildEnvelope == null) { - return Mono.error(new IllegalArgumentException("Parameter buildEnvelope is required and cannot be null.")); - } else { - buildEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, buildName, buildEnvelope, accept, context); - } - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of information pertaining to an individual build. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BuildResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String builderName, String buildName, BuildResourceInner buildEnvelope) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, builderName, buildName, buildEnvelope); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BuildResourceInner.class, BuildResourceInner.class, this.client.getContext()); - } - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or update parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of information pertaining to an individual build. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, BuildResourceInner> beginCreateOrUpdateAsync( - String resourceGroupName, String builderName, String buildName, BuildResourceInner buildEnvelope, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, builderName, buildName, buildEnvelope, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - BuildResourceInner.class, BuildResourceInner.class, context); - } - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information pertaining to an individual build. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BuildResourceInner> beginCreateOrUpdate(String resourceGroupName, - String builderName, String buildName, BuildResourceInner buildEnvelope) { - return this.beginCreateOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope).getSyncPoller(); - } - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or update parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of information pertaining to an individual build. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, BuildResourceInner> beginCreateOrUpdate(String resourceGroupName, - String builderName, String buildName, BuildResourceInner buildEnvelope, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope, context) - .getSyncPoller(); - } - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information pertaining to an individual build on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String builderName, String buildName, - BuildResourceInner buildEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or update parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information pertaining to an individual build on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String builderName, String buildName, - BuildResourceInner buildEnvelope, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or update parameters. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information pertaining to an individual build. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BuildResourceInner createOrUpdate(String resourceGroupName, String builderName, String buildName, - BuildResourceInner buildEnvelope) { - return createOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope).block(); - } - - /** - * Create a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param buildEnvelope Resource create or update parameters. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return information pertaining to an individual build. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public BuildResourceInner createOrUpdate(String resourceGroupName, String builderName, String buildName, - BuildResourceInner buildEnvelope, Context context) { - return createOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope, context).block(); - } - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String builderName, - String buildName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (buildName == null) { - return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), - this.client.getSubscriptionId(), resourceGroupName, builderName, buildName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(String resourceGroupName, String builderName, - String buildName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (builderName == null) { - return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); - } - if (buildName == null) { - return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), - resourceGroupName, builderName, buildName, accept, context); - } - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String builderName, - String buildName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, builderName, buildName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String builderName, - String buildName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, builderName, buildName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String builderName, - String buildName) { - return this.beginDeleteAsync(resourceGroupName, builderName, buildName).getSyncPoller(); - } - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String builderName, - String buildName, Context context) { - return this.beginDeleteAsync(resourceGroupName, builderName, buildName, context).getSyncPoller(); - } - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 builderName, String buildName) { - return beginDeleteAsync(resourceGroupName, builderName, buildName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 builderName, String buildName, Context context) { - return beginDeleteAsync(resourceGroupName, builderName, buildName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 builderName, String buildName) { - deleteAsync(resourceGroupName, builderName, buildName).block(); - } - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 builderName, String buildName, Context context) { - deleteAsync(resourceGroupName, builderName, buildName, context).block(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsImpl.java deleted file mode 100644 index 7f29012d629e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsImpl.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (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.BuildsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuildResource; -import com.azure.resourcemanager.appcontainers.models.Builds; - -public final class BuildsImpl implements Builds { - private static final ClientLogger LOGGER = new ClientLogger(BuildsImpl.class); - - private final BuildsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public BuildsImpl(BuildsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String builderName, String buildName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, builderName, buildName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new BuildResourceImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public BuildResource get(String resourceGroupName, String builderName, String buildName) { - BuildResourceInner inner = this.serviceClient().get(resourceGroupName, builderName, buildName); - if (inner != null) { - return new BuildResourceImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String builderName, String buildName) { - this.serviceClient().delete(resourceGroupName, builderName, buildName); - } - - public void delete(String resourceGroupName, String builderName, String buildName, Context context) { - this.serviceClient().delete(resourceGroupName, builderName, buildName, context); - } - - public BuildResource getById(String id) { - String resourceGroupName = 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 builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); - if (builderName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); - } - String buildName = ResourceManagerUtils.getValueFromIdByName(id, "builds"); - if (buildName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id))); - } - return this.getWithResponse(resourceGroupName, builderName, buildName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = 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 builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); - if (builderName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); - } - String buildName = ResourceManagerUtils.getValueFromIdByName(id, "builds"); - if (buildName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id))); - } - return this.getWithResponse(resourceGroupName, builderName, buildName, context); - } - - public void deleteById(String id) { - String resourceGroupName = 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 builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); - if (builderName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); - } - String buildName = ResourceManagerUtils.getValueFromIdByName(id, "builds"); - if (buildName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id))); - } - this.delete(resourceGroupName, builderName, buildName, Context.NONE); - } - - public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = 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 builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); - if (builderName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); - } - String buildName = ResourceManagerUtils.getValueFromIdByName(id, "builds"); - if (buildName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id))); - } - this.delete(resourceGroupName, builderName, buildName, context); - } - - private BuildsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public BuildResourceImpl define(String name) { - return new BuildResourceImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java deleted file mode 100644 index 7f84f8f2426b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (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.CertificateInner; -import com.azure.resourcemanager.appcontainers.models.Certificate; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; -import com.azure.resourcemanager.appcontainers.models.CertificateProperties; -import java.util.Collections; -import java.util.Map; - -public final class CertificateImpl implements Certificate, Certificate.Definition, Certificate.Update { - private CertificateInner 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 CertificateProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public CertificateInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String connectedEnvironmentName; - - private String certificateName; - - private CertificatePatch updateCertificateEnvelope; - - public CertificateImpl withExistingConnectedEnvironment(String resourceGroupName, String connectedEnvironmentName) { - this.resourceGroupName = resourceGroupName; - this.connectedEnvironmentName = connectedEnvironmentName; - return this; - } - - public Certificate create() { - this.innerObject = serviceManager.serviceClient() - .getConnectedEnvironmentsCertificates() - .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public Certificate create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getConnectedEnvironmentsCertificates() - .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, this.innerModel(), - context) - .getValue(); - return this; - } - - CertificateImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new CertificateInner(); - this.serviceManager = serviceManager; - this.certificateName = name; - } - - public CertificateImpl update() { - this.updateCertificateEnvelope = new CertificatePatch(); - return this; - } - - public Certificate apply() { - this.innerObject = serviceManager.serviceClient() - .getConnectedEnvironmentsCertificates() - .updateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, updateCertificateEnvelope, - Context.NONE) - .getValue(); - return this; - } - - public Certificate apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getConnectedEnvironmentsCertificates() - .updateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, updateCertificateEnvelope, - context) - .getValue(); - return this; - } - - CertificateImpl(CertificateInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.connectedEnvironmentName - = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); - this.certificateName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "certificates"); - } - - public Certificate refresh() { - 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(); - return this; - } - - public CertificateImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public CertificateImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public CertificateImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateCertificateEnvelope.withTags(tags); - return this; - } - } - - public CertificateImpl withProperties(CertificateProperties properties) { - this.innerModel().withProperties(properties); - 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/CertificatesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java deleted file mode 100644 index e73945511e00..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java +++ /dev/null @@ -1,911 +0,0 @@ -// Copyright (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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.CertificatesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; -import com.azure.resourcemanager.appcontainers.models.CertificateCollection; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; -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 CertificatesClient. - */ -public final class CertificatesClientImpl implements CertificatesClient { - /** - * The proxy service used to perform REST calls. - */ - private final CertificatesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of CertificatesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - CertificatesClientImpl(ContainerAppsApiClientImpl client) { - this.service - = RestProxy.create(CertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientCertificates to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface CertificatesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("certificateName") String certificateName, - @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}/certificates/{certificateName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CertificateInner certificateEnvelope, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CertificatePatch certificateEnvelope, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the Certificates in 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 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 Certificates in a given managed environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the Certificates in 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 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 Certificates in a given managed environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String environmentName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, environmentName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the Certificates in 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 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 Certificates in a given managed environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get the Certificates in 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 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 Certificates in a given managed environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Certificates in 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 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 Certificates in a given managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); - } - - /** - * Get the Certificates in 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 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 Certificates in a given managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); - } - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 specified Certificate along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, - String certificateName) { - 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 (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName 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, certificateName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 specified Certificate along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, - String certificateName, 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 (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName 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, certificateName, this.client.getApiVersion(), accept, context); - } - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 specified Certificate on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String environmentName, String certificateName) { - return getWithResponseAsync(resourceGroupName, environmentName, certificateName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 specified Certificate along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String environmentName, - String certificateName, Context context) { - return getWithResponseAsync(resourceGroupName, environmentName, certificateName, context).block(); - } - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 specified Certificate. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner get(String resourceGroupName, String environmentName, String certificateName) { - return getWithResponse(resourceGroupName, environmentName, certificateName, Context.NONE).getValue(); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Certificate to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String certificateName, CertificateInner certificateEnvelope) { - 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 (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (certificateEnvelope != null) { - certificateEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, certificateName, this.client.getApiVersion(), certificateEnvelope, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String certificateName, CertificateInner certificateEnvelope, 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 (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (certificateEnvelope != null) { - certificateEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, certificateName, this.client.getApiVersion(), certificateEnvelope, accept, context); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, - String certificateName) { - final CertificateInner certificateEnvelope = null; - return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, certificateName, certificateEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, - String certificateName, CertificateInner certificateEnvelope, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, certificateName, certificateEnvelope, - context).block(); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner createOrUpdate(String resourceGroupName, String environmentName, String certificateName) { - final CertificateInner certificateEnvelope = null; - return createOrUpdateWithResponse(resourceGroupName, environmentName, certificateName, certificateEnvelope, - Context.NONE).getValue(); - } - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 environmentName, - String certificateName) { - 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 (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName 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, certificateName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 environmentName, - String certificateName, 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 (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName 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, certificateName, this.client.getApiVersion(), accept, context); - } - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 environmentName, String certificateName) { - return deleteWithResponseAsync(resourceGroupName, environmentName, certificateName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String environmentName, String certificateName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, environmentName, certificateName, context).block(); - } - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 environmentName, String certificateName) { - deleteWithResponse(resourceGroupName, environmentName, certificateName, Context.NONE); - } - - /** - * Update properties of a certificate - * - * Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String environmentName, - String certificateName, CertificatePatch certificateEnvelope) { - 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 (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (certificateEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateEnvelope is required and cannot be null.")); - } else { - certificateEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, certificateName, this.client.getApiVersion(), certificateEnvelope, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update properties of a certificate - * - * Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, String environmentName, - String certificateName, CertificatePatch certificateEnvelope, 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 (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (certificateEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateEnvelope is required and cannot be null.")); - } else { - certificateEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, certificateName, this.client.getApiVersion(), certificateEnvelope, accept, context); - } - - /** - * Update properties of a certificate - * - * Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String environmentName, String certificateName, - CertificatePatch certificateEnvelope) { - return updateWithResponseAsync(resourceGroupName, environmentName, certificateName, certificateEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update properties of a certificate - * - * Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String environmentName, - String certificateName, CertificatePatch certificateEnvelope, Context context) { - return updateWithResponseAsync(resourceGroupName, environmentName, certificateName, certificateEnvelope, - context).block(); - } - - /** - * Update properties of a certificate - * - * Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner update(String resourceGroupName, String environmentName, String certificateName, - CertificatePatch certificateEnvelope) { - return updateWithResponse(resourceGroupName, environmentName, certificateName, certificateEnvelope, - Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of Certificates along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of Certificates 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/CertificatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java deleted file mode 100644 index 8d014c732e36..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (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.CertificatesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; -import com.azure.resourcemanager.appcontainers.models.Certificate; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; -import com.azure.resourcemanager.appcontainers.models.Certificates; - -public final class CertificatesImpl implements Certificates { - private static final ClientLogger LOGGER = new ClientLogger(CertificatesImpl.class); - - private final CertificatesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public CertificatesImpl(CertificatesClient 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 CertificateImpl(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 CertificateImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String environmentName, - String certificateName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, environmentName, certificateName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CertificateImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Certificate get(String resourceGroupName, String environmentName, String certificateName) { - CertificateInner inner = this.serviceClient().get(resourceGroupName, environmentName, certificateName); - if (inner != null) { - return new CertificateImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, - String certificateName, CertificateInner certificateEnvelope, Context 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())); - } else { - return null; - } - } - - public Certificate createOrUpdate(String resourceGroupName, String environmentName, String certificateName) { - CertificateInner inner - = this.serviceClient().createOrUpdate(resourceGroupName, environmentName, certificateName); - if (inner != null) { - return new CertificateImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String environmentName, String certificateName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, certificateName, context); - } - - public void delete(String resourceGroupName, String environmentName, String certificateName) { - this.serviceClient().delete(resourceGroupName, environmentName, certificateName); - } - - public Response updateWithResponse(String resourceGroupName, String environmentName, - String certificateName, CertificatePatch certificateEnvelope, Context 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())); - } else { - return null; - } - } - - public Certificate update(String resourceGroupName, String environmentName, String certificateName, - CertificatePatch certificateEnvelope) { - CertificateInner inner - = this.serviceClient().update(resourceGroupName, environmentName, certificateName, certificateEnvelope); - if (inner != null) { - return new CertificateImpl(inner, this.manager()); - } else { - return null; - } - } - - private CertificatesClient 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/CheckNameAvailabilityResponseImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CheckNameAvailabilityResponseImpl.java deleted file mode 100644 index fcc2727cde3d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CheckNameAvailabilityResponseImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityResponse; - -public final class CheckNameAvailabilityResponseImpl implements CheckNameAvailabilityResponse { - private CheckNameAvailabilityResponseInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - CheckNameAvailabilityResponseImpl(CheckNameAvailabilityResponseInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public Boolean nameAvailable() { - return this.innerModel().nameAvailable(); - } - - public CheckNameAvailabilityReason reason() { - return this.innerModel().reason(); - } - - public String message() { - return this.innerModel().message(); - } - - public CheckNameAvailabilityResponseInner 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/ConnectedEnvironmentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentImpl.java deleted file mode 100644 index 47db3449f3da..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentImpl.java +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (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.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityResponse; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironment; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import java.util.Collections; -import java.util.Map; - -public final class ConnectedEnvironmentImpl - implements ConnectedEnvironment, ConnectedEnvironment.Definition, ConnectedEnvironment.Update { - private ConnectedEnvironmentInner 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 ExtendedLocation extendedLocation() { - return this.innerModel().extendedLocation(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public ConnectedEnvironmentProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String deploymentErrors() { - return this.innerModel().deploymentErrors(); - } - - public String defaultDomain() { - return this.innerModel().defaultDomain(); - } - - public String staticIp() { - return this.innerModel().staticIp(); - } - - public String daprAIConnectionString() { - return this.innerModel().daprAIConnectionString(); - } - - public CustomDomainConfiguration customDomainConfiguration() { - return this.innerModel().customDomainConfiguration(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ConnectedEnvironmentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String connectedEnvironmentName; - - public ConnectedEnvironmentImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public ConnectedEnvironment create() { - 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); - return this; - } - - ConnectedEnvironmentImpl(String name, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new ConnectedEnvironmentInner(); - this.serviceManager = serviceManager; - this.connectedEnvironmentName = name; - } - - public ConnectedEnvironmentImpl update() { - return this; - } - - public ConnectedEnvironment apply() { - 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); - return this; - } - - ConnectedEnvironmentImpl(ConnectedEnvironmentInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.connectedEnvironmentName - = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); - } - - public ConnectedEnvironment refresh() { - 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(); - return this; - } - - public Response - checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context) { - return serviceManager.connectedEnvironments() - .checkNameAvailabilityWithResponse(resourceGroupName, connectedEnvironmentName, - checkNameAvailabilityRequest, context); - } - - public CheckNameAvailabilityResponse - checkNameAvailability(CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - return serviceManager.connectedEnvironments() - .checkNameAvailability(resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest); - } - - public ConnectedEnvironmentImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ConnectedEnvironmentImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ConnectedEnvironmentImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; - } - - public ConnectedEnvironmentImpl withExtendedLocation(ExtendedLocation extendedLocation) { - this.innerModel().withExtendedLocation(extendedLocation); - return this; - } - - public ConnectedEnvironmentImpl withStaticIp(String staticIp) { - this.innerModel().withStaticIp(staticIp); - return this; - } - - public ConnectedEnvironmentImpl withDaprAIConnectionString(String daprAIConnectionString) { - this.innerModel().withDaprAIConnectionString(daprAIConnectionString); - return this; - } - - public ConnectedEnvironmentImpl withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration) { - this.innerModel().withCustomDomainConfiguration(customDomainConfiguration); - return this; - } -} 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 deleted file mode 100644 index 9b485850e274..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright (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.ConnectedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorage; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; - -public final class ConnectedEnvironmentStorageImpl - implements ConnectedEnvironmentStorage, ConnectedEnvironmentStorage.Definition, ConnectedEnvironmentStorage.Update { - private ConnectedEnvironmentStorageInner 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 ConnectedEnvironmentStorageProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ConnectedEnvironmentStorageInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String connectedEnvironmentName; - - private String storageName; - - public ConnectedEnvironmentStorageImpl withExistingConnectedEnvironment(String resourceGroupName, - String connectedEnvironmentName) { - this.resourceGroupName = resourceGroupName; - this.connectedEnvironmentName = connectedEnvironmentName; - return this; - } - - public ConnectedEnvironmentStorage create() { - 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(); - return this; - } - - ConnectedEnvironmentStorageImpl(String name, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new ConnectedEnvironmentStorageInner(); - this.serviceManager = serviceManager; - this.storageName = name; - } - - public ConnectedEnvironmentStorageImpl update() { - return this; - } - - public ConnectedEnvironmentStorage apply() { - 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(); - return this; - } - - ConnectedEnvironmentStorageImpl(ConnectedEnvironmentStorageInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.connectedEnvironmentName - = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); - this.storageName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "storages"); - } - - public ConnectedEnvironmentStorage refresh() { - 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(); - return this; - } - - public ConnectedEnvironmentStorageImpl withProperties(ConnectedEnvironmentStorageProperties properties) { - this.innerModel().withProperties(properties); - 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 deleted file mode 100644 index c5aaf65dce2f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStoragesCollectionImpl.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.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorage; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStoragesCollection; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class ConnectedEnvironmentStoragesCollectionImpl implements ConnectedEnvironmentStoragesCollection { - private ConnectedEnvironmentStoragesCollectionInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - ConnectedEnvironmentStoragesCollectionImpl(ConnectedEnvironmentStoragesCollectionInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner.stream() - .map(inner1 -> new ConnectedEnvironmentStorageImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public ConnectedEnvironmentStoragesCollectionInner 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/ConnectedEnvironmentsCertificatesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java deleted file mode 100644 index 9e35fe01415c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java +++ /dev/null @@ -1,924 +0,0 @@ -// Copyright (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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsCertificatesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; -import com.azure.resourcemanager.appcontainers.models.CertificateCollection; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; -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 ConnectedEnvironmentsCertificatesClient. - */ -public final class ConnectedEnvironmentsCertificatesClientImpl implements ConnectedEnvironmentsCertificatesClient { - /** - * The proxy service used to perform REST calls. - */ - private final ConnectedEnvironmentsCertificatesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ConnectedEnvironmentsCertificatesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ConnectedEnvironmentsCertificatesClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(ConnectedEnvironmentsCertificatesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientConnectedEnvironmentsCertificates to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ConnectedEnvironmentsCertificatesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("certificateName") String certificateName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("certificateName") String certificateName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CertificateInner certificateEnvelope, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("certificateName") String certificateName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("certificateName") String certificateName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CertificatePatch certificateEnvelope, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the Certificates in a given connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given connected environment along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String connectedEnvironmentName) { - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, connectedEnvironmentName, 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 Certificates in a given connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given connected environment along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String connectedEnvironmentName, 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName 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, - connectedEnvironmentName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the Certificates in a given connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given connected environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String connectedEnvironmentName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, connectedEnvironmentName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get the Certificates in a given connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given connected environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String connectedEnvironmentName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, connectedEnvironmentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Certificates in a given connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given connected environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String connectedEnvironmentName) { - return new PagedIterable<>(listAsync(resourceGroupName, connectedEnvironmentName)); - } - - /** - * Get the Certificates in a given connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given connected environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String connectedEnvironmentName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, connectedEnvironmentName, context)); - } - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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 specified Certificate along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, String certificateName) { - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - connectedEnvironmentName, certificateName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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 specified Certificate along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, String certificateName, 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName 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, - connectedEnvironmentName, certificateName, this.client.getApiVersion(), accept, context); - } - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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 specified Certificate on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String connectedEnvironmentName, - String certificateName) { - return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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 specified Certificate along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, - String certificateName, Context context) { - return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, context).block(); - } - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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 specified Certificate. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner get(String resourceGroupName, String connectedEnvironmentName, String certificateName) { - return getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, Context.NONE).getValue(); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Certificate to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, String certificateName, CertificateInner certificateEnvelope) { - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (certificateEnvelope != null) { - certificateEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, connectedEnvironmentName, certificateName, this.client.getApiVersion(), - certificateEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, String certificateName, CertificateInner certificateEnvelope, - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (certificateEnvelope != null) { - certificateEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - connectedEnvironmentName, certificateName, this.client.getApiVersion(), certificateEnvelope, accept, - context); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String connectedEnvironmentName, - String certificateName) { - final CertificateInner certificateEnvelope = null; - return createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, - certificateEnvelope).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String connectedEnvironmentName, String certificateName, CertificateInner certificateEnvelope, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, - certificateEnvelope, context).block(); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, - String certificateName) { - final CertificateInner certificateEnvelope = null; - return createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, - certificateEnvelope, Context.NONE).getValue(); - } - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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 connectedEnvironmentName, - String certificateName) { - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - connectedEnvironmentName, certificateName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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 connectedEnvironmentName, - String certificateName, 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName 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, - connectedEnvironmentName, certificateName, this.client.getApiVersion(), accept, context); - } - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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 connectedEnvironmentName, String certificateName) { - return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, - String certificateName, Context context) { - return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, context).block(); - } - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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 connectedEnvironmentName, String certificateName) { - deleteWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, Context.NONE); - } - - /** - * Update properties of a certificate - * - * Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, String certificateName, CertificatePatch certificateEnvelope) { - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (certificateEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateEnvelope is required and cannot be null.")); - } else { - certificateEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, connectedEnvironmentName, certificateName, this.client.getApiVersion(), - certificateEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update properties of a certificate - * - * Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, String certificateName, CertificatePatch certificateEnvelope, - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (certificateName == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); - } - if (certificateEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter certificateEnvelope is required and cannot be null.")); - } else { - certificateEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - connectedEnvironmentName, certificateName, this.client.getApiVersion(), certificateEnvelope, accept, - context); - } - - /** - * Update properties of a certificate - * - * Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String connectedEnvironmentName, - String certificateName, CertificatePatch certificateEnvelope) { - return updateWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, - certificateEnvelope).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update properties of a certificate - * - * Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String connectedEnvironmentName, - String certificateName, CertificatePatch certificateEnvelope, Context context) { - return updateWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, - certificateEnvelope, context).block(); - } - - /** - * Update properties of a certificate - * - * Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner update(String resourceGroupName, String connectedEnvironmentName, String certificateName, - CertificatePatch certificateEnvelope) { - return updateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, - Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of Certificates along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of Certificates 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/ConnectedEnvironmentsCertificatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java deleted file mode 100644 index bbe34b1865dd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (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.ConnectedEnvironmentsCertificatesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; -import com.azure.resourcemanager.appcontainers.models.Certificate; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsCertificates; - -public final class ConnectedEnvironmentsCertificatesImpl implements ConnectedEnvironmentsCertificates { - private static final ClientLogger LOGGER = new ClientLogger(ConnectedEnvironmentsCertificatesImpl.class); - - private final ConnectedEnvironmentsCertificatesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ConnectedEnvironmentsCertificatesImpl(ConnectedEnvironmentsCertificatesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String connectedEnvironmentName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, connectedEnvironmentName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String connectedEnvironmentName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, connectedEnvironmentName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, - String certificateName, Context 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())); - } else { - return null; - } - } - - public Certificate get(String resourceGroupName, String connectedEnvironmentName, String certificateName) { - CertificateInner inner = this.serviceClient().get(resourceGroupName, connectedEnvironmentName, certificateName); - if (inner != null) { - return new CertificateImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, - String certificateName, Context context) { - return this.serviceClient() - .deleteWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context); - } - - public void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName) { - this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, certificateName); - } - - public Certificate 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 connectedEnvironmentName = ResourceManagerUtils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); - } - String certificateName = ResourceManagerUtils.getValueFromIdByName(id, "certificates"); - if (certificateName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); - } - return this.getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, 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 connectedEnvironmentName = ResourceManagerUtils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); - } - String certificateName = ResourceManagerUtils.getValueFromIdByName(id, "certificates"); - if (certificateName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); - } - return this.getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, 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 connectedEnvironmentName = ResourceManagerUtils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); - } - String certificateName = ResourceManagerUtils.getValueFromIdByName(id, "certificates"); - if (certificateName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); - } - this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, Context.NONE); - } - - public Response 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 connectedEnvironmentName = ResourceManagerUtils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); - } - String certificateName = ResourceManagerUtils.getValueFromIdByName(id, "certificates"); - if (certificateName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); - } - return this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context); - } - - private ConnectedEnvironmentsCertificatesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public CertificateImpl define(String name) { - return new CertificateImpl(name, this.manager()); - } -} 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 deleted file mode 100644 index f3bb3db660a0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java +++ /dev/null @@ -1,1383 +0,0 @@ -// Copyright (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.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.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.ConnectedEnvironmentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentCollection; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ConnectedEnvironmentsClient. - */ -public final class ConnectedEnvironmentsClientImpl implements ConnectedEnvironmentsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ConnectedEnvironmentsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ConnectedEnvironmentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ConnectedEnvironmentsClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(ConnectedEnvironmentsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientConnectedEnvironments to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ConnectedEnvironmentsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/connectedEnvironments") - @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/connectedEnvironments") - @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/connectedEnvironments/{connectedEnvironmentName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ConnectedEnvironmentInner environmentEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/checkNameAvailability") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> checkNameAvailability(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CheckNameAvailabilityRequest checkNameAvailabilityRequest, - @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 all connectedEnvironments for a 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 all connectedEnvironments for a 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 all connectedEnvironments for a 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 all connectedEnvironments for a 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 all connectedEnvironments for a 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 all connectedEnvironments for a subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Get all connectedEnvironments for a 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 all connectedEnvironments for a 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 all connectedEnvironments for a 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 all connectedEnvironments for a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Get all connectedEnvironments for a 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 all connectedEnvironments for a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get all connectedEnvironments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments in a resource group 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 all connectedEnvironments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments in a resource group 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 all connectedEnvironments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments in a resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Get all connectedEnvironments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments in a resource group 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 all connectedEnvironments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Get all connectedEnvironments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments in a resource group 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 an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 an connectedEnvironment along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName) { - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, connectedEnvironmentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the properties of an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 an connectedEnvironment along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName 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, - connectedEnvironmentName, this.client.getApiVersion(), accept, context); - } - - /** - * Get the properties of an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 an connectedEnvironment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, - String connectedEnvironmentName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, connectedEnvironmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the properties of an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 an connectedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String connectedEnvironmentName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, connectedEnvironmentName, context).block(); - } - - /** - * Get the properties of an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 an connectedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedEnvironmentInner getByResourceGroup(String resourceGroupName, String connectedEnvironmentName) { - return getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, Context.NONE).getValue(); - } - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope) { - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (environmentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentEnvelope is required and cannot be null.")); - } else { - environmentEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, connectedEnvironmentName, this.client.getApiVersion(), environmentEnvelope, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope, 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (environmentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentEnvelope is required and cannot be null.")); - } else { - environmentEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - connectedEnvironmentName, this.client.getApiVersion(), environmentEnvelope, accept, context); - } - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads - * by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ConnectedEnvironmentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ConnectedEnvironmentInner.class, ConnectedEnvironmentInner.class, - this.client.getContext()); - } - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads - * by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ConnectedEnvironmentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, - connectedEnvironmentName, environmentEnvelope, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ConnectedEnvironmentInner.class, ConnectedEnvironmentInner.class, context); - } - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads - * by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConnectedEnvironmentInner> beginCreateOrUpdate( - String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope) { - return this.beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope) - .getSyncPoller(); - } - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads - * by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ConnectedEnvironmentInner> beginCreateOrUpdate( - String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope, context) - .getSyncPoller(); - } - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads by Azure App Service on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads by Azure App Service on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedEnvironmentInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, - ConnectedEnvironmentInner environmentEnvelope) { - return createOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope).block(); - } - - /** - * Creates or updates an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @param environmentEnvelope Configuration details of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedEnvironmentInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, - ConnectedEnvironmentInner environmentEnvelope, Context context) { - return createOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope, context).block(); - } - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 connectedEnvironmentName) { - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, connectedEnvironmentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 connectedEnvironmentName, 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName 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, - connectedEnvironmentName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 connectedEnvironmentName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 connectedEnvironmentName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 connectedEnvironmentName) { - return this.beginDeleteAsync(resourceGroupName, connectedEnvironmentName).getSyncPoller(); - } - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 connectedEnvironmentName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, connectedEnvironmentName, context).getSyncPoller(); - } - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 connectedEnvironmentName) { - return beginDeleteAsync(resourceGroupName, connectedEnvironmentName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 connectedEnvironmentName, Context context) { - return beginDeleteAsync(resourceGroupName, connectedEnvironmentName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 connectedEnvironmentName) { - deleteAsync(resourceGroupName, connectedEnvironmentName).block(); - } - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 connectedEnvironmentName, Context context) { - deleteAsync(resourceGroupName, connectedEnvironmentName, context).block(); - } - - /** - * Update connected Environment's properties. - * - * Patches a Managed Environment. Only patching of tags is supported currently. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName) { - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, connectedEnvironmentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update connected Environment's properties. - * - * Patches a Managed Environment. Only patching of tags is supported currently. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - connectedEnvironmentName, this.client.getApiVersion(), accept, context); - } - - /** - * Update connected Environment's properties. - * - * Patches a Managed Environment. Only patching of tags is supported currently. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads by Azure App Service on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String connectedEnvironmentName) { - return updateWithResponseAsync(resourceGroupName, connectedEnvironmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update connected Environment's properties. - * - * Patches a Managed Environment. Only patching of tags is supported currently. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, - String connectedEnvironmentName, Context context) { - return updateWithResponseAsync(resourceGroupName, connectedEnvironmentName, context).block(); - } - - /** - * Update connected Environment's properties. - * - * Patches a Managed Environment. Only patching of tags is supported currently. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads by Azure App Service. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedEnvironmentInner update(String resourceGroupName, String connectedEnvironmentName) { - return updateWithResponse(resourceGroupName, connectedEnvironmentName, Context.NONE).getValue(); - } - - /** - * Checks the resource connectedEnvironmentName availability. - * - * Checks if resource connectedEnvironmentName is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. - * @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 check availability result along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (checkNameAvailabilityRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter checkNameAvailabilityRequest is required and cannot be null.")); - } else { - checkNameAvailabilityRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, connectedEnvironmentName, - this.client.getApiVersion(), checkNameAvailabilityRequest, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Checks the resource connectedEnvironmentName availability. - * - * Checks if resource connectedEnvironmentName is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. - * @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 check availability result along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (checkNameAvailabilityRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter checkNameAvailabilityRequest is required and cannot be null.")); - } else { - checkNameAvailabilityRequest.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.checkNameAvailability(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, connectedEnvironmentName, this.client.getApiVersion(), checkNameAvailabilityRequest, - accept, context); - } - - /** - * Checks the resource connectedEnvironmentName availability. - * - * Checks if resource connectedEnvironmentName is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. - * @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 check availability result on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkNameAvailabilityAsync(String resourceGroupName, - String connectedEnvironmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - return checkNameAvailabilityWithResponseAsync(resourceGroupName, connectedEnvironmentName, - checkNameAvailabilityRequest).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Checks the resource connectedEnvironmentName availability. - * - * Checks if resource connectedEnvironmentName is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. - * @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 check availability result along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse(String resourceGroupName, - String connectedEnvironmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context) { - return checkNameAvailabilityWithResponseAsync(resourceGroupName, connectedEnvironmentName, - checkNameAvailabilityRequest, context).block(); - } - - /** - * Checks the resource connectedEnvironmentName availability. - * - * Checks if resource connectedEnvironmentName is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. - * @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 check availability result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CheckNameAvailabilityResponseInner checkNameAvailability(String resourceGroupName, - String connectedEnvironmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - return checkNameAvailabilityWithResponse(resourceGroupName, connectedEnvironmentName, - checkNameAvailabilityRequest, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of connectedEnvironments 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. - * @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 collection of connectedEnvironments 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. - * @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 collection of connectedEnvironments 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. - * @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 collection of connectedEnvironments 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/ConnectedEnvironmentsDaprComponentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java deleted file mode 100644 index 72cf1b79d747..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java +++ /dev/null @@ -1,907 +0,0 @@ -// Copyright (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.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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsDaprComponentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentsCollection; -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 ConnectedEnvironmentsDaprComponentsClient. - */ -public final class ConnectedEnvironmentsDaprComponentsClientImpl implements ConnectedEnvironmentsDaprComponentsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ConnectedEnvironmentsDaprComponentsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ConnectedEnvironmentsDaprComponentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ConnectedEnvironmentsDaprComponentsClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(ConnectedEnvironmentsDaprComponentsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientConnectedEnvironmentsDaprComponents to be used - * by the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ConnectedEnvironmentsDaprComponentsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("componentName") String componentName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("componentName") String componentName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DaprComponentInner daprComponentEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("componentName") String componentName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}/listSecrets") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listSecrets(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("componentName") String componentName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the Dapr Components for a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a connected environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String connectedEnvironmentName) { - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, connectedEnvironmentName, 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 Dapr Components for a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a connected environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String connectedEnvironmentName, 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName 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, - connectedEnvironmentName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the Dapr Components for a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a connected environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String connectedEnvironmentName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, connectedEnvironmentName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get the Dapr Components for a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a connected environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String connectedEnvironmentName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, connectedEnvironmentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Dapr Components for a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String connectedEnvironmentName) { - return new PagedIterable<>(listAsync(resourceGroupName, connectedEnvironmentName)); - } - - /** - * Get the Dapr Components for a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String connectedEnvironmentName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, connectedEnvironmentName, context)); - } - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, String componentName) { - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - connectedEnvironmentName, componentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, String componentName, 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName 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, - connectedEnvironmentName, componentName, this.client.getApiVersion(), accept, context); - } - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String connectedEnvironmentName, - String componentName) { - return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, - String componentName, Context context) { - return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName, context).block(); - } - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DaprComponentInner get(String resourceGroupName, String connectedEnvironmentName, String componentName) { - return getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE).getValue(); - } - - /** - * Creates or updates a Dapr Component. - * - * Creates or updates a Dapr Component in a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @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 dapr Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, String componentName, DaprComponentInner daprComponentEnvelope) { - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (daprComponentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter daprComponentEnvelope is required and cannot be null.")); - } else { - daprComponentEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, connectedEnvironmentName, componentName, this.client.getApiVersion(), - daprComponentEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a Dapr Component. - * - * Creates or updates a Dapr Component in a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @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 dapr Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, String componentName, DaprComponentInner daprComponentEnvelope, - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (daprComponentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter daprComponentEnvelope is required and cannot be null.")); - } else { - daprComponentEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - connectedEnvironmentName, componentName, this.client.getApiVersion(), daprComponentEnvelope, accept, - context); - } - - /** - * Creates or updates a Dapr Component. - * - * Creates or updates a Dapr Component in a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @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 dapr Component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String connectedEnvironmentName, - String componentName, DaprComponentInner daprComponentEnvelope) { - return createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName, - daprComponentEnvelope).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates a Dapr Component. - * - * Creates or updates a Dapr Component in a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @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 dapr Component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String connectedEnvironmentName, String componentName, DaprComponentInner daprComponentEnvelope, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName, - daprComponentEnvelope, context).block(); - } - - /** - * Creates or updates a Dapr Component. - * - * Creates or updates a Dapr Component in a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @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 dapr Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DaprComponentInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, - String componentName, DaprComponentInner daprComponentEnvelope) { - return createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, componentName, - daprComponentEnvelope, Context.NONE).getValue(); - } - - /** - * Delete a Dapr Component. - * - * Delete a Dapr Component from a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 connectedEnvironmentName, - String componentName) { - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - connectedEnvironmentName, componentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Dapr Component. - * - * Delete a Dapr Component from a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 connectedEnvironmentName, - String componentName, 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName 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, - connectedEnvironmentName, componentName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete a Dapr Component. - * - * Delete a Dapr Component from a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 connectedEnvironmentName, String componentName) { - return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a Dapr Component. - * - * Delete a Dapr Component from a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, - String componentName, Context context) { - return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName, context).block(); - } - - /** - * Delete a Dapr Component. - * - * Delete a Dapr Component from a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 connectedEnvironmentName, String componentName) { - deleteWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE); - } - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component Secrets Collection for ListSecrets Action along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, String componentName) { - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, connectedEnvironmentName, componentName, this.client.getApiVersion(), accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component Secrets Collection for ListSecrets Action along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, String componentName, 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - connectedEnvironmentName, componentName, this.client.getApiVersion(), accept, context); - } - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component Secrets Collection for ListSecrets Action on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listSecretsAsync(String resourceGroupName, String connectedEnvironmentName, - String componentName) { - return listSecretsWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component Secrets Collection for ListSecrets Action along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSecretsWithResponse(String resourceGroupName, - String connectedEnvironmentName, String componentName, Context context) { - return listSecretsWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName, context) - .block(); - } - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component Secrets Collection for ListSecrets Action. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DaprSecretsCollectionInner listSecrets(String resourceGroupName, String connectedEnvironmentName, - String componentName) { - return listSecretsWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE) - .getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Components ARM 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. - * @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 dapr Components ARM 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/ConnectedEnvironmentsDaprComponentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java deleted file mode 100644 index 81cb2b05c3e1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java +++ /dev/null @@ -1,187 +0,0 @@ -// Copyright (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.ConnectedEnvironmentsDaprComponentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsDaprComponents; -import com.azure.resourcemanager.appcontainers.models.DaprComponent; -import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; - -public final class ConnectedEnvironmentsDaprComponentsImpl implements ConnectedEnvironmentsDaprComponents { - private static final ClientLogger LOGGER = new ClientLogger(ConnectedEnvironmentsDaprComponentsImpl.class); - - private final ConnectedEnvironmentsDaprComponentsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ConnectedEnvironmentsDaprComponentsImpl(ConnectedEnvironmentsDaprComponentsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String connectedEnvironmentName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, connectedEnvironmentName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DaprComponentImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String connectedEnvironmentName, - Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, connectedEnvironmentName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DaprComponentImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, - String componentName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DaprComponentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DaprComponent get(String resourceGroupName, String connectedEnvironmentName, String componentName) { - DaprComponentInner inner = this.serviceClient().get(resourceGroupName, connectedEnvironmentName, componentName); - if (inner != null) { - return new DaprComponentImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, - String componentName, Context context) { - return this.serviceClient() - .deleteWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); - } - - public void delete(String resourceGroupName, String connectedEnvironmentName, String componentName) { - this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, componentName); - } - - public Response listSecretsWithResponse(String resourceGroupName, - String connectedEnvironmentName, String componentName, Context 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())); - } else { - return null; - } - } - - public DaprSecretsCollection listSecrets(String resourceGroupName, String connectedEnvironmentName, - String componentName) { - DaprSecretsCollectionInner inner - = this.serviceClient().listSecrets(resourceGroupName, connectedEnvironmentName, componentName); - if (inner != null) { - return new DaprSecretsCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public DaprComponent 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 connectedEnvironmentName = ResourceManagerUtils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); - } - String componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - return this.getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, 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 connectedEnvironmentName = ResourceManagerUtils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); - } - String componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - return this.getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, 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 connectedEnvironmentName = ResourceManagerUtils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); - } - String componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE); - } - - public Response 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 connectedEnvironmentName = ResourceManagerUtils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); - } - String componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - return this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); - } - - private ConnectedEnvironmentsDaprComponentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public DaprComponentImpl define(String name) { - return new DaprComponentImpl(name, 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 deleted file mode 100644 index 65670a635404..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsImpl.java +++ /dev/null @@ -1,197 +0,0 @@ -// Copyright (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.ConnectedEnvironmentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityResponse; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironment; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironments; - -public final class ConnectedEnvironmentsImpl implements ConnectedEnvironments { - private static final ClientLogger LOGGER = new ClientLogger(ConnectedEnvironmentsImpl.class); - - private final ConnectedEnvironmentsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ConnectedEnvironmentsImpl(ConnectedEnvironmentsClient 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 ConnectedEnvironmentImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectedEnvironmentImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectedEnvironmentImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectedEnvironmentImpl(inner1, this.manager())); - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, - String connectedEnvironmentName, Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ConnectedEnvironmentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ConnectedEnvironment getByResourceGroup(String resourceGroupName, String connectedEnvironmentName) { - ConnectedEnvironmentInner inner - = this.serviceClient().getByResourceGroup(resourceGroupName, connectedEnvironmentName); - if (inner != null) { - return new ConnectedEnvironmentImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String connectedEnvironmentName) { - this.serviceClient().delete(resourceGroupName, connectedEnvironmentName); - } - - public void delete(String resourceGroupName, String connectedEnvironmentName, Context context) { - this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, context); - } - - public Response updateWithResponse(String resourceGroupName, String connectedEnvironmentName, - Context context) { - Response inner - = this.serviceClient().updateWithResponse(resourceGroupName, connectedEnvironmentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ConnectedEnvironmentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ConnectedEnvironment update(String resourceGroupName, String connectedEnvironmentName) { - ConnectedEnvironmentInner inner = this.serviceClient().update(resourceGroupName, connectedEnvironmentName); - if (inner != null) { - return new ConnectedEnvironmentImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response checkNameAvailabilityWithResponse(String resourceGroupName, - String connectedEnvironmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context 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())); - } else { - return null; - } - } - - public CheckNameAvailabilityResponse checkNameAvailability(String resourceGroupName, - String connectedEnvironmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - CheckNameAvailabilityResponseInner inner = this.serviceClient() - .checkNameAvailability(resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest); - if (inner != null) { - return new CheckNameAvailabilityResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - public ConnectedEnvironment 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 connectedEnvironmentName = ResourceManagerUtils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, 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 connectedEnvironmentName = ResourceManagerUtils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, 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 connectedEnvironmentName = ResourceManagerUtils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); - } - this.delete(resourceGroupName, connectedEnvironmentName, 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 connectedEnvironmentName = ResourceManagerUtils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); - } - this.delete(resourceGroupName, connectedEnvironmentName, context); - } - - private ConnectedEnvironmentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public ConnectedEnvironmentImpl define(String name) { - return new ConnectedEnvironmentImpl(name, this.manager()); - } -} 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 deleted file mode 100644 index 313d8933511a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java +++ /dev/null @@ -1,651 +0,0 @@ -// Copyright (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.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.ConnectedEnvironmentsStoragesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; -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 ConnectedEnvironmentsStoragesClient. - */ -public final class ConnectedEnvironmentsStoragesClientImpl implements ConnectedEnvironmentsStoragesClient { - /** - * The proxy service used to perform REST calls. - */ - private final ConnectedEnvironmentsStoragesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ConnectedEnvironmentsStoragesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ConnectedEnvironmentsStoragesClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(ConnectedEnvironmentsStoragesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientConnectedEnvironmentsStorages to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ConnectedEnvironmentsStoragesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("storageName") String storageName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("storageName") String storageName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ConnectedEnvironmentStorageInner storageEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("storageName") String storageName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get all storages for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a connectedEnvironment along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName) { - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, connectedEnvironmentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get all storages for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a connectedEnvironment along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName 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, - connectedEnvironmentName, this.client.getApiVersion(), accept, context); - } - - /** - * Get all storages for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a connectedEnvironment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String resourceGroupName, - String connectedEnvironmentName) { - return listWithResponseAsync(resourceGroupName, connectedEnvironmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get all storages for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a connectedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(String resourceGroupName, - String connectedEnvironmentName, Context context) { - return listWithResponseAsync(resourceGroupName, connectedEnvironmentName, context).block(); - } - - /** - * Get all storages for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a connectedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedEnvironmentStoragesCollectionInner list(String resourceGroupName, String connectedEnvironmentName) { - return listWithResponse(resourceGroupName, connectedEnvironmentName, Context.NONE).getValue(); - } - - /** - * Get storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 storage for a connectedEnvironment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, String storageName) { - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, connectedEnvironmentName, storageName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 storage for a connectedEnvironment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, String storageName, 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName 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, - connectedEnvironmentName, storageName, this.client.getApiVersion(), accept, context); - } - - /** - * Get storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 storage for a connectedEnvironment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String connectedEnvironmentName, - String storageName) { - return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 storage for a connectedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String connectedEnvironmentName, String storageName, Context context) { - return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName, context).block(); - } - - /** - * Get storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 storage for a connectedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedEnvironmentStorageInner get(String resourceGroupName, String connectedEnvironmentName, - String storageName) { - return getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE).getValue(); - } - - /** - * Create or update storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @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 storage resource for connectedEnvironment along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, String storageName, ConnectedEnvironmentStorageInner storageEnvelope) { - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); - } - if (storageEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter storageEnvelope is required and cannot be null.")); - } else { - storageEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, connectedEnvironmentName, storageName, this.client.getApiVersion(), storageEnvelope, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @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 storage resource for connectedEnvironment along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String connectedEnvironmentName, String storageName, ConnectedEnvironmentStorageInner storageEnvelope, - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); - } - if (storageEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter storageEnvelope is required and cannot be null.")); - } else { - storageEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - connectedEnvironmentName, storageName, this.client.getApiVersion(), storageEnvelope, accept, context); - } - - /** - * Create or update storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @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 storage resource for connectedEnvironment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String connectedEnvironmentName, String storageName, ConnectedEnvironmentStorageInner storageEnvelope) { - return createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName, - storageEnvelope).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @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 storage resource for connectedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String connectedEnvironmentName, String storageName, ConnectedEnvironmentStorageInner storageEnvelope, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName, - storageEnvelope, context).block(); - } - - /** - * Create or update storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @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 storage resource for connectedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedEnvironmentStorageInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, - String storageName, ConnectedEnvironmentStorageInner storageEnvelope) { - return createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope, - Context.NONE).getValue(); - } - - /** - * Delete storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 connectedEnvironmentName, - String storageName) { - 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, connectedEnvironmentName, storageName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 connectedEnvironmentName, - String storageName, 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 (connectedEnvironmentName == null) { - return Mono.error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); - } - if (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName 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, - connectedEnvironmentName, storageName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 connectedEnvironmentName, String storageName) { - return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, - String storageName, Context context) { - return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName, context).block(); - } - - /** - * Delete storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 connectedEnvironmentName, String storageName) { - deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE); - } -} 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 deleted file mode 100644 index d8920cd35625..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesImpl.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (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.ConnectedEnvironmentsStoragesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; -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); - - private final ConnectedEnvironmentsStoragesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ConnectedEnvironmentsStoragesImpl(ConnectedEnvironmentsStoragesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response listWithResponse(String resourceGroupName, - String connectedEnvironmentName, Context context) { - Response inner - = this.serviceClient().listWithResponse(resourceGroupName, connectedEnvironmentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ConnectedEnvironmentStoragesCollectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ConnectedEnvironmentStoragesCollection list(String resourceGroupName, String connectedEnvironmentName) { - ConnectedEnvironmentStoragesCollectionInner inner - = this.serviceClient().list(resourceGroupName, connectedEnvironmentName); - if (inner != null) { - return new ConnectedEnvironmentStoragesCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, - String connectedEnvironmentName, String storageName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ConnectedEnvironmentStorageImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ConnectedEnvironmentStorage get(String resourceGroupName, String connectedEnvironmentName, - String storageName) { - ConnectedEnvironmentStorageInner inner - = this.serviceClient().get(resourceGroupName, connectedEnvironmentName, storageName); - if (inner != null) { - return new ConnectedEnvironmentStorageImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, - String storageName, Context context) { - return this.serviceClient() - .deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context); - } - - public void delete(String resourceGroupName, String connectedEnvironmentName, String storageName) { - this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, storageName); - } - - public ConnectedEnvironmentStorage 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 connectedEnvironmentName = ResourceManagerUtils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); - } - String storageName = ResourceManagerUtils.getValueFromIdByName(id, "storages"); - if (storageName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); - } - return this.getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, 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 connectedEnvironmentName = ResourceManagerUtils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); - } - String storageName = ResourceManagerUtils.getValueFromIdByName(id, "storages"); - if (storageName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); - } - return this.getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, 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 connectedEnvironmentName = ResourceManagerUtils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); - } - String storageName = ResourceManagerUtils.getValueFromIdByName(id, "storages"); - if (storageName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); - } - this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE); - } - - public Response 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 connectedEnvironmentName = ResourceManagerUtils.getValueFromIdByName(id, "connectedEnvironments"); - if (connectedEnvironmentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); - } - String storageName = ResourceManagerUtils.getValueFromIdByName(id, "storages"); - if (storageName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); - } - return this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context); - } - - private ConnectedEnvironmentsStoragesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public ConnectedEnvironmentStorageImpl define(String name) { - return new ConnectedEnvironmentStorageImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppAuthTokenImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppAuthTokenImpl.java deleted file mode 100644 index c0b49215b5a4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppAuthTokenImpl.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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppAuthTokenInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppAuthToken; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.Map; - -public final class ContainerAppAuthTokenImpl implements ContainerAppAuthToken { - private ContainerAppAuthTokenInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - ContainerAppAuthTokenImpl(ContainerAppAuthTokenInner 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 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 token() { - return this.innerModel().token(); - } - - public OffsetDateTime expires() { - return this.innerModel().expires(); - } - - public ContainerAppAuthTokenInner 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/ContainerAppImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java deleted file mode 100644 index ef5e6d5f3bcd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java +++ /dev/null @@ -1,336 +0,0 @@ -// Copyright (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.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -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; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class ContainerAppImpl implements ContainerApp, ContainerApp.Definition, ContainerApp.Update { - private ContainerAppInner 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 ExtendedLocation extendedLocation() { - return this.innerModel().extendedLocation(); - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public String managedBy() { - return this.innerModel().managedBy(); - } - - public Kind kind() { - return this.innerModel().kind(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public ContainerAppProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String deploymentErrors() { - return this.innerModel().deploymentErrors(); - } - - public String managedEnvironmentId() { - return this.innerModel().managedEnvironmentId(); - } - - public String environmentId() { - return this.innerModel().environmentId(); - } - - public String workloadProfileName() { - return this.innerModel().workloadProfileName(); - } - - public ContainerAppPropertiesPatchingConfiguration patchingConfiguration() { - return this.innerModel().patchingConfiguration(); - } - - public String latestRevisionName() { - return this.innerModel().latestRevisionName(); - } - - public String latestReadyRevisionName() { - return this.innerModel().latestReadyRevisionName(); - } - - public String latestRevisionFqdn() { - return this.innerModel().latestRevisionFqdn(); - } - - public String customDomainVerificationId() { - return this.innerModel().customDomainVerificationId(); - } - - public Configuration configuration() { - return this.innerModel().configuration(); - } - - public Template template() { - return this.innerModel().template(); - } - - public List outboundIpAddresses() { - List inner = this.innerModel().outboundIpAddresses(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String eventStreamEndpoint() { - return this.innerModel().eventStreamEndpoint(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ContainerAppInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String containerAppName; - - public ContainerAppImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public ContainerApp create() { - 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); - return this; - } - - ContainerAppImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new ContainerAppInner(); - this.serviceManager = serviceManager; - this.containerAppName = name; - } - - public ContainerAppImpl update() { - return this; - } - - public ContainerApp apply() { - 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); - return this; - } - - ContainerAppImpl(ContainerAppInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.containerAppName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "containerApps"); - } - - public ContainerApp refresh() { - 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(); - return this; - } - - public Response listCustomHostnameAnalysisWithResponse(String customHostname, - Context context) { - return serviceManager.containerApps() - .listCustomHostnameAnalysisWithResponse(resourceGroupName, containerAppName, customHostname, context); - } - - public CustomHostnameAnalysisResult listCustomHostnameAnalysis() { - return serviceManager.containerApps().listCustomHostnameAnalysis(resourceGroupName, containerAppName); - } - - public Response listSecretsWithResponse(Context context) { - return serviceManager.containerApps().listSecretsWithResponse(resourceGroupName, containerAppName, context); - } - - public SecretsCollection listSecrets() { - return serviceManager.containerApps().listSecrets(resourceGroupName, containerAppName); - } - - public Response getAuthTokenWithResponse(Context context) { - return serviceManager.containerApps().getAuthTokenWithResponse(resourceGroupName, containerAppName, context); - } - - public ContainerAppAuthToken getAuthToken() { - return serviceManager.containerApps().getAuthToken(resourceGroupName, containerAppName); - } - - public ContainerApp start() { - return serviceManager.containerApps().start(resourceGroupName, containerAppName); - } - - public ContainerApp start(Context context) { - return serviceManager.containerApps().start(resourceGroupName, containerAppName, context); - } - - public ContainerApp stop() { - return serviceManager.containerApps().stop(resourceGroupName, containerAppName); - } - - public ContainerApp stop(Context context) { - return serviceManager.containerApps().stop(resourceGroupName, containerAppName, context); - } - - public ContainerAppImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ContainerAppImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ContainerAppImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; - } - - public ContainerAppImpl withExtendedLocation(ExtendedLocation extendedLocation) { - this.innerModel().withExtendedLocation(extendedLocation); - return this; - } - - public ContainerAppImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public ContainerAppImpl withManagedBy(String managedBy) { - this.innerModel().withManagedBy(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; - } - - public ContainerAppImpl withEnvironmentId(String environmentId) { - this.innerModel().withEnvironmentId(environmentId); - return this; - } - - public ContainerAppImpl withWorkloadProfileName(String workloadProfileName) { - this.innerModel().withWorkloadProfileName(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; - } - - public ContainerAppImpl withTemplate(Template template) { - this.innerModel().withTemplate(template); - 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 deleted file mode 100644 index 6dfa8160d1f7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppJobExecutionsImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppJobExecutionsInner; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppJobExecutions; -import com.azure.resourcemanager.appcontainers.models.JobExecution; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class ContainerAppJobExecutionsImpl implements ContainerAppJobExecutions { - private ContainerAppJobExecutionsInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - ContainerAppJobExecutionsImpl(ContainerAppJobExecutionsInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner.stream() - .map(inner1 -> new JobExecutionImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public String nextLink() { - return this.innerModel().nextLink(); - } - - public ContainerAppJobExecutionsInner 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/ContainerAppsApiClientBuilder.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java deleted file mode 100644 index d2fa8d7fd0f7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (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.ServiceClientBuilder; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.RetryPolicy; -import com.azure.core.http.policy.UserAgentPolicy; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.serializer.SerializerFactory; -import com.azure.core.util.serializer.SerializerAdapter; -import java.time.Duration; - -/** - * A builder for creating a new instance of the ContainerAppsApiClientImpl type. - */ -@ServiceClientBuilder(serviceClients = { ContainerAppsApiClientImpl.class }) -public final class ContainerAppsApiClientBuilder { - /* - * The ID of the target subscription. The value must be an UUID. - */ - private String subscriptionId; - - /** - * Sets The ID of the target subscription. The value must be an UUID. - * - * @param subscriptionId the subscriptionId value. - * @return the ContainerAppsApiClientBuilder. - */ - public ContainerAppsApiClientBuilder subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /* - * server parameter - */ - private String endpoint; - - /** - * Sets server parameter. - * - * @param endpoint the endpoint value. - * @return the ContainerAppsApiClientBuilder. - */ - public ContainerAppsApiClientBuilder endpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /* - * The environment to connect to - */ - private AzureEnvironment environment; - - /** - * Sets The environment to connect to. - * - * @param environment the environment value. - * @return the ContainerAppsApiClientBuilder. - */ - public ContainerAppsApiClientBuilder environment(AzureEnvironment environment) { - this.environment = environment; - return this; - } - - /* - * The HTTP pipeline to send requests through - */ - private HttpPipeline pipeline; - - /** - * Sets The HTTP pipeline to send requests through. - * - * @param pipeline the pipeline value. - * @return the ContainerAppsApiClientBuilder. - */ - public ContainerAppsApiClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; - return this; - } - - /* - * The default poll interval for long-running operation - */ - private Duration defaultPollInterval; - - /** - * Sets The default poll interval for long-running operation. - * - * @param defaultPollInterval the defaultPollInterval value. - * @return the ContainerAppsApiClientBuilder. - */ - public ContainerAppsApiClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; - return this; - } - - /* - * The serializer to serialize an object into a string - */ - private SerializerAdapter serializerAdapter; - - /** - * Sets The serializer to serialize an object into a string. - * - * @param serializerAdapter the serializerAdapter value. - * @return the ContainerAppsApiClientBuilder. - */ - public ContainerAppsApiClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) { - this.serializerAdapter = serializerAdapter; - return this; - } - - /** - * Builds an instance of ContainerAppsApiClientImpl with the provided parameters. - * - * @return an instance of ContainerAppsApiClientImpl. - */ - public ContainerAppsApiClientImpl buildClient() { - String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; - AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval - = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - ContainerAppsApiClientImpl client = new ContainerAppsApiClientImpl(localPipeline, localSerializerAdapter, - localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); - return client; - } -} 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 deleted file mode 100644 index 761f220fb821..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java +++ /dev/null @@ -1,961 +0,0 @@ -// Copyright (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.ServiceClient; -import com.azure.core.http.HttpHeaderName; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpPipeline; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.Response; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.exception.ManagementError; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.management.polling.PollerFactory; -import com.azure.core.util.Context; -import com.azure.core.util.CoreUtils; -import com.azure.core.util.logging.ClientLogger; -import com.azure.core.util.polling.AsyncPollResponse; -import com.azure.core.util.polling.LongRunningOperationStatus; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.serializer.SerializerAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.appcontainers.fluent.AppResilienciesClient; -import com.azure.resourcemanager.appcontainers.fluent.AvailableWorkloadProfilesClient; -import com.azure.resourcemanager.appcontainers.fluent.BillingMetersClient; -import com.azure.resourcemanager.appcontainers.fluent.BuildAuthTokensClient; -import com.azure.resourcemanager.appcontainers.fluent.BuildersClient; -import com.azure.resourcemanager.appcontainers.fluent.BuildsByBuilderResourcesClient; -import com.azure.resourcemanager.appcontainers.fluent.BuildsClient; -import com.azure.resourcemanager.appcontainers.fluent.CertificatesClient; -import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsCertificatesClient; -import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsClient; -import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsDaprComponentsClient; -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.LogicAppsClient; -import com.azure.resourcemanager.appcontainers.fluent.ManagedCertificatesClient; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentDiagnosticsClient; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentPrivateEndpointConnectionsClient; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentPrivateLinkResourcesClient; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentUsagesClient; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsClient; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsDiagnosticsClient; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsStoragesClient; -import com.azure.resourcemanager.appcontainers.fluent.NamespacesClient; -import com.azure.resourcemanager.appcontainers.fluent.OperationsClient; -import com.azure.resourcemanager.appcontainers.fluent.ResourceProvidersClient; -import com.azure.resourcemanager.appcontainers.fluent.UsagesClient; -import java.io.IOException; -import java.lang.reflect.Type; -import java.nio.ByteBuffer; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.time.Duration; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * Initializes a new instance of the ContainerAppsApiClientImpl type. - */ -@ServiceClient(builder = ContainerAppsApiClientBuilder.class) -public final class ContainerAppsApiClientImpl implements ContainerAppsApiClient { - /** - * The ID of the target subscription. The value must be an UUID. - */ - private final String subscriptionId; - - /** - * Gets The ID of the target subscription. The value must be an UUID. - * - * @return the subscriptionId value. - */ - public String getSubscriptionId() { - return this.subscriptionId; - } - - /** - * server parameter. - */ - private final String endpoint; - - /** - * Gets server parameter. - * - * @return the endpoint value. - */ - public String getEndpoint() { - return this.endpoint; - } - - /** - * Api Version. - */ - private final String apiVersion; - - /** - * Gets Api Version. - * - * @return the apiVersion value. - */ - public String getApiVersion() { - return this.apiVersion; - } - - /** - * The HTTP pipeline to send requests through. - */ - private final HttpPipeline httpPipeline; - - /** - * Gets The HTTP pipeline to send requests through. - * - * @return the httpPipeline value. - */ - public HttpPipeline getHttpPipeline() { - return this.httpPipeline; - } - - /** - * The serializer to serialize an object into a string. - */ - private final SerializerAdapter serializerAdapter; - - /** - * Gets The serializer to serialize an object into a string. - * - * @return the serializerAdapter value. - */ - SerializerAdapter getSerializerAdapter() { - return this.serializerAdapter; - } - - /** - * The default poll interval for long-running operation. - */ - private final Duration defaultPollInterval; - - /** - * Gets The default poll interval for long-running operation. - * - * @return the defaultPollInterval value. - */ - public Duration getDefaultPollInterval() { - return this.defaultPollInterval; - } - - /** - * The AppResilienciesClient object to access its operations. - */ - private final AppResilienciesClient appResiliencies; - - /** - * Gets the AppResilienciesClient object to access its operations. - * - * @return the AppResilienciesClient object. - */ - public AppResilienciesClient getAppResiliencies() { - return this.appResiliencies; - } - - /** - * The ContainerAppsAuthConfigsClient object to access its operations. - */ - private final ContainerAppsAuthConfigsClient containerAppsAuthConfigs; - - /** - * Gets the ContainerAppsAuthConfigsClient object to access its operations. - * - * @return the ContainerAppsAuthConfigsClient object. - */ - public ContainerAppsAuthConfigsClient getContainerAppsAuthConfigs() { - return this.containerAppsAuthConfigs; - } - - /** - * The AvailableWorkloadProfilesClient object to access its operations. - */ - private final AvailableWorkloadProfilesClient availableWorkloadProfiles; - - /** - * Gets the AvailableWorkloadProfilesClient object to access its operations. - * - * @return the AvailableWorkloadProfilesClient object. - */ - public AvailableWorkloadProfilesClient getAvailableWorkloadProfiles() { - return this.availableWorkloadProfiles; - } - - /** - * The BillingMetersClient object to access its operations. - */ - private final BillingMetersClient billingMeters; - - /** - * Gets the BillingMetersClient object to access its operations. - * - * @return the BillingMetersClient object. - */ - public BillingMetersClient getBillingMeters() { - return this.billingMeters; - } - - /** - * The BuildersClient object to access its operations. - */ - private final BuildersClient builders; - - /** - * Gets the BuildersClient object to access its operations. - * - * @return the BuildersClient object. - */ - public BuildersClient getBuilders() { - return this.builders; - } - - /** - * The BuildsByBuilderResourcesClient object to access its operations. - */ - private final BuildsByBuilderResourcesClient buildsByBuilderResources; - - /** - * Gets the BuildsByBuilderResourcesClient object to access its operations. - * - * @return the BuildsByBuilderResourcesClient object. - */ - public BuildsByBuilderResourcesClient getBuildsByBuilderResources() { - return this.buildsByBuilderResources; - } - - /** - * The BuildsClient object to access its operations. - */ - private final BuildsClient builds; - - /** - * Gets the BuildsClient object to access its operations. - * - * @return the BuildsClient object. - */ - public BuildsClient getBuilds() { - return this.builds; - } - - /** - * The BuildAuthTokensClient object to access its operations. - */ - private final BuildAuthTokensClient buildAuthTokens; - - /** - * Gets the BuildAuthTokensClient object to access its operations. - * - * @return the BuildAuthTokensClient object. - */ - public BuildAuthTokensClient getBuildAuthTokens() { - return this.buildAuthTokens; - } - - /** - * The ConnectedEnvironmentsClient object to access its operations. - */ - private final ConnectedEnvironmentsClient connectedEnvironments; - - /** - * Gets the ConnectedEnvironmentsClient object to access its operations. - * - * @return the ConnectedEnvironmentsClient object. - */ - public ConnectedEnvironmentsClient getConnectedEnvironments() { - return this.connectedEnvironments; - } - - /** - * The ConnectedEnvironmentsCertificatesClient object to access its operations. - */ - private final ConnectedEnvironmentsCertificatesClient connectedEnvironmentsCertificates; - - /** - * Gets the ConnectedEnvironmentsCertificatesClient object to access its operations. - * - * @return the ConnectedEnvironmentsCertificatesClient object. - */ - public ConnectedEnvironmentsCertificatesClient getConnectedEnvironmentsCertificates() { - return this.connectedEnvironmentsCertificates; - } - - /** - * The ConnectedEnvironmentsDaprComponentsClient object to access its operations. - */ - private final ConnectedEnvironmentsDaprComponentsClient connectedEnvironmentsDaprComponents; - - /** - * Gets the ConnectedEnvironmentsDaprComponentsClient object to access its operations. - * - * @return the ConnectedEnvironmentsDaprComponentsClient object. - */ - public ConnectedEnvironmentsDaprComponentsClient getConnectedEnvironmentsDaprComponents() { - return this.connectedEnvironmentsDaprComponents; - } - - /** - * The ConnectedEnvironmentsStoragesClient object to access its operations. - */ - private final ConnectedEnvironmentsStoragesClient connectedEnvironmentsStorages; - - /** - * Gets the ConnectedEnvironmentsStoragesClient object to access its operations. - * - * @return the ConnectedEnvironmentsStoragesClient object. - */ - public ConnectedEnvironmentsStoragesClient getConnectedEnvironmentsStorages() { - return this.connectedEnvironmentsStorages; - } - - /** - * The ContainerAppsClient object to access its operations. - */ - private final ContainerAppsClient containerApps; - - /** - * Gets the ContainerAppsClient object to access its operations. - * - * @return the ContainerAppsClient object. - */ - public ContainerAppsClient getContainerApps() { - return this.containerApps; - } - - /** - * 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 ContainerAppsRevisionsClient object to access its operations. - */ - private final ContainerAppsRevisionsClient containerAppsRevisions; - - /** - * Gets the ContainerAppsRevisionsClient object to access its operations. - * - * @return the ContainerAppsRevisionsClient object. - */ - public ContainerAppsRevisionsClient getContainerAppsRevisions() { - return this.containerAppsRevisions; - } - - /** - * The ContainerAppsRevisionReplicasClient object to access its operations. - */ - private final ContainerAppsRevisionReplicasClient containerAppsRevisionReplicas; - - /** - * Gets the ContainerAppsRevisionReplicasClient object to access its operations. - * - * @return the ContainerAppsRevisionReplicasClient object. - */ - public ContainerAppsRevisionReplicasClient getContainerAppsRevisionReplicas() { - return this.containerAppsRevisionReplicas; - } - - /** - * The ContainerAppsDiagnosticsClient object to access its operations. - */ - private final ContainerAppsDiagnosticsClient containerAppsDiagnostics; - - /** - * Gets the ContainerAppsDiagnosticsClient object to access its operations. - * - * @return the ContainerAppsDiagnosticsClient object. - */ - public ContainerAppsDiagnosticsClient getContainerAppsDiagnostics() { - return this.containerAppsDiagnostics; - } - - /** - * The ManagedEnvironmentDiagnosticsClient object to access its operations. - */ - private final ManagedEnvironmentDiagnosticsClient managedEnvironmentDiagnostics; - - /** - * Gets the ManagedEnvironmentDiagnosticsClient object to access its operations. - * - * @return the ManagedEnvironmentDiagnosticsClient object. - */ - public ManagedEnvironmentDiagnosticsClient getManagedEnvironmentDiagnostics() { - return this.managedEnvironmentDiagnostics; - } - - /** - * The ManagedEnvironmentsDiagnosticsClient object to access its operations. - */ - private final ManagedEnvironmentsDiagnosticsClient managedEnvironmentsDiagnostics; - - /** - * Gets the ManagedEnvironmentsDiagnosticsClient object to access its operations. - * - * @return the ManagedEnvironmentsDiagnosticsClient object. - */ - public ManagedEnvironmentsDiagnosticsClient getManagedEnvironmentsDiagnostics() { - return this.managedEnvironmentsDiagnostics; - } - - /** - * The JobsClient object to access its operations. - */ - private final JobsClient jobs; - - /** - * Gets the JobsClient object to access its operations. - * - * @return the JobsClient object. - */ - 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 FunctionsExtensionsClient object to access its operations. - */ - private final FunctionsExtensionsClient functionsExtensions; - - /** - * Gets the FunctionsExtensionsClient object to access its operations. - * - * @return the FunctionsExtensionsClient object. - */ - public FunctionsExtensionsClient getFunctionsExtensions() { - return this.functionsExtensions; - } - - /** - * The OperationsClient object to access its operations. - */ - private final OperationsClient operations; - - /** - * Gets the OperationsClient object to access its operations. - * - * @return the OperationsClient object. - */ - public OperationsClient getOperations() { - return this.operations; - } - - /** - * The 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. - */ - private final JobsExecutionsClient jobsExecutions; - - /** - * Gets the JobsExecutionsClient object to access its operations. - * - * @return the JobsExecutionsClient object. - */ - public JobsExecutionsClient getJobsExecutions() { - return this.jobsExecutions; - } - - /** - * The ResourceProvidersClient object to access its operations. - */ - private final ResourceProvidersClient resourceProviders; - - /** - * Gets the ResourceProvidersClient object to access its operations. - * - * @return the ResourceProvidersClient object. - */ - public ResourceProvidersClient getResourceProviders() { - return this.resourceProviders; - } - - /** - * The LogicAppsClient object to access its operations. - */ - private final LogicAppsClient logicApps; - - /** - * Gets the LogicAppsClient object to access its operations. - * - * @return the LogicAppsClient object. - */ - public LogicAppsClient getLogicApps() { - return this.logicApps; - } - - /** - * The ManagedEnvironmentsClient object to access its operations. - */ - private final ManagedEnvironmentsClient managedEnvironments; - - /** - * Gets the ManagedEnvironmentsClient object to access its operations. - * - * @return the ManagedEnvironmentsClient object. - */ - public ManagedEnvironmentsClient getManagedEnvironments() { - return this.managedEnvironments; - } - - /** - * The CertificatesClient object to access its operations. - */ - private final CertificatesClient certificates; - - /** - * Gets the CertificatesClient object to access its operations. - * - * @return the CertificatesClient object. - */ - public CertificatesClient getCertificates() { - return this.certificates; - } - - /** - * The ManagedCertificatesClient object to access its operations. - */ - private final ManagedCertificatesClient managedCertificates; - - /** - * Gets the ManagedCertificatesClient object to access its operations. - * - * @return the ManagedCertificatesClient object. - */ - public ManagedCertificatesClient getManagedCertificates() { - return this.managedCertificates; - } - - /** - * The NamespacesClient object to access its operations. - */ - private final NamespacesClient namespaces; - - /** - * Gets the NamespacesClient object to access its operations. - * - * @return the NamespacesClient object. - */ - 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. - */ - private final DaprComponentResiliencyPoliciesClient daprComponentResiliencyPolicies; - - /** - * Gets the DaprComponentResiliencyPoliciesClient object to access its operations. - * - * @return the DaprComponentResiliencyPoliciesClient object. - */ - public DaprComponentResiliencyPoliciesClient getDaprComponentResiliencyPolicies() { - return this.daprComponentResiliencyPolicies; - } - - /** - * The DaprComponentsClient object to access its operations. - */ - private final DaprComponentsClient daprComponents; - - /** - * Gets the DaprComponentsClient object to access its operations. - * - * @return the DaprComponentsClient object. - */ - public DaprComponentsClient getDaprComponents() { - return this.daprComponents; - } - - /** - * The DaprSubscriptionsClient object to access its operations. - */ - private final DaprSubscriptionsClient daprSubscriptions; - - /** - * Gets the DaprSubscriptionsClient object to access its operations. - * - * @return the DaprSubscriptionsClient object. - */ - public DaprSubscriptionsClient getDaprSubscriptions() { - return this.daprSubscriptions; - } - - /** - * The ManagedEnvironmentsStoragesClient object to access its operations. - */ - private final ManagedEnvironmentsStoragesClient managedEnvironmentsStorages; - - /** - * Gets the ManagedEnvironmentsStoragesClient object to access its operations. - * - * @return the ManagedEnvironmentsStoragesClient object. - */ - public ManagedEnvironmentsStoragesClient getManagedEnvironmentsStorages() { - return this.managedEnvironmentsStorages; - } - - /** - * The ContainerAppsSessionPoolsClient object to access its operations. - */ - private final ContainerAppsSessionPoolsClient containerAppsSessionPools; - - /** - * Gets the ContainerAppsSessionPoolsClient object to access its operations. - * - * @return the ContainerAppsSessionPoolsClient object. - */ - public ContainerAppsSessionPoolsClient getContainerAppsSessionPools() { - return this.containerAppsSessionPools; - } - - /** - * The ContainerAppsSourceControlsClient object to access its operations. - */ - private final ContainerAppsSourceControlsClient containerAppsSourceControls; - - /** - * Gets the ContainerAppsSourceControlsClient object to access its operations. - * - * @return the ContainerAppsSourceControlsClient object. - */ - public ContainerAppsSourceControlsClient getContainerAppsSourceControls() { - return this.containerAppsSourceControls; - } - - /** - * The UsagesClient object to access its operations. - */ - private final UsagesClient usages; - - /** - * Gets the UsagesClient object to access its operations. - * - * @return the UsagesClient object. - */ - public UsagesClient getUsages() { - return this.usages; - } - - /** - * The ManagedEnvironmentUsagesClient object to access its operations. - */ - private final ManagedEnvironmentUsagesClient managedEnvironmentUsages; - - /** - * Gets the ManagedEnvironmentUsagesClient object to access its operations. - * - * @return the ManagedEnvironmentUsagesClient object. - */ - public ManagedEnvironmentUsagesClient getManagedEnvironmentUsages() { - return this.managedEnvironmentUsages; - } - - /** - * Initializes an instance of ContainerAppsApiClient client. - * - * @param httpPipeline The HTTP pipeline to send requests through. - * @param serializerAdapter The serializer to serialize an object into a string. - * @param defaultPollInterval The default poll interval for long-running operation. - * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. The value must be an UUID. - * @param endpoint server parameter. - */ - ContainerAppsApiClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, - Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { - this.httpPipeline = httpPipeline; - this.serializerAdapter = serializerAdapter; - this.defaultPollInterval = defaultPollInterval; - this.subscriptionId = subscriptionId; - this.endpoint = endpoint; - this.apiVersion = "2024-08-02-preview"; - this.appResiliencies = new AppResilienciesClientImpl(this); - this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsClientImpl(this); - this.availableWorkloadProfiles = new AvailableWorkloadProfilesClientImpl(this); - this.billingMeters = new BillingMetersClientImpl(this); - this.builders = new BuildersClientImpl(this); - this.buildsByBuilderResources = new BuildsByBuilderResourcesClientImpl(this); - this.builds = new BuildsClientImpl(this); - this.buildAuthTokens = new BuildAuthTokensClientImpl(this); - this.connectedEnvironments = new ConnectedEnvironmentsClientImpl(this); - this.connectedEnvironmentsCertificates = new ConnectedEnvironmentsCertificatesClientImpl(this); - this.connectedEnvironmentsDaprComponents = new ConnectedEnvironmentsDaprComponentsClientImpl(this); - this.connectedEnvironmentsStorages = new ConnectedEnvironmentsStoragesClientImpl(this); - this.containerApps = new ContainerAppsClientImpl(this); - this.containerAppsBuildsByContainerApps = new ContainerAppsBuildsByContainerAppsClientImpl(this); - this.containerAppsBuilds = new ContainerAppsBuildsClientImpl(this); - this.containerAppsPatches = new ContainerAppsPatchesClientImpl(this); - this.containerAppsRevisions = new ContainerAppsRevisionsClientImpl(this); - this.containerAppsRevisionReplicas = new ContainerAppsRevisionReplicasClientImpl(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.functionsExtensions = new FunctionsExtensionsClientImpl(this); - this.operations = new OperationsClientImpl(this); - this.javaComponents = new JavaComponentsClientImpl(this); - this.jobsExecutions = new JobsExecutionsClientImpl(this); - this.resourceProviders = new ResourceProvidersClientImpl(this); - this.logicApps = new LogicAppsClientImpl(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); - this.managedEnvironmentsStorages = new ManagedEnvironmentsStoragesClientImpl(this); - this.containerAppsSessionPools = new ContainerAppsSessionPoolsClientImpl(this); - this.containerAppsSourceControls = new ContainerAppsSourceControlsClientImpl(this); - this.usages = new UsagesClientImpl(this); - this.managedEnvironmentUsages = new ManagedEnvironmentUsagesClientImpl(this); - } - - /** - * Gets default client context. - * - * @return the default client context. - */ - public Context getContext() { - return Context.NONE; - } - - /** - * Merges default client context with provided context. - * - * @param context the context to be merged with default client context. - * @return the merged context. - */ - public Context mergeContext(Context context) { - return CoreUtils.mergeContexts(this.getContext(), context); - } - - /** - * Gets long running operation result. - * - * @param activationResponse the response of activation operation. - * @param httpPipeline the http pipeline. - * @param pollResultType type of poll result. - * @param finalResultType type of final result. - * @param context the context shared by all requests. - * @param type of poll result. - * @param type of final result. - * @return poller flux for poll result and final result. - */ - public PollerFlux, U> getLroResult(Mono>> activationResponse, - HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { - return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, - defaultPollInterval, activationResponse, context); - } - - /** - * Gets the final result, or an error, based on last async poll response. - * - * @param response the last async poll response. - * @param type of poll result. - * @param type of final result. - * @return the final result, or an error. - */ - public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) { - if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) { - String errorMessage; - ManagementError managementError = null; - HttpResponse errorResponse = null; - PollResult.Error lroError = response.getValue().getError(); - if (lroError != null) { - errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), - lroError.getResponseBody()); - - errorMessage = response.getValue().getError().getMessage(); - String errorBody = response.getValue().getError().getResponseBody(); - if (errorBody != null) { - // try to deserialize error body to ManagementError - try { - managementError = this.getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); - if (managementError.getCode() == null || managementError.getMessage() == null) { - managementError = null; - } - } catch (IOException | RuntimeException ioe) { - LOGGER.logThrowableAsWarning(ioe); - } - } - } else { - // fallback to default error message - errorMessage = "Long running operation failed."; - } - if (managementError == null) { - // fallback to default ManagementError - managementError = new ManagementError(response.getStatus().toString(), errorMessage); - } - return Mono.error(new ManagementException(errorMessage, errorResponse, managementError)); - } else { - return response.getFinalResult(); - } - } - - private static final class HttpResponseImpl extends HttpResponse { - private final int statusCode; - - private final byte[] responseBody; - - private final HttpHeaders httpHeaders; - - HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) { - super(null); - this.statusCode = statusCode; - this.httpHeaders = httpHeaders; - this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8); - } - - public int getStatusCode() { - return statusCode; - } - - public String getHeaderValue(String s) { - return httpHeaders.getValue(HttpHeaderName.fromString(s)); - } - - public HttpHeaders getHeaders() { - return httpHeaders; - } - - public Flux getBody() { - return Flux.just(ByteBuffer.wrap(responseBody)); - } - - public Mono getBodyAsByteArray() { - return Mono.just(responseBody); - } - - public Mono getBodyAsString() { - return Mono.just(new String(responseBody, StandardCharsets.UTF_8)); - } - - public Mono getBodyAsString(Charset charset) { - return Mono.just(new String(responseBody, charset)); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsApiClientImpl.class); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsClientImpl.java deleted file mode 100644 index ab550bace5e0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsClientImpl.java +++ /dev/null @@ -1,738 +0,0 @@ -// Copyright (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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsAuthConfigsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; -import com.azure.resourcemanager.appcontainers.models.AuthConfigCollection; -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 ContainerAppsAuthConfigsClient. - */ -public final class ContainerAppsAuthConfigsClientImpl implements ContainerAppsAuthConfigsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ContainerAppsAuthConfigsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ContainerAppsAuthConfigsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ContainerAppsAuthConfigsClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(ContainerAppsAuthConfigsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientContainerAppsAuthConfigs to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ContainerAppsAuthConfigsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listByContainerApp(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{authConfigName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("authConfigName") String authConfigName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{authConfigName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("authConfigName") String authConfigName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AuthConfigInner authConfigEnvelope, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{authConfigName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("authConfigName") String authConfigName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listByContainerAppNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the Container App AuthConfigs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Container App AuthConfigs in a given resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByContainerAppSinglePageAsync(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.listByContainerApp(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, 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 Container App AuthConfigs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Container App AuthConfigs in a given resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByContainerAppSinglePageAsync(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 - .listByContainerApp(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the Container App AuthConfigs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Container App AuthConfigs in a given resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByContainerAppAsync(String resourceGroupName, String containerAppName) { - return new PagedFlux<>(() -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName), - nextLink -> listByContainerAppNextSinglePageAsync(nextLink)); - } - - /** - * Get the Container App AuthConfigs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Container App AuthConfigs in a given resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByContainerAppAsync(String resourceGroupName, String containerAppName, - Context context) { - return new PagedFlux<>(() -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName, context), - nextLink -> listByContainerAppNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Container App AuthConfigs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Container App AuthConfigs in a given resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByContainerApp(String resourceGroupName, String containerAppName) { - return new PagedIterable<>(listByContainerAppAsync(resourceGroupName, containerAppName)); - } - - /** - * Get the Container App AuthConfigs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Container App AuthConfigs in a given resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, - Context context) { - return new PagedIterable<>(listByContainerAppAsync(resourceGroupName, containerAppName, context)); - } - - /** - * Get a AuthConfig of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @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 AuthConfig of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String containerAppName, - String authConfigName) { - 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 (authConfigName == null) { - return Mono.error(new IllegalArgumentException("Parameter authConfigName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, authConfigName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a AuthConfig of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @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 AuthConfig of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String containerAppName, - String authConfigName, 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 (authConfigName == null) { - return Mono.error(new IllegalArgumentException("Parameter authConfigName 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, - containerAppName, authConfigName, this.client.getApiVersion(), accept, context); - } - - /** - * Get a AuthConfig of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @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 AuthConfig of a Container App on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String containerAppName, String authConfigName) { - return getWithResponseAsync(resourceGroupName, containerAppName, authConfigName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a AuthConfig of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @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 AuthConfig of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String containerAppName, - String authConfigName, Context context) { - return getWithResponseAsync(resourceGroupName, containerAppName, authConfigName, context).block(); - } - - /** - * Get a AuthConfig of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @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 AuthConfig of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AuthConfigInner get(String resourceGroupName, String containerAppName, String authConfigName) { - return getWithResponse(resourceGroupName, containerAppName, authConfigName, Context.NONE).getValue(); - } - - /** - * Create or update the AuthConfig for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param authConfigEnvelope Properties used to create a Container App AuthConfig. - * @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 configuration settings for the Azure ContainerApp Service Authentication / Authorization feature along - * with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String containerAppName, String authConfigName, AuthConfigInner authConfigEnvelope) { - 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 (authConfigName == null) { - return Mono.error(new IllegalArgumentException("Parameter authConfigName is required and cannot be null.")); - } - if (authConfigEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter authConfigEnvelope is required and cannot be null.")); - } else { - authConfigEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, authConfigName, this.client.getApiVersion(), authConfigEnvelope, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update the AuthConfig for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param authConfigEnvelope Properties used to create a Container App AuthConfig. - * @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 configuration settings for the Azure ContainerApp Service Authentication / Authorization feature along - * with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String containerAppName, String authConfigName, AuthConfigInner authConfigEnvelope, 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 (authConfigName == null) { - return Mono.error(new IllegalArgumentException("Parameter authConfigName is required and cannot be null.")); - } - if (authConfigEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter authConfigEnvelope is required and cannot be null.")); - } else { - authConfigEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, authConfigName, this.client.getApiVersion(), authConfigEnvelope, accept, context); - } - - /** - * Create or update the AuthConfig for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param authConfigEnvelope Properties used to create a Container App AuthConfig. - * @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 configuration settings for the Azure ContainerApp Service Authentication / Authorization feature on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String containerAppName, - String authConfigName, AuthConfigInner authConfigEnvelope) { - return createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, authConfigName, authConfigEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update the AuthConfig for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param authConfigEnvelope Properties used to create a Container App AuthConfig. - * @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 configuration settings for the Azure ContainerApp Service Authentication / Authorization feature along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String containerAppName, - String authConfigName, AuthConfigInner authConfigEnvelope, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, authConfigName, authConfigEnvelope, - context).block(); - } - - /** - * Create or update the AuthConfig for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param authConfigEnvelope Properties used to create a Container App AuthConfig. - * @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 configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public AuthConfigInner createOrUpdate(String resourceGroupName, String containerAppName, String authConfigName, - AuthConfigInner authConfigEnvelope) { - return createOrUpdateWithResponse(resourceGroupName, containerAppName, authConfigName, authConfigEnvelope, - Context.NONE).getValue(); - } - - /** - * Delete a Container App AuthConfig. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @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 containerAppName, - String authConfigName) { - 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 (authConfigName == null) { - return Mono.error(new IllegalArgumentException("Parameter authConfigName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, authConfigName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Container App AuthConfig. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @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 containerAppName, - String authConfigName, 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 (authConfigName == null) { - return Mono.error(new IllegalArgumentException("Parameter authConfigName 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, - containerAppName, authConfigName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete a Container App AuthConfig. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @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 containerAppName, String authConfigName) { - return deleteWithResponseAsync(resourceGroupName, containerAppName, authConfigName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a Container App AuthConfig. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String containerAppName, String authConfigName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, containerAppName, authConfigName, context).block(); - } - - /** - * Delete a Container App AuthConfig. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @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 containerAppName, String authConfigName) { - deleteWithResponse(resourceGroupName, containerAppName, authConfigName, Context.NONE); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return authConfig collection ARM resource 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. - * @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 authConfig collection ARM resource 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/ContainerAppsAuthConfigsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsImpl.java deleted file mode 100644 index f3d9f8b6c14a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsImpl.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (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.ContainerAppsAuthConfigsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; -import com.azure.resourcemanager.appcontainers.models.AuthConfig; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsAuthConfigs; - -public final class ContainerAppsAuthConfigsImpl implements ContainerAppsAuthConfigs { - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsAuthConfigsImpl.class); - - private final ContainerAppsAuthConfigsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ContainerAppsAuthConfigsImpl(ContainerAppsAuthConfigsClient 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 AuthConfigImpl(inner1, this.manager())); - } - - public PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, - Context context) { - PagedIterable inner - = this.serviceClient().listByContainerApp(resourceGroupName, containerAppName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new AuthConfigImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String containerAppName, - String authConfigName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, containerAppName, authConfigName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new AuthConfigImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public AuthConfig get(String resourceGroupName, String containerAppName, String authConfigName) { - AuthConfigInner inner = this.serviceClient().get(resourceGroupName, containerAppName, authConfigName); - if (inner != null) { - return new AuthConfigImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String containerAppName, String authConfigName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, containerAppName, authConfigName, context); - } - - public void delete(String resourceGroupName, String containerAppName, String authConfigName) { - this.serviceClient().delete(resourceGroupName, containerAppName, authConfigName); - } - - public AuthConfig 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 containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String authConfigName = ResourceManagerUtils.getValueFromIdByName(id, "authConfigs"); - if (authConfigName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'authConfigs'.", id))); - } - return this.getWithResponse(resourceGroupName, containerAppName, authConfigName, 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 containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String authConfigName = ResourceManagerUtils.getValueFromIdByName(id, "authConfigs"); - if (authConfigName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'authConfigs'.", id))); - } - return this.getWithResponse(resourceGroupName, containerAppName, authConfigName, 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 containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String authConfigName = ResourceManagerUtils.getValueFromIdByName(id, "authConfigs"); - if (authConfigName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'authConfigs'.", id))); - } - this.deleteWithResponse(resourceGroupName, containerAppName, authConfigName, Context.NONE); - } - - public Response 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 containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String authConfigName = ResourceManagerUtils.getValueFromIdByName(id, "authConfigs"); - if (authConfigName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'authConfigs'.", id))); - } - return this.deleteWithResponse(resourceGroupName, containerAppName, authConfigName, context); - } - - private ContainerAppsAuthConfigsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public AuthConfigImpl define(String name) { - return new AuthConfigImpl(name, this.manager()); - } -} 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 deleted file mode 100644 index 0140fcd8e536..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildResourceImpl.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.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 deleted file mode 100644 index cbdc525440ca..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsClientImpl.java +++ /dev/null @@ -1,286 +0,0 @@ -// Copyright (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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 deleted file mode 100644 index f5ff5268f874..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsImpl.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.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 deleted file mode 100644 index 0a9b6a1c7932..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsClientImpl.java +++ /dev/null @@ -1,441 +0,0 @@ -// Copyright (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 deleted file mode 100644 index 2e9fdac76510..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsImpl.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.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/ContainerAppsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsClientImpl.java deleted file mode 100644 index 1562abf97ca8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsClientImpl.java +++ /dev/null @@ -1,2168 +0,0 @@ -// Copyright (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.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppAuthTokenInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; -import com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppCollection; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import java.nio.ByteBuffer; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ContainerAppsClient. - */ -public final class ContainerAppsClientImpl implements ContainerAppsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ContainerAppsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ContainerAppsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ContainerAppsClientImpl(ContainerAppsApiClientImpl client) { - this.service - = RestProxy.create(ContainerAppsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientContainerApps to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ContainerAppsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/containerApps") - @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/containerApps") - @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/containerApps/{containerAppName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ManagementException.class, code = { 404 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ContainerAppInner containerAppEnvelope, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ContainerAppInner containerAppEnvelope, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/listCustomHostNameAnalysis") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listCustomHostnameAnalysis( - @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @QueryParam("customHostname") String customHostname, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/listSecrets") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listSecrets(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("containerAppName") String containerAppName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/getAuthtoken") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ManagementException.class, code = { 404 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getAuthToken(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("containerAppName") String containerAppName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/start") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> start(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("containerAppName") String containerAppName, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/stop") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> stop(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("containerAppName") String containerAppName, @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 Container Apps 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 Container Apps 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 Container Apps 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 Container Apps 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 Container Apps 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 Container Apps 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 Container Apps 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 Container Apps 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 Container Apps 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 Container Apps in a given subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Get the Container Apps 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 Container Apps 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 Container Apps in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given resource group 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 Container Apps in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given resource group 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 Container Apps in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given resource group 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 Container Apps in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given resource group 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 Container Apps in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Get the Container Apps in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given resource group 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 Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(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.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 ManagementException thrown if the request is rejected by server on status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(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.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, this.client.getApiVersion(), accept, context); - } - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container App on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String containerAppName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, containerAppName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 ManagementException thrown if the request is rejected by server on status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String containerAppName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, containerAppName, context).block(); - } - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppInner getByResourceGroup(String resourceGroupName, String containerAppName) { - return getByResourceGroupWithResponse(resourceGroupName, containerAppName, Context.NONE).getValue(); - } - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @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 along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String containerAppName, ContainerAppInner containerAppEnvelope) { - 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 (containerAppEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppEnvelope is required and cannot be null.")); - } else { - containerAppEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, this.client.getApiVersion(), containerAppEnvelope, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @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 along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String containerAppName, ContainerAppInner containerAppEnvelope, 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 (containerAppEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppEnvelope is required and cannot be null.")); - } else { - containerAppEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, this.client.getApiVersion(), containerAppEnvelope, accept, context); - } - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContainerAppInner> beginCreateOrUpdateAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ContainerAppInner.class, ContainerAppInner.class, this.client.getContext()); - } - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContainerAppInner> beginCreateOrUpdateAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ContainerAppInner.class, ContainerAppInner.class, context); - } - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppInner> beginCreateOrUpdate(String resourceGroupName, - String containerAppName, ContainerAppInner containerAppEnvelope) { - return this.beginCreateOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope).getSyncPoller(); - } - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppInner> beginCreateOrUpdate(String resourceGroupName, - String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context) - .getSyncPoller(); - } - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String containerAppName, - ContainerAppInner containerAppEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String containerAppName, - ContainerAppInner containerAppEnvelope, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppInner createOrUpdate(String resourceGroupName, String containerAppName, - ContainerAppInner containerAppEnvelope) { - return createOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope).block(); - } - - /** - * Create or update a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties used to create a container app. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppInner createOrUpdate(String resourceGroupName, String containerAppName, - ContainerAppInner containerAppEnvelope, Context context) { - return createOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context).block(); - } - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 containerAppName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerAppName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 containerAppName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerAppName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 containerAppName) { - return this.beginDeleteAsync(resourceGroupName, containerAppName).getSyncPoller(); - } - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 containerAppName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, containerAppName, context).getSyncPoller(); - } - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 containerAppName) { - return beginDeleteAsync(resourceGroupName, containerAppName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 containerAppName, Context context) { - return beginDeleteAsync(resourceGroupName, containerAppName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 containerAppName) { - deleteAsync(resourceGroupName, containerAppName).block(); - } - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 containerAppName, Context context) { - deleteAsync(resourceGroupName, containerAppName, context).block(); - } - - /** - * Update properties of a Container App - * - * Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String containerAppName, - ContainerAppInner containerAppEnvelope) { - 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 (containerAppEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppEnvelope is required and cannot be null.")); - } else { - containerAppEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, this.client.getApiVersion(), containerAppEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update properties of a Container App - * - * Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String containerAppName, - ContainerAppInner containerAppEnvelope, 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 (containerAppEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter containerAppEnvelope is required and cannot be null.")); - } else { - containerAppEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, this.client.getApiVersion(), containerAppEnvelope, accept, context); - } - - /** - * Update properties of a Container App - * - * Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of container App. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContainerAppInner> beginUpdateAsync(String resourceGroupName, - String containerAppName, ContainerAppInner containerAppEnvelope) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ContainerAppInner.class, ContainerAppInner.class, this.client.getContext()); - } - - /** - * Update properties of a Container App - * - * Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of container App. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContainerAppInner> beginUpdateAsync(String resourceGroupName, - String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ContainerAppInner.class, ContainerAppInner.class, context); - } - - /** - * Update properties of a Container App - * - * Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of container App. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppInner> beginUpdate(String resourceGroupName, - String containerAppName, ContainerAppInner containerAppEnvelope) { - return this.beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope).getSyncPoller(); - } - - /** - * Update properties of a Container App - * - * Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of container App. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppInner> beginUpdate(String resourceGroupName, - String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - return this.beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context) - .getSyncPoller(); - } - - /** - * Update properties of a Container App - * - * Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String containerAppName, - ContainerAppInner containerAppEnvelope) { - return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update properties of a Container App - * - * Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String containerAppName, - ContainerAppInner containerAppEnvelope, Context context) { - return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update properties of a Container App - * - * Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppInner update(String resourceGroupName, String containerAppName, - ContainerAppInner containerAppEnvelope) { - return updateAsync(resourceGroupName, containerAppName, containerAppEnvelope).block(); - } - - /** - * Update properties of a Container App - * - * Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppInner update(String resourceGroupName, String containerAppName, - ContainerAppInner containerAppEnvelope, Context context) { - return updateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context).block(); - } - - /** - * Analyzes a custom hostname for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param customHostname Custom hostname. - * @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 custom domain analysis along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listCustomHostnameAnalysisWithResponseAsync( - String resourceGroupName, String containerAppName, String customHostname) { - 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.listCustomHostnameAnalysis(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, containerAppName, customHostname, - this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Analyzes a custom hostname for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param customHostname Custom hostname. - * @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 custom domain analysis along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listCustomHostnameAnalysisWithResponseAsync( - String resourceGroupName, String containerAppName, String customHostname, 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.listCustomHostnameAnalysis(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, customHostname, this.client.getApiVersion(), accept, context); - } - - /** - * Analyzes a custom hostname for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 custom domain analysis on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listCustomHostnameAnalysisAsync(String resourceGroupName, - String containerAppName) { - final String customHostname = null; - return listCustomHostnameAnalysisWithResponseAsync(resourceGroupName, containerAppName, customHostname) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Analyzes a custom hostname for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param customHostname Custom hostname. - * @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 custom domain analysis along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listCustomHostnameAnalysisWithResponse(String resourceGroupName, - String containerAppName, String customHostname, Context context) { - return listCustomHostnameAnalysisWithResponseAsync(resourceGroupName, containerAppName, customHostname, context) - .block(); - } - - /** - * Analyzes a custom hostname for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 custom domain analysis. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CustomHostnameAnalysisResultInner listCustomHostnameAnalysis(String resourceGroupName, - String containerAppName) { - final String customHostname = null; - return listCustomHostnameAnalysisWithResponse(resourceGroupName, containerAppName, customHostname, Context.NONE) - .getValue(); - } - - /** - * List secrets for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Secrets Collection ARM resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync(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.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), containerAppName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List secrets for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Secrets Collection ARM resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync(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.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), containerAppName, accept, context); - } - - /** - * List secrets for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Secrets Collection ARM resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listSecretsAsync(String resourceGroupName, String containerAppName) { - return listSecretsWithResponseAsync(resourceGroupName, containerAppName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List secrets for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Secrets Collection ARM resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSecretsWithResponse(String resourceGroupName, String containerAppName, - Context context) { - return listSecretsWithResponseAsync(resourceGroupName, containerAppName, context).block(); - } - - /** - * List secrets for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Secrets Collection ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SecretsCollectionInner listSecrets(String resourceGroupName, String containerAppName) { - return listSecretsWithResponse(resourceGroupName, containerAppName, Context.NONE).getValue(); - } - - /** - * Get auth token for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return auth token for a container app along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAuthTokenWithResponseAsync(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.getAuthToken(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), containerAppName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get auth token for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 ManagementException thrown if the request is rejected by server on status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return auth token for a container app along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAuthTokenWithResponseAsync(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.getAuthToken(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), containerAppName, accept, context); - } - - /** - * Get auth token for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return auth token for a container app on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAuthTokenAsync(String resourceGroupName, String containerAppName) { - return getAuthTokenWithResponseAsync(resourceGroupName, containerAppName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get auth token for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 ManagementException thrown if the request is rejected by server on status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return auth token for a container app along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAuthTokenWithResponse(String resourceGroupName, - String containerAppName, Context context) { - return getAuthTokenWithResponseAsync(resourceGroupName, containerAppName, context).block(); - } - - /** - * Get auth token for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return auth token for a container app. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppAuthTokenInner getAuthToken(String resourceGroupName, String containerAppName) { - return getAuthTokenWithResponse(resourceGroupName, containerAppName, Context.NONE).getValue(); - } - - /** - * Start a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync(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.start(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), containerAppName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Start a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync(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.start(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), containerAppName, accept, context); - } - - /** - * Start a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContainerAppInner> beginStartAsync(String resourceGroupName, - String containerAppName) { - Mono>> mono = startWithResponseAsync(resourceGroupName, containerAppName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ContainerAppInner.class, ContainerAppInner.class, this.client.getContext()); - } - - /** - * Start a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContainerAppInner> beginStartAsync(String resourceGroupName, - String containerAppName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = startWithResponseAsync(resourceGroupName, containerAppName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ContainerAppInner.class, ContainerAppInner.class, context); - } - - /** - * Start a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppInner> beginStart(String resourceGroupName, - String containerAppName) { - return this.beginStartAsync(resourceGroupName, containerAppName).getSyncPoller(); - } - - /** - * Start a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppInner> beginStart(String resourceGroupName, - String containerAppName, Context context) { - return this.beginStartAsync(resourceGroupName, containerAppName, context).getSyncPoller(); - } - - /** - * Start a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String containerAppName) { - return beginStartAsync(resourceGroupName, containerAppName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Start a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String containerAppName, Context context) { - return beginStartAsync(resourceGroupName, containerAppName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Start a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppInner start(String resourceGroupName, String containerAppName) { - return startAsync(resourceGroupName, containerAppName).block(); - } - - /** - * Start a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppInner start(String resourceGroupName, String containerAppName, Context context) { - return startAsync(resourceGroupName, containerAppName, context).block(); - } - - /** - * Stop a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync(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.stop(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), containerAppName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Stop a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync(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.stop(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), containerAppName, accept, context); - } - - /** - * Stop a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContainerAppInner> beginStopAsync(String resourceGroupName, - String containerAppName) { - Mono>> mono = stopWithResponseAsync(resourceGroupName, containerAppName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ContainerAppInner.class, ContainerAppInner.class, this.client.getContext()); - } - - /** - * Stop a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContainerAppInner> beginStopAsync(String resourceGroupName, - String containerAppName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = stopWithResponseAsync(resourceGroupName, containerAppName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - ContainerAppInner.class, ContainerAppInner.class, context); - } - - /** - * Stop a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppInner> beginStop(String resourceGroupName, - String containerAppName) { - return this.beginStopAsync(resourceGroupName, containerAppName).getSyncPoller(); - } - - /** - * Stop a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppInner> beginStop(String resourceGroupName, - String containerAppName, Context context) { - return this.beginStopAsync(resourceGroupName, containerAppName, context).getSyncPoller(); - } - - /** - * Stop a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String resourceGroupName, String containerAppName) { - return beginStopAsync(resourceGroupName, containerAppName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Stop a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopAsync(String resourceGroupName, String containerAppName, Context context) { - return beginStopAsync(resourceGroupName, containerAppName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Stop a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppInner stop(String resourceGroupName, String containerAppName) { - return stopAsync(resourceGroupName, containerAppName).block(); - } - - /** - * Stop a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppInner stop(String resourceGroupName, String containerAppName, Context context) { - return stopAsync(resourceGroupName, containerAppName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 collection ARM 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. - * @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 collection ARM 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. - * @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 collection ARM 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. - * @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 collection ARM 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/ContainerAppsDiagnosticsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsClientImpl.java deleted file mode 100644 index 8b7c5209b3d1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsClientImpl.java +++ /dev/null @@ -1,949 +0,0 @@ -// Copyright (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.ContainerAppsDiagnosticsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import com.azure.resourcemanager.appcontainers.models.RevisionCollection; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ContainerAppsDiagnosticsClient. - */ -public final class ContainerAppsDiagnosticsClientImpl implements ContainerAppsDiagnosticsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ContainerAppsDiagnosticsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ContainerAppsDiagnosticsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ContainerAppsDiagnosticsClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(ContainerAppsDiagnosticsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientContainerAppsDiagnostics to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ContainerAppsDiagnosticsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectors") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listDetectors(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectors/{detectorName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getDetector(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("detectorName") String detectorName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectorProperties/revisionsApi/revisions/") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listRevisions(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, - @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}/detectorProperties/revisionsApi/revisions/{revisionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getRevision(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("revisionName") String revisionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectorProperties/rootApi/") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(value = ManagementException.class, code = { 404 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getRoot(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listDetectorsNext( - @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> listRevisionsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the list of diagnostics for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which detector info is needed. - * @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 list of diagnostics for a given Container App along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsSinglePageAsync(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.listDetectors(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, 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 list of diagnostics for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which detector info is needed. - * @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 list of diagnostics for a given Container App along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsSinglePageAsync(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 - .listDetectors(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the list of diagnostics for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which detector info is needed. - * @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 list of diagnostics for a given Container App as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDetectorsAsync(String resourceGroupName, String containerAppName) { - return new PagedFlux<>(() -> listDetectorsSinglePageAsync(resourceGroupName, containerAppName), - nextLink -> listDetectorsNextSinglePageAsync(nextLink)); - } - - /** - * Get the list of diagnostics for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which detector info is needed. - * @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 list of diagnostics for a given Container App as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDetectorsAsync(String resourceGroupName, String containerAppName, - Context context) { - return new PagedFlux<>(() -> listDetectorsSinglePageAsync(resourceGroupName, containerAppName, context), - nextLink -> listDetectorsNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the list of diagnostics for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which detector info is needed. - * @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 list of diagnostics for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDetectors(String resourceGroupName, String containerAppName) { - return new PagedIterable<>(listDetectorsAsync(resourceGroupName, containerAppName)); - } - - /** - * Get the list of diagnostics for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which detector info is needed. - * @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 list of diagnostics for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDetectors(String resourceGroupName, String containerAppName, - Context context) { - return new PagedIterable<>(listDetectorsAsync(resourceGroupName, containerAppName, context)); - } - - /** - * Get a diagnostics result of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param detectorName Name of the Container App Detector. - * @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 diagnostics result of a Container App along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDetectorWithResponseAsync(String resourceGroupName, - String containerAppName, String detectorName) { - 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 (detectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter detectorName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getDetector(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, detectorName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a diagnostics result of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param detectorName Name of the Container App Detector. - * @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 diagnostics result of a Container App along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDetectorWithResponseAsync(String resourceGroupName, - String containerAppName, String detectorName, 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 (detectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter detectorName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getDetector(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, detectorName, this.client.getApiVersion(), accept, context); - } - - /** - * Get a diagnostics result of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param detectorName Name of the Container App Detector. - * @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 diagnostics result of a Container App on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDetectorAsync(String resourceGroupName, String containerAppName, - String detectorName) { - return getDetectorWithResponseAsync(resourceGroupName, containerAppName, detectorName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a diagnostics result of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param detectorName Name of the Container App Detector. - * @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 diagnostics result of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDetectorWithResponse(String resourceGroupName, String containerAppName, - String detectorName, Context context) { - return getDetectorWithResponseAsync(resourceGroupName, containerAppName, detectorName, context).block(); - } - - /** - * Get a diagnostics result of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param detectorName Name of the Container App Detector. - * @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 diagnostics result of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiagnosticsInner getDetector(String resourceGroupName, String containerAppName, String detectorName) { - return getDetectorWithResponse(resourceGroupName, containerAppName, detectorName, Context.NONE).getValue(); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRevisionsSinglePageAsync(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.listRevisions(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, this.client.getApiVersion(), 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())); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRevisionsSinglePageAsync(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 - .listRevisions(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, this.client.getApiVersion(), filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRevisionsAsync(String resourceGroupName, String containerAppName, - String filter) { - return new PagedFlux<>(() -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter), - nextLink -> listRevisionsNextSinglePageAsync(nextLink)); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @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 Revisions for a given Container App as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRevisionsAsync(String resourceGroupName, String containerAppName) { - final String filter = null; - return new PagedFlux<>(() -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter), - nextLink -> listRevisionsNextSinglePageAsync(nextLink)); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRevisionsAsync(String resourceGroupName, String containerAppName, - String filter, Context context) { - return new PagedFlux<>(() -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter, context), - nextLink -> listRevisionsNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @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 Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRevisions(String resourceGroupName, String containerAppName) { - final String filter = null; - return new PagedIterable<>(listRevisionsAsync(resourceGroupName, containerAppName, filter)); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRevisions(String resourceGroupName, String containerAppName, String filter, - Context context) { - return new PagedIterable<>(listRevisionsAsync(resourceGroupName, containerAppName, filter, context)); - } - - /** - * Get a revision of a 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. - * @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 revision of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRevisionWithResponseAsync(String resourceGroupName, - String containerAppName, String revisionName) { - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getRevision(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, revisionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a revision of a 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. - * @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 revision of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRevisionWithResponseAsync(String resourceGroupName, - String containerAppName, String revisionName, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getRevision(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, revisionName, this.client.getApiVersion(), accept, context); - } - - /** - * Get a revision of a 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. - * @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 revision of a Container App on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getRevisionAsync(String resourceGroupName, String containerAppName, - String revisionName) { - return getRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a revision of a 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. - * @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 revision of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRevisionWithResponse(String resourceGroupName, String containerAppName, - String revisionName, Context context) { - return getRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); - } - - /** - * Get a revision of a 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. - * @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 revision of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RevisionInner getRevision(String resourceGroupName, String containerAppName, String revisionName) { - return getRevisionWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE).getValue(); - } - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRootWithResponseAsync(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.getRoot(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 ManagementException thrown if the request is rejected by server on status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRootWithResponseAsync(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.getRoot(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, this.client.getApiVersion(), accept, context); - } - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container App on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getRootAsync(String resourceGroupName, String containerAppName) { - return getRootWithResponseAsync(resourceGroupName, containerAppName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 ManagementException thrown if the request is rejected by server on status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRootWithResponse(String resourceGroupName, String containerAppName, - Context context) { - return getRootWithResponseAsync(resourceGroupName, containerAppName, context).block(); - } - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppInner getRoot(String resourceGroupName, String containerAppName) { - return getRootWithResponse(resourceGroupName, containerAppName, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return diagnostics data collection for a resource along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsNextSinglePageAsync(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.listDetectorsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return diagnostics data collection for a resource along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsNextSinglePageAsync(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.listDetectorsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Revisions collection ARM resource along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRevisionsNextSinglePageAsync(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.listRevisionsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Revisions collection ARM resource along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRevisionsNextSinglePageAsync(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.listRevisionsNext(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/ContainerAppsDiagnosticsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsImpl.java deleted file mode 100644 index 32d1d19b0fe1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsImpl.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (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.ContainerAppsDiagnosticsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import com.azure.resourcemanager.appcontainers.models.ContainerApp; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsDiagnostics; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import com.azure.resourcemanager.appcontainers.models.Revision; - -public final class ContainerAppsDiagnosticsImpl implements ContainerAppsDiagnostics { - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsDiagnosticsImpl.class); - - private final ContainerAppsDiagnosticsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ContainerAppsDiagnosticsImpl(ContainerAppsDiagnosticsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listDetectors(String resourceGroupName, String containerAppName) { - PagedIterable inner = this.serviceClient().listDetectors(resourceGroupName, containerAppName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DiagnosticsImpl(inner1, this.manager())); - } - - public PagedIterable listDetectors(String resourceGroupName, String containerAppName, - Context context) { - PagedIterable inner - = this.serviceClient().listDetectors(resourceGroupName, containerAppName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DiagnosticsImpl(inner1, this.manager())); - } - - public Response getDetectorWithResponse(String resourceGroupName, String containerAppName, - String detectorName, Context context) { - Response inner - = this.serviceClient().getDetectorWithResponse(resourceGroupName, containerAppName, detectorName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DiagnosticsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Diagnostics getDetector(String resourceGroupName, String containerAppName, String detectorName) { - DiagnosticsInner inner = this.serviceClient().getDetector(resourceGroupName, containerAppName, detectorName); - if (inner != null) { - return new DiagnosticsImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listRevisions(String resourceGroupName, String containerAppName) { - PagedIterable inner = this.serviceClient().listRevisions(resourceGroupName, containerAppName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RevisionImpl(inner1, this.manager())); - } - - public PagedIterable listRevisions(String resourceGroupName, String containerAppName, String filter, - Context context) { - PagedIterable inner - = this.serviceClient().listRevisions(resourceGroupName, containerAppName, filter, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RevisionImpl(inner1, this.manager())); - } - - public Response getRevisionWithResponse(String resourceGroupName, String containerAppName, - String revisionName, Context context) { - Response inner - = this.serviceClient().getRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RevisionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Revision getRevision(String resourceGroupName, String containerAppName, String revisionName) { - RevisionInner inner = this.serviceClient().getRevision(resourceGroupName, containerAppName, revisionName); - if (inner != null) { - return new RevisionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getRootWithResponse(String resourceGroupName, String containerAppName, - Context context) { - Response inner - = this.serviceClient().getRootWithResponse(resourceGroupName, containerAppName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ContainerAppImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ContainerApp getRoot(String resourceGroupName, String containerAppName) { - ContainerAppInner inner = this.serviceClient().getRoot(resourceGroupName, containerAppName); - if (inner != null) { - return new ContainerAppImpl(inner, this.manager()); - } else { - return null; - } - } - - private ContainerAppsDiagnosticsClient 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/ContainerAppsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsImpl.java deleted file mode 100644 index ca52900339af..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsImpl.java +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright (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.ContainerAppsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppAuthTokenInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; -import com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ContainerApp; -import com.azure.resourcemanager.appcontainers.models.ContainerAppAuthToken; -import com.azure.resourcemanager.appcontainers.models.ContainerApps; -import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResult; -import com.azure.resourcemanager.appcontainers.models.SecretsCollection; - -public final class ContainerAppsImpl implements ContainerApps { - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsImpl.class); - - private final ContainerAppsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ContainerAppsImpl(ContainerAppsClient 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 ContainerAppImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ContainerAppImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ContainerAppImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ContainerAppImpl(inner1, this.manager())); - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String containerAppName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, containerAppName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ContainerAppImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ContainerApp getByResourceGroup(String resourceGroupName, String containerAppName) { - ContainerAppInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, containerAppName); - if (inner != null) { - return new ContainerAppImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String containerAppName) { - this.serviceClient().delete(resourceGroupName, containerAppName); - } - - public void delete(String resourceGroupName, String containerAppName, Context context) { - this.serviceClient().delete(resourceGroupName, containerAppName, context); - } - - public Response listCustomHostnameAnalysisWithResponse(String resourceGroupName, - String containerAppName, String customHostname, Context context) { - Response inner = this.serviceClient() - .listCustomHostnameAnalysisWithResponse(resourceGroupName, containerAppName, customHostname, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CustomHostnameAnalysisResultImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public CustomHostnameAnalysisResult listCustomHostnameAnalysis(String resourceGroupName, String containerAppName) { - CustomHostnameAnalysisResultInner inner - = this.serviceClient().listCustomHostnameAnalysis(resourceGroupName, containerAppName); - if (inner != null) { - return new CustomHostnameAnalysisResultImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listSecretsWithResponse(String resourceGroupName, String containerAppName, - Context context) { - Response inner - = this.serviceClient().listSecretsWithResponse(resourceGroupName, containerAppName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new SecretsCollectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public SecretsCollection listSecrets(String resourceGroupName, String containerAppName) { - SecretsCollectionInner inner = this.serviceClient().listSecrets(resourceGroupName, containerAppName); - if (inner != null) { - return new SecretsCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getAuthTokenWithResponse(String resourceGroupName, String containerAppName, - Context context) { - Response inner - = this.serviceClient().getAuthTokenWithResponse(resourceGroupName, containerAppName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ContainerAppAuthTokenImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ContainerAppAuthToken getAuthToken(String resourceGroupName, String containerAppName) { - ContainerAppAuthTokenInner inner = this.serviceClient().getAuthToken(resourceGroupName, containerAppName); - if (inner != null) { - return new ContainerAppAuthTokenImpl(inner, this.manager()); - } else { - return null; - } - } - - public ContainerApp start(String resourceGroupName, String containerAppName) { - ContainerAppInner inner = this.serviceClient().start(resourceGroupName, containerAppName); - if (inner != null) { - return new ContainerAppImpl(inner, this.manager()); - } else { - return null; - } - } - - public ContainerApp start(String resourceGroupName, String containerAppName, Context context) { - ContainerAppInner inner = this.serviceClient().start(resourceGroupName, containerAppName, context); - if (inner != null) { - return new ContainerAppImpl(inner, this.manager()); - } else { - return null; - } - } - - public ContainerApp stop(String resourceGroupName, String containerAppName) { - ContainerAppInner inner = this.serviceClient().stop(resourceGroupName, containerAppName); - if (inner != null) { - return new ContainerAppImpl(inner, this.manager()); - } else { - return null; - } - } - - public ContainerApp stop(String resourceGroupName, String containerAppName, Context context) { - ContainerAppInner inner = this.serviceClient().stop(resourceGroupName, containerAppName, context); - if (inner != null) { - return new ContainerAppImpl(inner, this.manager()); - } else { - return null; - } - } - - public ContainerApp 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 containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, containerAppName, 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 containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, containerAppName, 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 containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - this.delete(resourceGroupName, containerAppName, 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 containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - this.delete(resourceGroupName, containerAppName, context); - } - - private ContainerAppsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public ContainerAppImpl define(String name) { - return new ContainerAppImpl(name, this.manager()); - } -} 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 deleted file mode 100644 index da5d66fd22e1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchResourceImpl.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.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 deleted file mode 100644 index 3116fd1df17a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesClientImpl.java +++ /dev/null @@ -1,1202 +0,0 @@ -// Copyright (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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 deleted file mode 100644 index 42c28f166299..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesImpl.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (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.ContainerAppsPatchResource; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatches; -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 deleted file mode 100644 index c61df0a2fa31..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasClientImpl.java +++ /dev/null @@ -1,365 +0,0 @@ -// Copyright (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.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.ContainerAppsRevisionReplicasClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -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 ContainerAppsRevisionReplicasClient. - */ -public final class ContainerAppsRevisionReplicasClientImpl implements ContainerAppsRevisionReplicasClient { - /** - * The proxy service used to perform REST calls. - */ - private final ContainerAppsRevisionReplicasService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ContainerAppsRevisionReplicasClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ContainerAppsRevisionReplicasClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(ContainerAppsRevisionReplicasService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientContainerAppsRevisionReplicas to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ContainerAppsRevisionReplicasService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas/{replicaName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getReplica(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("revisionName") String revisionName, - @PathParam("replicaName") String replicaName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listReplicas(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("revisionName") String revisionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a replica for a Container App Revision. - * - * @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. - * @param replicaName Name of the Container App Revision Replica. - * @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 replica for a Container App Revision along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getReplicaWithResponseAsync(String resourceGroupName, String containerAppName, - String revisionName, String replicaName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (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 (replicaName == null) { - return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getReplica(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, revisionName, replicaName, this.client.getApiVersion(), accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a replica for a Container App Revision. - * - * @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. - * @param replicaName Name of the Container App Revision Replica. - * @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 replica for a Container App Revision along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getReplicaWithResponseAsync(String resourceGroupName, String containerAppName, - String revisionName, String replicaName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (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 (replicaName == null) { - return Mono.error(new IllegalArgumentException("Parameter replicaName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getReplica(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, revisionName, replicaName, this.client.getApiVersion(), accept, context); - } - - /** - * Get a replica for a Container App Revision. - * - * @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. - * @param replicaName Name of the Container App Revision Replica. - * @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 replica for a Container App Revision on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getReplicaAsync(String resourceGroupName, String containerAppName, String revisionName, - String replicaName) { - return getReplicaWithResponseAsync(resourceGroupName, containerAppName, revisionName, replicaName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a replica for a Container App Revision. - * - * @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. - * @param replicaName Name of the Container App Revision Replica. - * @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 replica for a Container App Revision along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getReplicaWithResponse(String resourceGroupName, String containerAppName, - String revisionName, String replicaName, Context context) { - return getReplicaWithResponseAsync(resourceGroupName, containerAppName, revisionName, replicaName, context) - .block(); - } - - /** - * Get a replica for a Container App Revision. - * - * @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. - * @param replicaName Name of the Container App Revision Replica. - * @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 replica for a Container App Revision. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicaInner getReplica(String resourceGroupName, String containerAppName, String revisionName, - String replicaName) { - return getReplicaWithResponse(resourceGroupName, containerAppName, revisionName, replicaName, Context.NONE) - .getValue(); - } - - /** - * List replicas for a Container App Revision. - * - * @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. - * @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 Revision Replicas collection ARM resource along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listReplicasWithResponseAsync(String resourceGroupName, - String containerAppName, String revisionName) { - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listReplicas(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, revisionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List replicas for a Container App Revision. - * - * @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. - * @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 Revision Replicas collection ARM resource along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listReplicasWithResponseAsync(String resourceGroupName, - String containerAppName, String revisionName, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listReplicas(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, revisionName, this.client.getApiVersion(), accept, context); - } - - /** - * List replicas for a Container App Revision. - * - * @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. - * @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 Revision Replicas collection ARM resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listReplicasAsync(String resourceGroupName, String containerAppName, - String revisionName) { - return listReplicasWithResponseAsync(resourceGroupName, containerAppName, revisionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List replicas for a Container App Revision. - * - * @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. - * @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 Revision Replicas collection ARM resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listReplicasWithResponse(String resourceGroupName, String containerAppName, - String revisionName, Context context) { - return listReplicasWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); - } - - /** - * List replicas for a Container App Revision. - * - * @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. - * @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 Revision Replicas collection ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicaCollectionInner listReplicas(String resourceGroupName, String containerAppName, String revisionName) { - return listReplicasWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE).getValue(); - } -} 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 deleted file mode 100644 index 78840c5e4e64..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasImpl.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.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.ContainerAppsRevisionReplicasClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsRevisionReplicas; -import com.azure.resourcemanager.appcontainers.models.Replica; -import com.azure.resourcemanager.appcontainers.models.ReplicaCollection; - -public final class ContainerAppsRevisionReplicasImpl implements ContainerAppsRevisionReplicas { - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsRevisionReplicasImpl.class); - - private final ContainerAppsRevisionReplicasClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ContainerAppsRevisionReplicasImpl(ContainerAppsRevisionReplicasClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getReplicaWithResponse(String resourceGroupName, String containerAppName, - String revisionName, String replicaName, Context 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())); - } else { - return null; - } - } - - public Replica getReplica(String resourceGroupName, String containerAppName, String revisionName, - String replicaName) { - ReplicaInner inner - = this.serviceClient().getReplica(resourceGroupName, containerAppName, revisionName, replicaName); - if (inner != null) { - return new ReplicaImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listReplicasWithResponse(String resourceGroupName, String containerAppName, - String revisionName, Context context) { - Response inner - = this.serviceClient().listReplicasWithResponse(resourceGroupName, containerAppName, revisionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ReplicaCollectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ReplicaCollection listReplicas(String resourceGroupName, String containerAppName, String revisionName) { - ReplicaCollectionInner inner - = this.serviceClient().listReplicas(resourceGroupName, containerAppName, revisionName); - if (inner != null) { - return new ReplicaCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - private ContainerAppsRevisionReplicasClient 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/ContainerAppsRevisionsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsClientImpl.java deleted file mode 100644 index 2feed7a78502..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsClientImpl.java +++ /dev/null @@ -1,870 +0,0 @@ -// Copyright (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.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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsRevisionsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import com.azure.resourcemanager.appcontainers.models.RevisionCollection; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ContainerAppsRevisionsClient. - */ -public final class ContainerAppsRevisionsClientImpl implements ContainerAppsRevisionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ContainerAppsRevisionsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ContainerAppsRevisionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ContainerAppsRevisionsClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(ContainerAppsRevisionsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientContainerAppsRevisions to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ContainerAppsRevisionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listRevisions(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, - @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}/revisions/{revisionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getRevision(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("revisionName") String revisionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/activate") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> activateRevision(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("revisionName") String revisionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/deactivate") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> deactivateRevision(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("revisionName") String revisionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/restart") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> restartRevision(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("revisionName") String revisionName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listRevisionsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRevisionsSinglePageAsync(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.listRevisions(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, this.client.getApiVersion(), 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())); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRevisionsSinglePageAsync(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 - .listRevisions(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, this.client.getApiVersion(), filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRevisionsAsync(String resourceGroupName, String containerAppName, - String filter) { - return new PagedFlux<>(() -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter), - nextLink -> listRevisionsNextSinglePageAsync(nextLink)); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @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 Revisions for a given Container App as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRevisionsAsync(String resourceGroupName, String containerAppName) { - final String filter = null; - return new PagedFlux<>(() -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter), - nextLink -> listRevisionsNextSinglePageAsync(nextLink)); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRevisionsAsync(String resourceGroupName, String containerAppName, - String filter, Context context) { - return new PagedFlux<>(() -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter, context), - nextLink -> listRevisionsNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @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 Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRevisions(String resourceGroupName, String containerAppName) { - final String filter = null; - return new PagedIterable<>(listRevisionsAsync(resourceGroupName, containerAppName, filter)); - } - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRevisions(String resourceGroupName, String containerAppName, String filter, - Context context) { - return new PagedIterable<>(listRevisionsAsync(resourceGroupName, containerAppName, filter, context)); - } - - /** - * Get a revision of a 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. - * @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 revision of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRevisionWithResponseAsync(String resourceGroupName, - String containerAppName, String revisionName) { - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getRevision(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, revisionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a revision of a 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. - * @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 revision of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRevisionWithResponseAsync(String resourceGroupName, - String containerAppName, String revisionName, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getRevision(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, revisionName, this.client.getApiVersion(), accept, context); - } - - /** - * Get a revision of a 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. - * @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 revision of a Container App on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getRevisionAsync(String resourceGroupName, String containerAppName, - String revisionName) { - return getRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a revision of a 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. - * @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 revision of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRevisionWithResponse(String resourceGroupName, String containerAppName, - String revisionName, Context context) { - return getRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); - } - - /** - * Get a revision of a 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. - * @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 revision of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public RevisionInner getRevision(String resourceGroupName, String containerAppName, String revisionName) { - return getRevisionWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE).getValue(); - } - - /** - * Activates a revision for a 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. - * @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> activateRevisionWithResponseAsync(String resourceGroupName, String containerAppName, - String revisionName) { - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.activateRevision(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, revisionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Activates a revision for a 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. - * @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> activateRevisionWithResponseAsync(String resourceGroupName, String containerAppName, - String revisionName, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.activateRevision(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, revisionName, this.client.getApiVersion(), accept, context); - } - - /** - * Activates a revision for a 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. - * @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 activateRevisionAsync(String resourceGroupName, String containerAppName, String revisionName) { - return activateRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Activates a revision for a 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. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response activateRevisionWithResponse(String resourceGroupName, String containerAppName, - String revisionName, Context context) { - return activateRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); - } - - /** - * Activates a revision for a 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. - * @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 activateRevision(String resourceGroupName, String containerAppName, String revisionName) { - activateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE); - } - - /** - * Deactivates a revision for a 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. - * @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> deactivateRevisionWithResponseAsync(String resourceGroupName, String containerAppName, - String revisionName) { - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.deactivateRevision(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, revisionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deactivates a revision for a 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. - * @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> deactivateRevisionWithResponseAsync(String resourceGroupName, String containerAppName, - String revisionName, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.deactivateRevision(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, revisionName, this.client.getApiVersion(), accept, context); - } - - /** - * Deactivates a revision for a 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. - * @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 deactivateRevisionAsync(String resourceGroupName, String containerAppName, String revisionName) { - return deactivateRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Deactivates a revision for a 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. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deactivateRevisionWithResponse(String resourceGroupName, String containerAppName, - String revisionName, Context context) { - return deactivateRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); - } - - /** - * Deactivates a revision for a 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. - * @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 deactivateRevision(String resourceGroupName, String containerAppName, String revisionName) { - deactivateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE); - } - - /** - * Restarts a revision for a 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. - * @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> restartRevisionWithResponseAsync(String resourceGroupName, String containerAppName, - String revisionName) { - 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.restartRevision(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, revisionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Restarts a revision for a 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. - * @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> restartRevisionWithResponseAsync(String resourceGroupName, String containerAppName, - String revisionName, 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.restartRevision(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, revisionName, this.client.getApiVersion(), accept, context); - } - - /** - * Restarts a revision for a 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. - * @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 restartRevisionAsync(String resourceGroupName, String containerAppName, String revisionName) { - return restartRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Restarts a revision for a 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. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response restartRevisionWithResponse(String resourceGroupName, String containerAppName, - String revisionName, Context context) { - return restartRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); - } - - /** - * Restarts a revision for a 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. - * @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 restartRevision(String resourceGroupName, String containerAppName, String revisionName) { - restartRevisionWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Revisions collection ARM resource along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRevisionsNextSinglePageAsync(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.listRevisionsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Revisions collection ARM resource along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRevisionsNextSinglePageAsync(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.listRevisionsNext(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/ContainerAppsRevisionsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsImpl.java deleted file mode 100644 index c882280ca305..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsImpl.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (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.ContainerAppsRevisionsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsRevisions; -import com.azure.resourcemanager.appcontainers.models.Revision; - -public final class ContainerAppsRevisionsImpl implements ContainerAppsRevisions { - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsRevisionsImpl.class); - - private final ContainerAppsRevisionsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ContainerAppsRevisionsImpl(ContainerAppsRevisionsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listRevisions(String resourceGroupName, String containerAppName) { - PagedIterable inner = this.serviceClient().listRevisions(resourceGroupName, containerAppName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RevisionImpl(inner1, this.manager())); - } - - public PagedIterable listRevisions(String resourceGroupName, String containerAppName, String filter, - Context context) { - PagedIterable inner - = this.serviceClient().listRevisions(resourceGroupName, containerAppName, filter, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new RevisionImpl(inner1, this.manager())); - } - - public Response getRevisionWithResponse(String resourceGroupName, String containerAppName, - String revisionName, Context context) { - Response inner - = this.serviceClient().getRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new RevisionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Revision getRevision(String resourceGroupName, String containerAppName, String revisionName) { - RevisionInner inner = this.serviceClient().getRevision(resourceGroupName, containerAppName, revisionName); - if (inner != null) { - return new RevisionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response activateRevisionWithResponse(String resourceGroupName, String containerAppName, - String revisionName, Context context) { - return this.serviceClient() - .activateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); - } - - public void activateRevision(String resourceGroupName, String containerAppName, String revisionName) { - this.serviceClient().activateRevision(resourceGroupName, containerAppName, revisionName); - } - - public Response deactivateRevisionWithResponse(String resourceGroupName, String containerAppName, - String revisionName, Context context) { - return this.serviceClient() - .deactivateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); - } - - public void deactivateRevision(String resourceGroupName, String containerAppName, String revisionName) { - this.serviceClient().deactivateRevision(resourceGroupName, containerAppName, revisionName); - } - - public Response restartRevisionWithResponse(String resourceGroupName, String containerAppName, - String revisionName, Context context) { - return this.serviceClient() - .restartRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); - } - - public void restartRevision(String resourceGroupName, String containerAppName, String revisionName) { - this.serviceClient().restartRevision(resourceGroupName, containerAppName, revisionName); - } - - private ContainerAppsRevisionsClient 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/ContainerAppsSessionPoolsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSessionPoolsClientImpl.java deleted file mode 100644 index 73371f3a77b5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSessionPoolsClientImpl.java +++ /dev/null @@ -1,1358 +0,0 @@ -// Copyright (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.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.ContainerAppsSessionPoolsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.SessionPoolInner; -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(ManagementException.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(ManagementException.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(ManagementException.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(ManagementException.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(ManagementException.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(ManagementException.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(ManagementException.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(ManagementException.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 ManagementException 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 ManagementException 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 ManagementException 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 ManagementException 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 ManagementException 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 ManagementException 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 ManagementException 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 ManagementException 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 ManagementException 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 ManagementException 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 ManagementException 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 ManagementException 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 ManagementException 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 ManagementException 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 ManagementException 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 ManagementException 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 ManagementException 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 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 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 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 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 ManagementException thrown 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 ManagementException thrown 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 ManagementException thrown if the request is 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 ManagementException thrown if the request is 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 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 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 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 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 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 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 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 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 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 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 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 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 ManagementException thrown 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 ManagementException thrown 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 ManagementException thrown if the request is 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 ManagementException thrown if the request is 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 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 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 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 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 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 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 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 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 ManagementException thrown 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 ManagementException thrown 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 ManagementException thrown 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 ManagementException thrown 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 ManagementException thrown if the request is 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 ManagementException thrown if the request is 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 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 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 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 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 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 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 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 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException 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 deleted file mode 100644 index d2d3a49315af..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSessionPoolsImpl.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (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 deleted file mode 100644 index a893741af21d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java +++ /dev/null @@ -1,1108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.implementation; - -import com.azure.core.annotation.BodyParam; -import com.azure.core.annotation.Delete; -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsSourceControlsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import com.azure.resourcemanager.appcontainers.models.SourceControlCollection; -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 ContainerAppsSourceControlsClient. - */ -public final class ContainerAppsSourceControlsClientImpl implements ContainerAppsSourceControlsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ContainerAppsSourceControlsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ContainerAppsSourceControlsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ContainerAppsSourceControlsClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(ContainerAppsSourceControlsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientContainerAppsSourceControls to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ContainerAppsSourceControlsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listByContainerApp(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("sourceControlName") String sourceControlName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("sourceControlName") String sourceControlName, - @HeaderParam("x-ms-github-auxiliary") String xMsGithubAuxiliary, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") SourceControlInner sourceControlEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("sourceControlName") String sourceControlName, - @HeaderParam("x-ms-github-auxiliary") String xMsGithubAuxiliary, - @QueryParam("ignoreWorkflowDeletionFailure") Boolean ignoreWorkflowDeletionFailure, - @QueryParam("deleteWorkflow") Boolean deleteWorkflow, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listByContainerAppNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the Container App SourceControls in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Container App SourceControls in a given resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByContainerAppSinglePageAsync(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.listByContainerApp(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, 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 Container App SourceControls in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Container App SourceControls in a given resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByContainerAppSinglePageAsync(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 - .listByContainerApp(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the Container App SourceControls in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Container App SourceControls in a given resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByContainerAppAsync(String resourceGroupName, String containerAppName) { - return new PagedFlux<>(() -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName), - nextLink -> listByContainerAppNextSinglePageAsync(nextLink)); - } - - /** - * Get the Container App SourceControls in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Container App SourceControls in a given resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByContainerAppAsync(String resourceGroupName, String containerAppName, - Context context) { - return new PagedFlux<>(() -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName, context), - nextLink -> listByContainerAppNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Container App SourceControls in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Container App SourceControls in a given resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByContainerApp(String resourceGroupName, String containerAppName) { - return new PagedIterable<>(listByContainerAppAsync(resourceGroupName, containerAppName)); - } - - /** - * Get the Container App SourceControls in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Container App SourceControls in a given resource group as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, - Context context) { - return new PagedIterable<>(listByContainerAppAsync(resourceGroupName, containerAppName, context)); - } - - /** - * Get a SourceControl of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @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 SourceControl of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String containerAppName, - String sourceControlName) { - 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 (sourceControlName == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, sourceControlName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a SourceControl of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @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 SourceControl of a Container App along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String containerAppName, - String sourceControlName, 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 (sourceControlName == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlName 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, - containerAppName, sourceControlName, this.client.getApiVersion(), accept, context); - } - - /** - * Get a SourceControl of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @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 SourceControl of a Container App on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String containerAppName, - String sourceControlName) { - return getWithResponseAsync(resourceGroupName, containerAppName, sourceControlName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a SourceControl of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @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 SourceControl of a Container App along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String containerAppName, - String sourceControlName, Context context) { - return getWithResponseAsync(resourceGroupName, containerAppName, sourceControlName, context).block(); - } - - /** - * Get a SourceControl of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @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 SourceControl of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SourceControlInner get(String resourceGroupName, String containerAppName, String sourceControlName) { - return getWithResponse(resourceGroupName, containerAppName, sourceControlName, Context.NONE).getValue(); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @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 SourceControl along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope, - String xMsGithubAuxiliary) { - 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 (sourceControlName == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlName is required and cannot be null.")); - } - if (sourceControlEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlEnvelope is required and cannot be null.")); - } else { - sourceControlEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, this.client.getApiVersion(), - sourceControlEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @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 SourceControl along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope, - String xMsGithubAuxiliary, 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 (sourceControlName == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlName is required and cannot be null.")); - } - if (sourceControlEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlEnvelope is required and cannot be null.")); - } else { - sourceControlEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, sourceControlName, xMsGithubAuxiliary, this.client.getApiVersion(), sourceControlEnvelope, - accept, context); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @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 SourceControl. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SourceControlInner> beginCreateOrUpdateAsync( - String resourceGroupName, String containerAppName, String sourceControlName, - SourceControlInner sourceControlEnvelope, String xMsGithubAuxiliary) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, - sourceControlName, sourceControlEnvelope, xMsGithubAuxiliary); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - SourceControlInner.class, SourceControlInner.class, this.client.getContext()); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @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 SourceControl. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SourceControlInner> beginCreateOrUpdateAsync( - String resourceGroupName, String containerAppName, String sourceControlName, - SourceControlInner sourceControlEnvelope) { - final String xMsGithubAuxiliary = null; - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, - sourceControlName, sourceControlEnvelope, xMsGithubAuxiliary); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - SourceControlInner.class, SourceControlInner.class, this.client.getContext()); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @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 SourceControl. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, SourceControlInner> beginCreateOrUpdateAsync( - String resourceGroupName, String containerAppName, String sourceControlName, - SourceControlInner sourceControlEnvelope, String xMsGithubAuxiliary, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, - sourceControlName, sourceControlEnvelope, xMsGithubAuxiliary, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - SourceControlInner.class, SourceControlInner.class, context); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @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 SourceControl. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SourceControlInner> beginCreateOrUpdate(String resourceGroupName, - String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope) { - final String xMsGithubAuxiliary = null; - return this - .beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, - xMsGithubAuxiliary) - .getSyncPoller(); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @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 SourceControl. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SourceControlInner> beginCreateOrUpdate(String resourceGroupName, - String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope, - String xMsGithubAuxiliary, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, - xMsGithubAuxiliary, context) - .getSyncPoller(); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @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 SourceControl on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String containerAppName, - String sourceControlName, SourceControlInner sourceControlEnvelope, String xMsGithubAuxiliary) { - return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, - xMsGithubAuxiliary).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @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 SourceControl on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String containerAppName, - String sourceControlName, SourceControlInner sourceControlEnvelope) { - final String xMsGithubAuxiliary = null; - return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, - xMsGithubAuxiliary).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @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 SourceControl on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String containerAppName, - String sourceControlName, SourceControlInner sourceControlEnvelope, String xMsGithubAuxiliary, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, - xMsGithubAuxiliary, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @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 SourceControl. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SourceControlInner createOrUpdate(String resourceGroupName, String containerAppName, - String sourceControlName, SourceControlInner sourceControlEnvelope) { - final String xMsGithubAuxiliary = null; - return createOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, - xMsGithubAuxiliary).block(); - } - - /** - * Create or update the SourceControl for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param sourceControlEnvelope Properties used to create a Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @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 SourceControl. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public SourceControlInner createOrUpdate(String resourceGroupName, String containerAppName, - String sourceControlName, SourceControlInner sourceControlEnvelope, String xMsGithubAuxiliary, - Context context) { - return createOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, - xMsGithubAuxiliary, context).block(); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. - * @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 containerAppName, - String sourceControlName, String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, - Boolean deleteWorkflow) { - 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 (sourceControlName == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, - ignoreWorkflowDeletionFailure, deleteWorkflow, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. - * @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 containerAppName, - String sourceControlName, String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, - Boolean deleteWorkflow, 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 (sourceControlName == null) { - return Mono - .error(new IllegalArgumentException("Parameter sourceControlName 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, - containerAppName, sourceControlName, xMsGithubAuxiliary, ignoreWorkflowDeletionFailure, deleteWorkflow, - this.client.getApiVersion(), accept, context); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. - * @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 containerAppName, - String sourceControlName, String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, - Boolean deleteWorkflow) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerAppName, - sourceControlName, xMsGithubAuxiliary, ignoreWorkflowDeletionFailure, deleteWorkflow); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @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 containerAppName, - String sourceControlName) { - final String xMsGithubAuxiliary = null; - final Boolean ignoreWorkflowDeletionFailure = null; - final Boolean deleteWorkflow = null; - Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerAppName, - sourceControlName, xMsGithubAuxiliary, ignoreWorkflowDeletionFailure, deleteWorkflow); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. - * @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 containerAppName, - String sourceControlName, String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, - Boolean deleteWorkflow, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerAppName, - sourceControlName, xMsGithubAuxiliary, ignoreWorkflowDeletionFailure, deleteWorkflow, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @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 containerAppName, - String sourceControlName) { - final String xMsGithubAuxiliary = null; - final Boolean ignoreWorkflowDeletionFailure = null; - final Boolean deleteWorkflow = null; - return this - .beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, - ignoreWorkflowDeletionFailure, deleteWorkflow) - .getSyncPoller(); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. - * @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 containerAppName, - String sourceControlName, String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, - Boolean deleteWorkflow, Context context) { - return this - .beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, - ignoreWorkflowDeletionFailure, deleteWorkflow, context) - .getSyncPoller(); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. - * @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 containerAppName, String sourceControlName, - String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, Boolean deleteWorkflow) { - return beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, - ignoreWorkflowDeletionFailure, deleteWorkflow).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @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 containerAppName, String sourceControlName) { - final String xMsGithubAuxiliary = null; - final Boolean ignoreWorkflowDeletionFailure = null; - final Boolean deleteWorkflow = null; - return beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, - ignoreWorkflowDeletionFailure, deleteWorkflow).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. - * @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 containerAppName, String sourceControlName, - String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, Boolean deleteWorkflow, Context context) { - return beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, - ignoreWorkflowDeletionFailure, deleteWorkflow, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @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 containerAppName, String sourceControlName) { - final String xMsGithubAuxiliary = null; - final Boolean ignoreWorkflowDeletionFailure = null; - final Boolean deleteWorkflow = null; - deleteAsync(resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, - ignoreWorkflowDeletionFailure, deleteWorkflow).block(); - } - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. - * @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 containerAppName, String sourceControlName, - String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, Boolean deleteWorkflow, Context context) { - deleteAsync(resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, - ignoreWorkflowDeletionFailure, deleteWorkflow, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sourceControl collection ARM resource 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. - * @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 sourceControl collection ARM resource 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/ContainerAppsSourceControlsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsImpl.java deleted file mode 100644 index cae13bfce167..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsImpl.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (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.ContainerAppsSourceControlsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppsSourceControls; -import com.azure.resourcemanager.appcontainers.models.SourceControl; - -public final class ContainerAppsSourceControlsImpl implements ContainerAppsSourceControls { - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsSourceControlsImpl.class); - - private final ContainerAppsSourceControlsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ContainerAppsSourceControlsImpl(ContainerAppsSourceControlsClient 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 SourceControlImpl(inner1, this.manager())); - } - - public PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, - Context context) { - PagedIterable inner - = this.serviceClient().listByContainerApp(resourceGroupName, containerAppName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new SourceControlImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String containerAppName, - String sourceControlName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, containerAppName, sourceControlName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new SourceControlImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public SourceControl get(String resourceGroupName, String containerAppName, String sourceControlName) { - SourceControlInner inner = this.serviceClient().get(resourceGroupName, containerAppName, sourceControlName); - if (inner != null) { - return new SourceControlImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String containerAppName, String sourceControlName) { - this.serviceClient().delete(resourceGroupName, containerAppName, sourceControlName); - } - - public void delete(String resourceGroupName, String containerAppName, String sourceControlName, - String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, Boolean deleteWorkflow, Context context) { - this.serviceClient() - .delete(resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, - ignoreWorkflowDeletionFailure, deleteWorkflow, context); - } - - public SourceControl 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 containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String sourceControlName = ResourceManagerUtils.getValueFromIdByName(id, "sourcecontrols"); - if (sourceControlName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); - } - return this.getWithResponse(resourceGroupName, containerAppName, sourceControlName, 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 containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String sourceControlName = ResourceManagerUtils.getValueFromIdByName(id, "sourcecontrols"); - if (sourceControlName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); - } - return this.getWithResponse(resourceGroupName, containerAppName, sourceControlName, 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 containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String sourceControlName = ResourceManagerUtils.getValueFromIdByName(id, "sourcecontrols"); - if (sourceControlName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); - } - String localXMsGithubAuxiliary = null; - Boolean localIgnoreWorkflowDeletionFailure = null; - Boolean localDeleteWorkflow = null; - this.delete(resourceGroupName, containerAppName, sourceControlName, localXMsGithubAuxiliary, - localIgnoreWorkflowDeletionFailure, localDeleteWorkflow, Context.NONE); - } - - public void deleteByIdWithResponse(String id, String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, - Boolean deleteWorkflow, 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 containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String sourceControlName = ResourceManagerUtils.getValueFromIdByName(id, "sourcecontrols"); - if (sourceControlName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); - } - this.delete(resourceGroupName, containerAppName, sourceControlName, xMsGithubAuxiliary, - ignoreWorkflowDeletionFailure, deleteWorkflow, context); - } - - private ContainerAppsSourceControlsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public SourceControlImpl define(String name) { - return new SourceControlImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CustomHostnameAnalysisResultImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CustomHostnameAnalysisResultImpl.java deleted file mode 100644 index 189b97144b22..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CustomHostnameAnalysisResultImpl.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; -import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResult; -import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo; -import com.azure.resourcemanager.appcontainers.models.DnsVerificationTestResult; -import java.util.Collections; -import java.util.List; - -public final class CustomHostnameAnalysisResultImpl implements CustomHostnameAnalysisResult { - private CustomHostnameAnalysisResultInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - CustomHostnameAnalysisResultImpl(CustomHostnameAnalysisResultInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String hostname() { - return this.innerModel().hostname(); - } - - public Boolean isHostnameAlreadyVerified() { - return this.innerModel().isHostnameAlreadyVerified(); - } - - public DnsVerificationTestResult customDomainVerificationTest() { - return this.innerModel().customDomainVerificationTest(); - } - - public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo() { - return this.innerModel().customDomainVerificationFailureInfo(); - } - - public Boolean hasConflictOnManagedEnvironment() { - return this.innerModel().hasConflictOnManagedEnvironment(); - } - - public Boolean conflictWithEnvironmentCustomDomain() { - return this.innerModel().conflictWithEnvironmentCustomDomain(); - } - - public String conflictingContainerAppResourceId() { - return this.innerModel().conflictingContainerAppResourceId(); - } - - public List cNameRecords() { - List inner = this.innerModel().cNameRecords(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List txtRecords() { - List inner = this.innerModel().txtRecords(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List aRecords() { - List inner = this.innerModel().aRecords(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List alternateCNameRecords() { - List inner = this.innerModel().alternateCNameRecords(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List alternateTxtRecords() { - List inner = this.innerModel().alternateTxtRecords(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public CustomHostnameAnalysisResultInner 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/DaprComponentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java deleted file mode 100644 index 011522485f37..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java +++ /dev/null @@ -1,247 +0,0 @@ -// Copyright (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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponent; -import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; -import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; -import com.azure.resourcemanager.appcontainers.models.Secret; -import java.util.Collections; -import java.util.List; - -public final class DaprComponentImpl implements DaprComponent, DaprComponent.Definition, DaprComponent.Update { - private DaprComponentInner 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 String componentType() { - return this.innerModel().componentType(); - } - - public String version() { - return this.innerModel().version(); - } - - public Boolean ignoreErrors() { - return this.innerModel().ignoreErrors(); - } - - public String initTimeout() { - return this.innerModel().initTimeout(); - } - - public List secrets() { - List inner = this.innerModel().secrets(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String secretStoreComponent() { - return this.innerModel().secretStoreComponent(); - } - - public List metadata() { - List inner = this.innerModel().metadata(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List scopes() { - List inner = this.innerModel().scopes(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List serviceComponentBind() { - List inner = this.innerModel().serviceComponentBind(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DaprComponentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String connectedEnvironmentName; - - private String componentName; - - public DaprComponentImpl withExistingConnectedEnvironment(String resourceGroupName, - String connectedEnvironmentName) { - this.resourceGroupName = resourceGroupName; - this.connectedEnvironmentName = connectedEnvironmentName; - return this; - } - - public DaprComponent create() { - 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(); - return this; - } - - DaprComponentImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new DaprComponentInner(); - this.serviceManager = serviceManager; - this.componentName = name; - } - - public DaprComponentImpl update() { - return this; - } - - public DaprComponent apply() { - 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(); - return this; - } - - DaprComponentImpl(DaprComponentInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.connectedEnvironmentName - = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); - this.componentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "daprComponents"); - } - - public DaprComponent refresh() { - 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(); - return this; - } - - public Response listSecretsWithResponse(Context context) { - return serviceManager.connectedEnvironmentsDaprComponents() - .listSecretsWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); - } - - public DaprSecretsCollection listSecrets() { - return serviceManager.connectedEnvironmentsDaprComponents() - .listSecrets(resourceGroupName, connectedEnvironmentName, componentName); - } - - public DaprComponentImpl withComponentType(String componentType) { - this.innerModel().withComponentType(componentType); - return this; - } - - public DaprComponentImpl withVersion(String version) { - this.innerModel().withVersion(version); - return this; - } - - public DaprComponentImpl withIgnoreErrors(Boolean ignoreErrors) { - this.innerModel().withIgnoreErrors(ignoreErrors); - return this; - } - - public DaprComponentImpl withInitTimeout(String initTimeout) { - this.innerModel().withInitTimeout(initTimeout); - return this; - } - - public DaprComponentImpl withSecrets(List secrets) { - this.innerModel().withSecrets(secrets); - return this; - } - - public DaprComponentImpl withSecretStoreComponent(String secretStoreComponent) { - this.innerModel().withSecretStoreComponent(secretStoreComponent); - return this; - } - - public DaprComponentImpl withMetadata(List metadata) { - this.innerModel().withMetadata(metadata); - return this; - } - - public DaprComponentImpl withScopes(List scopes) { - this.innerModel().withScopes(scopes); - return this; - } - - public DaprComponentImpl withServiceComponentBind(List serviceComponentBind) { - this.innerModel().withServiceComponentBind(serviceComponentBind); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesClientImpl.java deleted file mode 100644 index 24a68f487a40..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesClientImpl.java +++ /dev/null @@ -1,808 +0,0 @@ -// Copyright (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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.DaprComponentResiliencyPoliciesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPoliciesCollection; -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 DaprComponentResiliencyPoliciesClient. - */ -public final class DaprComponentResiliencyPoliciesClientImpl implements DaprComponentResiliencyPoliciesClient { - /** - * The proxy service used to perform REST calls. - */ - private final DaprComponentResiliencyPoliciesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of DaprComponentResiliencyPoliciesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DaprComponentResiliencyPoliciesClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(DaprComponentResiliencyPoliciesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientDaprComponentResiliencyPolicies to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface DaprComponentResiliencyPoliciesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("componentName") String componentName, - @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}/daprComponents/{componentName}/resiliencyPolicies/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("componentName") String componentName, - @PathParam("name") String name, @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}/daprComponents/{componentName}/resiliencyPolicies/{name}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("componentName") String componentName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("componentName") String componentName, - @PathParam("name") String name, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the resiliency policies for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 resiliency policies for a Dapr component along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName, String componentName) { - 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 (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName 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, componentName, 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 resiliency policies for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 resiliency policies for a Dapr component along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName, String componentName, 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 (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName 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, - componentName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the resiliency policies for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 resiliency policies for a Dapr component as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName, - String componentName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, componentName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get the resiliency policies for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 resiliency policies for a Dapr component as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName, - String componentName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, componentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the resiliency policies for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 resiliency policies for a Dapr component as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName, - String componentName) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName, componentName)); - } - - /** - * Get the resiliency policies for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 resiliency policies for a Dapr component as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName, - String componentName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName, componentName, context)); - } - - /** - * Get a Dapr component resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @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 Dapr component resiliency policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String environmentName, String componentName, String name) { - 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 (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, componentName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a Dapr component resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @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 Dapr component resiliency policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String environmentName, String componentName, String name, 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 (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, componentName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Get a Dapr component resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @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 Dapr component resiliency policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String environmentName, - String componentName, String name) { - return getWithResponseAsync(resourceGroupName, environmentName, componentName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a Dapr component resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @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 Dapr component resiliency policy along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, - String environmentName, String componentName, String name, Context context) { - return getWithResponseAsync(resourceGroupName, environmentName, componentName, name, context).block(); - } - - /** - * Get a Dapr component resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @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 Dapr component resiliency policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DaprComponentResiliencyPolicyInner get(String resourceGroupName, String environmentName, - String componentName, String name) { - return getWithResponse(resourceGroupName, environmentName, componentName, name, Context.NONE).getValue(); - } - - /** - * Creates or updates a Dapr component resiliency policy. - * - * Creates or updates a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. - * @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 dapr Component Resiliency Policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String componentName, String name, - DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope) { - 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 (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (daprComponentResiliencyPolicyEnvelope == null) { - return Mono.error(new IllegalArgumentException( - "Parameter daprComponentResiliencyPolicyEnvelope is required and cannot be null.")); - } else { - daprComponentResiliencyPolicyEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, componentName, name, this.client.getApiVersion(), - daprComponentResiliencyPolicyEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a Dapr component resiliency policy. - * - * Creates or updates a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. - * @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 dapr Component Resiliency Policy along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String componentName, String name, - DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope, 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 (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (daprComponentResiliencyPolicyEnvelope == null) { - return Mono.error(new IllegalArgumentException( - "Parameter daprComponentResiliencyPolicyEnvelope is required and cannot be null.")); - } else { - daprComponentResiliencyPolicyEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, componentName, name, this.client.getApiVersion(), daprComponentResiliencyPolicyEnvelope, - accept, context); - } - - /** - * Creates or updates a Dapr component resiliency policy. - * - * Creates or updates a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. - * @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 dapr Component Resiliency Policy on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, - String environmentName, String componentName, String name, - DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope) { - return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, componentName, name, - daprComponentResiliencyPolicyEnvelope).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates a Dapr component resiliency policy. - * - * Creates or updates a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. - * @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 dapr Component Resiliency Policy along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String environmentName, String componentName, String name, - DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, componentName, name, - daprComponentResiliencyPolicyEnvelope, context).block(); - } - - /** - * Creates or updates a Dapr component resiliency policy. - * - * Creates or updates a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. - * @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 dapr Component Resiliency Policy. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DaprComponentResiliencyPolicyInner createOrUpdate(String resourceGroupName, String environmentName, - String componentName, String name, DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope) { - return createOrUpdateWithResponse(resourceGroupName, environmentName, componentName, name, - daprComponentResiliencyPolicyEnvelope, Context.NONE).getValue(); - } - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @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 environmentName, - String componentName, String name) { - 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 (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, componentName, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @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 environmentName, - String componentName, String name, 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 (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, componentName, name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @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 environmentName, String componentName, - String name) { - return deleteWithResponseAsync(resourceGroupName, environmentName, componentName, name) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, - String name, Context context) { - return deleteWithResponseAsync(resourceGroupName, environmentName, componentName, name, context).block(); - } - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @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 environmentName, String componentName, String name) { - deleteWithResponse(resourceGroupName, environmentName, componentName, name, Context.NONE); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component Resiliency Policies ARM 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. - * @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 dapr Component Resiliency Policies ARM 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/DaprComponentResiliencyPoliciesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesImpl.java deleted file mode 100644 index 112e635dd578..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesImpl.java +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (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.DaprComponentResiliencyPoliciesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicies; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicy; - -public final class DaprComponentResiliencyPoliciesImpl implements DaprComponentResiliencyPolicies { - private static final ClientLogger LOGGER = new ClientLogger(DaprComponentResiliencyPoliciesImpl.class); - - private final DaprComponentResiliencyPoliciesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public DaprComponentResiliencyPoliciesImpl(DaprComponentResiliencyPoliciesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String environmentName, - String componentName) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, environmentName, componentName); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new DaprComponentResiliencyPolicyImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String environmentName, - String componentName, Context context) { - PagedIterable inner - = this.serviceClient().list(resourceGroupName, environmentName, componentName, context); - return ResourceManagerUtils.mapPage(inner, - inner1 -> new DaprComponentResiliencyPolicyImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String environmentName, - String componentName, String name, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, environmentName, componentName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DaprComponentResiliencyPolicyImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DaprComponentResiliencyPolicy get(String resourceGroupName, String environmentName, String componentName, - String name) { - DaprComponentResiliencyPolicyInner inner - = this.serviceClient().get(resourceGroupName, environmentName, componentName, name); - if (inner != null) { - return new DaprComponentResiliencyPolicyImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, - String name, Context context) { - return this.serviceClient() - .deleteWithResponse(resourceGroupName, environmentName, componentName, name, context); - } - - public void delete(String resourceGroupName, String environmentName, String componentName, String name) { - this.serviceClient().delete(resourceGroupName, environmentName, componentName, name); - } - - public DaprComponentResiliencyPolicy 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 componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, componentName, name, 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 componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, componentName, name, 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 componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); - } - this.deleteWithResponse(resourceGroupName, environmentName, componentName, name, Context.NONE); - } - - public Response 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 componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); - } - return this.deleteWithResponse(resourceGroupName, environmentName, componentName, name, context); - } - - private DaprComponentResiliencyPoliciesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public DaprComponentResiliencyPolicyImpl define(String name) { - return new DaprComponentResiliencyPolicyImpl(name, this.manager()); - } -} 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 deleted file mode 100644 index 0e62331b7cff..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPolicyImpl.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (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.DaprComponentResiliencyPolicyInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicy; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; - -public final class DaprComponentResiliencyPolicyImpl implements DaprComponentResiliencyPolicy, - DaprComponentResiliencyPolicy.Definition, DaprComponentResiliencyPolicy.Update { - private DaprComponentResiliencyPolicyInner 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 DaprComponentResiliencyPolicyConfiguration inboundPolicy() { - return this.innerModel().inboundPolicy(); - } - - public DaprComponentResiliencyPolicyConfiguration outboundPolicy() { - return this.innerModel().outboundPolicy(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DaprComponentResiliencyPolicyInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String environmentName; - - private String componentName; - - private String name; - - public DaprComponentResiliencyPolicyImpl withExistingDaprComponent(String resourceGroupName, String environmentName, - String componentName) { - this.resourceGroupName = resourceGroupName; - this.environmentName = environmentName; - this.componentName = componentName; - return this; - } - - public DaprComponentResiliencyPolicy create() { - 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(); - return this; - } - - DaprComponentResiliencyPolicyImpl(String name, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new DaprComponentResiliencyPolicyInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public DaprComponentResiliencyPolicyImpl update() { - return this; - } - - public DaprComponentResiliencyPolicy apply() { - 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(); - return this; - } - - DaprComponentResiliencyPolicyImpl(DaprComponentResiliencyPolicyInner 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.componentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "daprComponents"); - this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resiliencyPolicies"); - } - - public DaprComponentResiliencyPolicy refresh() { - 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(); - return this; - } - - public DaprComponentResiliencyPolicyImpl - withInboundPolicy(DaprComponentResiliencyPolicyConfiguration inboundPolicy) { - this.innerModel().withInboundPolicy(inboundPolicy); - return this; - } - - public DaprComponentResiliencyPolicyImpl - withOutboundPolicy(DaprComponentResiliencyPolicyConfiguration outboundPolicy) { - this.innerModel().withOutboundPolicy(outboundPolicy); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsClientImpl.java deleted file mode 100644 index 84cdaec379e0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsClientImpl.java +++ /dev/null @@ -1,893 +0,0 @@ -// Copyright (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.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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.DaprComponentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentsCollection; -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 DaprComponentsClient. - */ -public final class DaprComponentsClientImpl implements DaprComponentsClient { - /** - * The proxy service used to perform REST calls. - */ - private final DaprComponentsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of DaprComponentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DaprComponentsClientImpl(ContainerAppsApiClientImpl client) { - this.service - = RestProxy.create(DaprComponentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientDaprComponents to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface DaprComponentsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("componentName") String componentName, - @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}/daprComponents/{componentName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("componentName") String componentName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DaprComponentInner daprComponentEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("componentName") String componentName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/listSecrets") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listSecrets(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("componentName") String componentName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the Dapr Components for a 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 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 Dapr Components for a managed environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the Dapr Components for a 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 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 Dapr Components for a managed environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, environmentName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the Dapr Components for a 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 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 Dapr Components for a managed environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get the Dapr Components for a 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 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 Dapr Components for a managed environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Dapr Components for a 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 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 Dapr Components for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); - } - - /** - * Get the Dapr Components for a 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 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 Dapr Components for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); - } - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, - String componentName) { - 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 (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName 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, componentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, - String componentName, 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 (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName 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, componentName, this.client.getApiVersion(), accept, context); - } - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String environmentName, String componentName) { - return getWithResponseAsync(resourceGroupName, environmentName, componentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String environmentName, - String componentName, Context context) { - return getWithResponseAsync(resourceGroupName, environmentName, componentName, context).block(); - } - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DaprComponentInner get(String resourceGroupName, String environmentName, String componentName) { - return getWithResponse(resourceGroupName, environmentName, componentName, Context.NONE).getValue(); - } - - /** - * Creates or updates a Dapr Component. - * - * Creates or updates a Dapr Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @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 dapr Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String componentName, DaprComponentInner daprComponentEnvelope) { - 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 (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (daprComponentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter daprComponentEnvelope is required and cannot be null.")); - } else { - daprComponentEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, componentName, this.client.getApiVersion(), daprComponentEnvelope, - accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a Dapr Component. - * - * Creates or updates a Dapr Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @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 dapr Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String componentName, DaprComponentInner daprComponentEnvelope, 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 (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - if (daprComponentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter daprComponentEnvelope is required and cannot be null.")); - } else { - daprComponentEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, componentName, this.client.getApiVersion(), daprComponentEnvelope, accept, context); - } - - /** - * Creates or updates a Dapr Component. - * - * Creates or updates a Dapr Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @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 dapr Component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, - String componentName, DaprComponentInner daprComponentEnvelope) { - return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, componentName, daprComponentEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates a Dapr Component. - * - * Creates or updates a Dapr Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @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 dapr Component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, - String componentName, DaprComponentInner daprComponentEnvelope, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, componentName, daprComponentEnvelope, - context).block(); - } - - /** - * Creates or updates a Dapr Component. - * - * Creates or updates a Dapr Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @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 dapr Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DaprComponentInner createOrUpdate(String resourceGroupName, String environmentName, String componentName, - DaprComponentInner daprComponentEnvelope) { - return createOrUpdateWithResponse(resourceGroupName, environmentName, componentName, daprComponentEnvelope, - Context.NONE).getValue(); - } - - /** - * Delete a Dapr Component. - * - * Delete a Dapr Component from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 environmentName, - String componentName) { - 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 (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName 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, componentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Dapr Component. - * - * Delete a Dapr Component from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 environmentName, - String componentName, 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 (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName 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, componentName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete a Dapr Component. - * - * Delete a Dapr Component from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 environmentName, String componentName) { - return deleteWithResponseAsync(resourceGroupName, environmentName, componentName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a Dapr Component. - * - * Delete a Dapr Component from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, environmentName, componentName, context).block(); - } - - /** - * Delete a Dapr Component. - * - * Delete a Dapr Component from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 environmentName, String componentName) { - deleteWithResponse(resourceGroupName, environmentName, componentName, Context.NONE); - } - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component Secrets Collection for ListSecrets Action along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync(String resourceGroupName, - String environmentName, String componentName) { - 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 (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, componentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component Secrets Collection for ListSecrets Action along with {@link Response} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync(String resourceGroupName, - String environmentName, String componentName, 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 (componentName == null) { - return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, componentName, this.client.getApiVersion(), accept, context); - } - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component Secrets Collection for ListSecrets Action on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listSecretsAsync(String resourceGroupName, String environmentName, - String componentName) { - return listSecretsWithResponseAsync(resourceGroupName, environmentName, componentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component Secrets Collection for ListSecrets Action along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSecretsWithResponse(String resourceGroupName, - String environmentName, String componentName, Context context) { - return listSecretsWithResponseAsync(resourceGroupName, environmentName, componentName, context).block(); - } - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component Secrets Collection for ListSecrets Action. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DaprSecretsCollectionInner listSecrets(String resourceGroupName, String environmentName, - String componentName) { - return listSecretsWithResponse(resourceGroupName, environmentName, componentName, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Components ARM 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. - * @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 dapr Components ARM 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/DaprComponentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java deleted file mode 100644 index e08035e86f85..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (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.DaprComponentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponent; -import com.azure.resourcemanager.appcontainers.models.DaprComponents; -import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; - -public final class DaprComponentsImpl implements DaprComponents { - private static final ClientLogger LOGGER = new ClientLogger(DaprComponentsImpl.class); - - private final DaprComponentsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public DaprComponentsImpl(DaprComponentsClient 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 DaprComponentImpl(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 DaprComponentImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String environmentName, - String componentName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, environmentName, componentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DaprComponentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DaprComponent get(String resourceGroupName, String environmentName, String componentName) { - DaprComponentInner inner = this.serviceClient().get(resourceGroupName, environmentName, componentName); - if (inner != null) { - return new DaprComponentImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, - String componentName, DaprComponentInner daprComponentEnvelope, Context 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())); - } else { - return null; - } - } - - public DaprComponent createOrUpdate(String resourceGroupName, String environmentName, String componentName, - DaprComponentInner daprComponentEnvelope) { - DaprComponentInner inner = this.serviceClient() - .createOrUpdate(resourceGroupName, environmentName, componentName, daprComponentEnvelope); - if (inner != null) { - return new DaprComponentImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, componentName, context); - } - - public void delete(String resourceGroupName, String environmentName, String componentName) { - this.serviceClient().delete(resourceGroupName, environmentName, componentName); - } - - public Response listSecretsWithResponse(String resourceGroupName, String environmentName, - String componentName, Context context) { - Response inner - = this.serviceClient().listSecretsWithResponse(resourceGroupName, environmentName, componentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DaprSecretsCollectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DaprSecretsCollection listSecrets(String resourceGroupName, String environmentName, String componentName) { - DaprSecretsCollectionInner inner - = this.serviceClient().listSecrets(resourceGroupName, environmentName, componentName); - if (inner != null) { - return new DaprSecretsCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - private DaprComponentsClient 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/DaprSecretsCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSecretsCollectionImpl.java deleted file mode 100644 index 2aa4eff3aa20..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSecretsCollectionImpl.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.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.DaprSecret; -import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; -import java.util.Collections; -import java.util.List; - -public final class DaprSecretsCollectionImpl implements DaprSecretsCollection { - private DaprSecretsCollectionInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - DaprSecretsCollectionImpl(DaprSecretsCollectionInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public DaprSecretsCollectionInner 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/DaprSubscriptionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionImpl.java deleted file mode 100644 index daee523a614a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionImpl.java +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright (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.DaprSubscriptionInner; -import com.azure.resourcemanager.appcontainers.models.DaprSubscription; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class DaprSubscriptionImpl - implements DaprSubscription, DaprSubscription.Definition, DaprSubscription.Update { - private DaprSubscriptionInner 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 String pubsubName() { - return this.innerModel().pubsubName(); - } - - public String topic() { - return this.innerModel().topic(); - } - - public String deadLetterTopic() { - return this.innerModel().deadLetterTopic(); - } - - public DaprSubscriptionRoutes routes() { - return this.innerModel().routes(); - } - - public List scopes() { - List inner = this.innerModel().scopes(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public Map metadata() { - Map inner = this.innerModel().metadata(); - if (inner != null) { - return Collections.unmodifiableMap(inner); - } else { - return Collections.emptyMap(); - } - } - - public DaprSubscriptionBulkSubscribeOptions bulkSubscribe() { - return this.innerModel().bulkSubscribe(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DaprSubscriptionInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String environmentName; - - private String name; - - public DaprSubscriptionImpl withExistingManagedEnvironment(String resourceGroupName, String environmentName) { - this.resourceGroupName = resourceGroupName; - this.environmentName = environmentName; - return this; - } - - public DaprSubscription create() { - 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() - .createOrUpdateWithResponse(resourceGroupName, environmentName, name, this.innerModel(), context) - .getValue(); - return this; - } - - DaprSubscriptionImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new DaprSubscriptionInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public DaprSubscriptionImpl update() { - return this; - } - - public DaprSubscription apply() { - 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() - .createOrUpdateWithResponse(resourceGroupName, environmentName, name, this.innerModel(), context) - .getValue(); - return this; - } - - DaprSubscriptionImpl(DaprSubscriptionInner 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.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "daprSubscriptions"); - } - - public DaprSubscription refresh() { - 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(); - return this; - } - - public DaprSubscriptionImpl withPubsubName(String pubsubName) { - this.innerModel().withPubsubName(pubsubName); - return this; - } - - public DaprSubscriptionImpl withTopic(String topic) { - this.innerModel().withTopic(topic); - return this; - } - - public DaprSubscriptionImpl withDeadLetterTopic(String deadLetterTopic) { - this.innerModel().withDeadLetterTopic(deadLetterTopic); - return this; - } - - public DaprSubscriptionImpl withRoutes(DaprSubscriptionRoutes routes) { - this.innerModel().withRoutes(routes); - return this; - } - - public DaprSubscriptionImpl withScopes(List scopes) { - this.innerModel().withScopes(scopes); - return this; - } - - public DaprSubscriptionImpl withMetadata(Map metadata) { - this.innerModel().withMetadata(metadata); - return this; - } - - public DaprSubscriptionImpl withBulkSubscribe(DaprSubscriptionBulkSubscribeOptions bulkSubscribe) { - this.innerModel().withBulkSubscribe(bulkSubscribe); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionsClientImpl.java deleted file mode 100644 index 9971195dff6e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionsClientImpl.java +++ /dev/null @@ -1,749 +0,0 @@ -// Copyright (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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.DaprSubscriptionsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionsCollection; -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 DaprSubscriptionsClient. - */ -public final class DaprSubscriptionsClientImpl implements DaprSubscriptionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final DaprSubscriptionsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of DaprSubscriptionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DaprSubscriptionsClientImpl(ContainerAppsApiClientImpl client) { - this.service - = RestProxy.create(DaprSubscriptionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientDaprSubscriptions to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface DaprSubscriptionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("name") String name, - @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}/daprSubscriptions/{name}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DaprSubscriptionInner daprSubscriptionEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the Dapr subscriptions for a 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 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 Dapr subscriptions for a managed environment along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the Dapr subscriptions for a 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 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 Dapr subscriptions for a managed environment along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, environmentName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the Dapr subscriptions for a 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 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 Dapr subscriptions for a managed environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get the Dapr subscriptions for a 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 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 Dapr subscriptions for a managed environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Dapr subscriptions for a 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 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 Dapr subscriptions for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); - } - - /** - * Get the Dapr subscriptions for a 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 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 Dapr subscriptions for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); - } - - /** - * Get a dapr subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @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 dapr subscription along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, - String name) { - 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a dapr subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr 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 a dapr subscription along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, - String name, 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, name, this.client.getApiVersion(), accept, context); - } - - /** - * Get a dapr subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @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 dapr subscription on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String environmentName, String name) { - return getWithResponseAsync(resourceGroupName, environmentName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a dapr subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr 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 a dapr subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String environmentName, - String name, Context context) { - return getWithResponseAsync(resourceGroupName, environmentName, name, context).block(); - } - - /** - * Get a dapr subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @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 dapr subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DaprSubscriptionInner get(String resourceGroupName, String environmentName, String name) { - return getWithResponse(resourceGroupName, environmentName, name, Context.NONE).getValue(); - } - - /** - * Creates or updates a Dapr subscription. - * - * Creates or updates a Dapr subscription in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param daprSubscriptionEnvelope Configuration details of the Dapr subscription. - * @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 dapr PubSub Event Subscription along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String name, DaprSubscriptionInner daprSubscriptionEnvelope) { - 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (daprSubscriptionEnvelope == null) { - return Mono.error( - new IllegalArgumentException("Parameter daprSubscriptionEnvelope is required and cannot be null.")); - } else { - daprSubscriptionEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, name, this.client.getApiVersion(), daprSubscriptionEnvelope, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a Dapr subscription. - * - * Creates or updates a Dapr subscription in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param daprSubscriptionEnvelope Configuration details of the Dapr 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 dapr PubSub Event Subscription along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String name, DaprSubscriptionInner daprSubscriptionEnvelope, 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (daprSubscriptionEnvelope == null) { - return Mono.error( - new IllegalArgumentException("Parameter daprSubscriptionEnvelope is required and cannot be null.")); - } else { - daprSubscriptionEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, name, this.client.getApiVersion(), daprSubscriptionEnvelope, accept, context); - } - - /** - * Creates or updates a Dapr subscription. - * - * Creates or updates a Dapr subscription in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param daprSubscriptionEnvelope Configuration details of the Dapr subscription. - * @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 dapr PubSub Event Subscription on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, - String name, DaprSubscriptionInner daprSubscriptionEnvelope) { - return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, name, daprSubscriptionEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Creates or updates a Dapr subscription. - * - * Creates or updates a Dapr subscription in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param daprSubscriptionEnvelope Configuration details of the Dapr 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 dapr PubSub Event Subscription along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, - String name, DaprSubscriptionInner daprSubscriptionEnvelope, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, name, daprSubscriptionEnvelope, - context).block(); - } - - /** - * Creates or updates a Dapr subscription. - * - * Creates or updates a Dapr subscription in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @param daprSubscriptionEnvelope Configuration details of the Dapr subscription. - * @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 dapr PubSub Event Subscription. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DaprSubscriptionInner createOrUpdate(String resourceGroupName, String environmentName, String name, - DaprSubscriptionInner daprSubscriptionEnvelope) { - return createOrUpdateWithResponse(resourceGroupName, environmentName, name, daprSubscriptionEnvelope, - Context.NONE).getValue(); - } - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @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 environmentName, - String name) { - 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr 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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String environmentName, String name, - 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @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 environmentName, String name) { - return deleteWithResponseAsync(resourceGroupName, environmentName, name).flatMap(ignored -> Mono.empty()); - } - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr 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 {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String environmentName, String name, - Context context) { - return deleteWithResponseAsync(resourceGroupName, environmentName, name, context).block(); - } - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @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 environmentName, String name) { - deleteWithResponse(resourceGroupName, environmentName, name, Context.NONE); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Subscriptions ARM 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. - * @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 dapr Subscriptions ARM 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/DaprSubscriptionsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionsImpl.java deleted file mode 100644 index 168ba34fb53d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionsImpl.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.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.DaprSubscriptionsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; -import com.azure.resourcemanager.appcontainers.models.DaprSubscription; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptions; - -public final class DaprSubscriptionsImpl implements DaprSubscriptions { - private static final ClientLogger LOGGER = new ClientLogger(DaprSubscriptionsImpl.class); - - private final DaprSubscriptionsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public DaprSubscriptionsImpl(DaprSubscriptionsClient 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 DaprSubscriptionImpl(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 DaprSubscriptionImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String environmentName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, environmentName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DaprSubscriptionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DaprSubscription get(String resourceGroupName, String environmentName, String name) { - DaprSubscriptionInner inner = this.serviceClient().get(resourceGroupName, environmentName, name); - if (inner != null) { - return new DaprSubscriptionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String environmentName, String name, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, name, context); - } - - public void delete(String resourceGroupName, String environmentName, String name) { - this.serviceClient().delete(resourceGroupName, environmentName, name); - } - - public DaprSubscription 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 name = ResourceManagerUtils.getValueFromIdByName(id, "daprSubscriptions"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'daprSubscriptions'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, name, 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 name = ResourceManagerUtils.getValueFromIdByName(id, "daprSubscriptions"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'daprSubscriptions'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, name, 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 name = ResourceManagerUtils.getValueFromIdByName(id, "daprSubscriptions"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'daprSubscriptions'.", id))); - } - this.deleteWithResponse(resourceGroupName, environmentName, name, Context.NONE); - } - - public Response 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 name = ResourceManagerUtils.getValueFromIdByName(id, "daprSubscriptions"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'daprSubscriptions'.", id))); - } - return this.deleteWithResponse(resourceGroupName, environmentName, name, context); - } - - private DaprSubscriptionsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public DaprSubscriptionImpl define(String name) { - return new DaprSubscriptionImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsCollectionImpl.java deleted file mode 100644 index b9602fa4b966..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsCollectionImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsCollection; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class DiagnosticsCollectionImpl implements DiagnosticsCollection { - private DiagnosticsCollectionInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - DiagnosticsCollectionImpl(DiagnosticsCollectionInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList( - inner.stream().map(inner1 -> new DiagnosticsImpl(inner1, this.manager())).collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public String nextLink() { - return this.innerModel().nextLink(); - } - - public DiagnosticsCollectionInner 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/DiagnosticsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.java deleted file mode 100644 index 30dee7a892ec..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; - -public final class DiagnosticsImpl implements Diagnostics { - private DiagnosticsInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - DiagnosticsImpl(DiagnosticsInner 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 DiagnosticsProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public DiagnosticsInner 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/DotNetComponentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentImpl.java deleted file mode 100644 index f6049ff1496b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentImpl.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (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.DotNetComponentInner; -import com.azure.resourcemanager.appcontainers.models.DotNetComponent; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.util.Collections; -import java.util.List; - -public final class DotNetComponentImpl implements DotNetComponent, DotNetComponent.Definition, DotNetComponent.Update { - private DotNetComponentInner 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 DotNetComponentType componentType() { - return this.innerModel().componentType(); - } - - public DotNetComponentProvisioningState 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 List serviceBinds() { - List inner = this.innerModel().serviceBinds(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public DotNetComponentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String environmentName; - - private String name; - - public DotNetComponentImpl withExistingManagedEnvironment(String resourceGroupName, String environmentName) { - this.resourceGroupName = resourceGroupName; - this.environmentName = environmentName; - return this; - } - - public DotNetComponent create() { - 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); - return this; - } - - DotNetComponentImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new DotNetComponentInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public DotNetComponentImpl update() { - return this; - } - - public DotNetComponent apply() { - 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); - return this; - } - - DotNetComponentImpl(DotNetComponentInner 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.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dotNetComponents"); - } - - public DotNetComponent refresh() { - 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(); - return this; - } - - public DotNetComponentImpl withComponentType(DotNetComponentType componentType) { - this.innerModel().withComponentType(componentType); - return this; - } - - public DotNetComponentImpl withConfigurations(List configurations) { - this.innerModel().withConfigurations(configurations); - return this; - } - - public DotNetComponentImpl withServiceBinds(List serviceBinds) { - this.innerModel().withServiceBinds(serviceBinds); - 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 deleted file mode 100644 index 4b764f94ed6c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsClientImpl.java +++ /dev/null @@ -1,1235 +0,0 @@ -// Copyright (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.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.DotNetComponentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentsCollection; -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 DotNetComponentsClient. - */ -public final class DotNetComponentsClientImpl implements DotNetComponentsClient { - /** - * The proxy service used to perform REST calls. - */ - private final DotNetComponentsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of DotNetComponentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - DotNetComponentsClientImpl(ContainerAppsApiClientImpl client) { - this.service - = RestProxy.create(DotNetComponentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientDotNetComponents to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface DotNetComponentsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents") - @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}/dotNetComponents/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("name") String name, - @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}/dotNetComponents/{name}") - @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("name") String name, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DotNetComponentInner dotNetComponentEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") DotNetComponentInner dotNetComponentEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name}") - @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("name") String name, - @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); - } - - /** - * Get the .NET Components for a 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 the .NET Components for a managed environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the .NET Components for a 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 the .NET Components for a managed environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, environmentName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the .NET Components for a 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 the .NET Components for a managed environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get the .NET Components for a 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 the .NET Components for a managed environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the .NET Components for a 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 the .NET Components for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); - } - - /** - * Get the .NET Components for a 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 the .NET Components for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); - } - - /** - * Get a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 .NET Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, - String name) { - 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 .NET Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, - String name, 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, name, this.client.getApiVersion(), accept, context); - } - - /** - * Get a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 .NET Component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String environmentName, String name) { - return getWithResponseAsync(resourceGroupName, environmentName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 .NET Component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String environmentName, String name, - Context context) { - return getWithResponseAsync(resourceGroupName, environmentName, name, context).block(); - } - - /** - * Get a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DotNetComponentInner get(String resourceGroupName, String environmentName, String name) { - return getWithResponse(resourceGroupName, environmentName, name, Context.NONE).getValue(); - } - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return .NET Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope) { - 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (dotNetComponentEnvelope == null) { - return Mono.error( - new IllegalArgumentException("Parameter dotNetComponentEnvelope is required and cannot be null.")); - } else { - dotNetComponentEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, name, this.client.getApiVersion(), dotNetComponentEnvelope, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return .NET Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (dotNetComponentEnvelope == null) { - return Mono.error( - new IllegalArgumentException("Parameter dotNetComponentEnvelope is required and cannot be null.")); - } else { - dotNetComponentEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, name, this.client.getApiVersion(), dotNetComponentEnvelope, accept, context); - } - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DotNetComponentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DotNetComponentInner.class, DotNetComponentInner.class, this.client.getContext()); - } - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DotNetComponentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, - name, dotNetComponentEnvelope, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DotNetComponentInner.class, DotNetComponentInner.class, context); - } - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DotNetComponentInner> beginCreateOrUpdate( - String resourceGroupName, String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope) { - return this.beginCreateOrUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope) - .getSyncPoller(); - } - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DotNetComponentInner> beginCreateOrUpdate( - String resourceGroupName, String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context) - .getSyncPoller(); - } - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return .NET Component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, - String name, DotNetComponentInner dotNetComponentEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return .NET Component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - 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); - } - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return .NET Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DotNetComponentInner createOrUpdate(String resourceGroupName, String environmentName, String name, - DotNetComponentInner dotNetComponentEnvelope) { - return createOrUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope).block(); - } - - /** - * Creates or updates a .NET Component. - * - * Creates or updates a .NET Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return .NET Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DotNetComponentInner createOrUpdate(String resourceGroupName, String environmentName, String name, - DotNetComponentInner dotNetComponentEnvelope, Context context) { - return createOrUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context).block(); - } - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return .NET Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String environmentName, - String name, DotNetComponentInner dotNetComponentEnvelope) { - 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (dotNetComponentEnvelope == null) { - return Mono.error( - new IllegalArgumentException("Parameter dotNetComponentEnvelope is required and cannot be null.")); - } else { - dotNetComponentEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, name, this.client.getApiVersion(), dotNetComponentEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return .NET Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String environmentName, - String name, DotNetComponentInner dotNetComponentEnvelope, 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (dotNetComponentEnvelope == null) { - return Mono.error( - new IllegalArgumentException("Parameter dotNetComponentEnvelope is required and cannot be null.")); - } else { - dotNetComponentEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, name, this.client.getApiVersion(), dotNetComponentEnvelope, accept, context); - } - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DotNetComponentInner> beginUpdateAsync( - String resourceGroupName, String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DotNetComponentInner.class, DotNetComponentInner.class, this.client.getContext()); - } - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, DotNetComponentInner> beginUpdateAsync( - String resourceGroupName, String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - DotNetComponentInner.class, DotNetComponentInner.class, context); - } - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DotNetComponentInner> beginUpdate(String resourceGroupName, - String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope) { - return this.beginUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope).getSyncPoller(); - } - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of .NET Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, DotNetComponentInner> beginUpdate(String resourceGroupName, - String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, Context context) { - return this.beginUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context) - .getSyncPoller(); - } - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return .NET Component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String environmentName, String name, - DotNetComponentInner dotNetComponentEnvelope) { - return beginUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return .NET Component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String environmentName, String name, - DotNetComponentInner dotNetComponentEnvelope, Context context) { - return beginUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return .NET Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DotNetComponentInner update(String resourceGroupName, String environmentName, String name, - DotNetComponentInner dotNetComponentEnvelope) { - return updateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope).block(); - } - - /** - * Update properties of a .NET Component - * - * Patches a .NET Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param dotNetComponentEnvelope Configuration details of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return .NET Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DotNetComponentInner update(String resourceGroupName, String environmentName, String name, - DotNetComponentInner dotNetComponentEnvelope, Context context) { - return updateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context).block(); - } - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 name) { - 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 name, 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 name) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, environmentName, name); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 name, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, environmentName, name, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is 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 name) { - return this.beginDeleteAsync(resourceGroupName, environmentName, name).getSyncPoller(); - } - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is 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 name, - Context context) { - return this.beginDeleteAsync(resourceGroupName, environmentName, name, context).getSyncPoller(); - } - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 name) { - return beginDeleteAsync(resourceGroupName, environmentName, name).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 name, Context context) { - return beginDeleteAsync(resourceGroupName, environmentName, name, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 name) { - deleteAsync(resourceGroupName, environmentName, name).block(); - } - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 name, Context context) { - deleteAsync(resourceGroupName, environmentName, name, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return .NET Components ARM 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return .NET Components ARM 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/DotNetComponentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsImpl.java deleted file mode 100644 index 82351e9b232f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsImpl.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (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.DotNetComponentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner; -import com.azure.resourcemanager.appcontainers.models.DotNetComponent; -import com.azure.resourcemanager.appcontainers.models.DotNetComponents; - -public final class DotNetComponentsImpl implements DotNetComponents { - private static final ClientLogger LOGGER = new ClientLogger(DotNetComponentsImpl.class); - - private final DotNetComponentsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public DotNetComponentsImpl(DotNetComponentsClient 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 DotNetComponentImpl(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 DotNetComponentImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String environmentName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, environmentName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DotNetComponentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DotNetComponent get(String resourceGroupName, String environmentName, String name) { - DotNetComponentInner inner = this.serviceClient().get(resourceGroupName, environmentName, name); - if (inner != null) { - return new DotNetComponentImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String environmentName, String name) { - this.serviceClient().delete(resourceGroupName, environmentName, name); - } - - public void delete(String resourceGroupName, String environmentName, String name, Context context) { - this.serviceClient().delete(resourceGroupName, environmentName, name, context); - } - - public DotNetComponent 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 name = ResourceManagerUtils.getValueFromIdByName(id, "dotNetComponents"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dotNetComponents'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, name, 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 name = ResourceManagerUtils.getValueFromIdByName(id, "dotNetComponents"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dotNetComponents'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, name, 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 name = ResourceManagerUtils.getValueFromIdByName(id, "dotNetComponents"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dotNetComponents'.", id))); - } - this.delete(resourceGroupName, environmentName, name, 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 name = ResourceManagerUtils.getValueFromIdByName(id, "dotNetComponents"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'dotNetComponents'.", id))); - } - this.delete(resourceGroupName, environmentName, name, context); - } - - private DotNetComponentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public DotNetComponentImpl define(String name) { - return new DotNetComponentImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/EnvironmentAuthTokenImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/EnvironmentAuthTokenImpl.java deleted file mode 100644 index 3e719b07d22a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/EnvironmentAuthTokenImpl.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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.EnvironmentAuthTokenInner; -import com.azure.resourcemanager.appcontainers.models.EnvironmentAuthToken; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.Map; - -public final class EnvironmentAuthTokenImpl implements EnvironmentAuthToken { - private EnvironmentAuthTokenInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - EnvironmentAuthTokenImpl(EnvironmentAuthTokenInner 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 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 token() { - return this.innerModel().token(); - } - - public OffsetDateTime expires() { - return this.innerModel().expires(); - } - - public EnvironmentAuthTokenInner 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/FunctionsExtensionsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsClientImpl.java deleted file mode 100644 index 5843c01b5c77..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsClientImpl.java +++ /dev/null @@ -1,220 +0,0 @@ -// Copyright (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 deleted file mode 100644 index 8db782ad9313..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsImpl.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.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 deleted file mode 100644 index e061b5f4d088..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentImpl.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (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.JavaComponentInner; -import com.azure.resourcemanager.appcontainers.models.JavaComponent; -import com.azure.resourcemanager.appcontainers.models.JavaComponentProperties; - -public final class JavaComponentImpl implements JavaComponent, JavaComponent.Definition, JavaComponent.Update { - private JavaComponentInner 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 JavaComponentProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public JavaComponentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String environmentName; - - private String name; - - public JavaComponentImpl withExistingManagedEnvironment(String resourceGroupName, String environmentName) { - this.resourceGroupName = resourceGroupName; - this.environmentName = environmentName; - return this; - } - - public JavaComponent create() { - 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); - return this; - } - - JavaComponentImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new JavaComponentInner(); - this.serviceManager = serviceManager; - this.name = name; - } - - public JavaComponentImpl update() { - return this; - } - - public JavaComponent apply() { - 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); - return this; - } - - JavaComponentImpl(JavaComponentInner 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.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "javaComponents"); - } - - public JavaComponent refresh() { - 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 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/JavaComponentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentsClientImpl.java deleted file mode 100644 index 9c7add9910d6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentsClientImpl.java +++ /dev/null @@ -1,1231 +0,0 @@ -// Copyright (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.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.JavaComponentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner; -import com.azure.resourcemanager.appcontainers.models.JavaComponentsCollection; -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 JavaComponentsClient. - */ -public final class JavaComponentsClientImpl implements JavaComponentsClient { - /** - * The proxy service used to perform REST calls. - */ - private final JavaComponentsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of JavaComponentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - JavaComponentsClientImpl(ContainerAppsApiClientImpl client) { - this.service - = RestProxy.create(JavaComponentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientJavaComponents to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface JavaComponentsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents") - @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}/javaComponents/{name}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("name") String name, - @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}/javaComponents/{name}") - @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("name") String name, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") JavaComponentInner javaComponentEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents/{name}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("name") String name, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") JavaComponentInner javaComponentEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents/{name}") - @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("name") String name, - @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); - } - - /** - * Get the Java Components for a 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 the Java Components for a managed environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the Java Components for a 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 the Java Components for a managed environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, environmentName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the Java Components for a 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 the Java Components for a managed environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get the Java Components for a 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 the Java Components for a managed environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Java Components for a 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 the Java Components for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); - } - - /** - * Get the Java Components for a 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 the Java Components for a managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); - } - - /** - * Get a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Java Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, - String name) { - 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Java Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, - String name, 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, name, this.client.getApiVersion(), accept, context); - } - - /** - * Get a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Java Component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String environmentName, String name) { - return getWithResponseAsync(resourceGroupName, environmentName, name) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Java Component along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String environmentName, String name, - Context context) { - return getWithResponseAsync(resourceGroupName, environmentName, name, context).block(); - } - - /** - * Get a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Java Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JavaComponentInner get(String resourceGroupName, String environmentName, String name) { - return getWithResponse(resourceGroupName, environmentName, name, Context.NONE).getValue(); - } - - /** - * Creates or updates a Java Component. - * - * Creates or updates a Java Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return java Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String name, JavaComponentInner javaComponentEnvelope) { - 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (javaComponentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter javaComponentEnvelope is required and cannot be null.")); - } else { - javaComponentEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, name, this.client.getApiVersion(), javaComponentEnvelope, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a Java Component. - * - * Creates or updates a Java Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return java Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String name, JavaComponentInner javaComponentEnvelope, 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (javaComponentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter javaComponentEnvelope is required and cannot be null.")); - } else { - javaComponentEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, name, this.client.getApiVersion(), javaComponentEnvelope, accept, context); - } - - /** - * Creates or updates a Java Component. - * - * Creates or updates a Java Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 java Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JavaComponentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String environmentName, String name, JavaComponentInner javaComponentEnvelope) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, name, javaComponentEnvelope); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - JavaComponentInner.class, JavaComponentInner.class, this.client.getContext()); - } - - /** - * Creates or updates a Java Component. - * - * Creates or updates a Java Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 java Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JavaComponentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String environmentName, String name, JavaComponentInner javaComponentEnvelope, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, name, javaComponentEnvelope, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - JavaComponentInner.class, JavaComponentInner.class, context); - } - - /** - * Creates or updates a Java Component. - * - * Creates or updates a Java Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of java Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JavaComponentInner> beginCreateOrUpdate(String resourceGroupName, - String environmentName, String name, JavaComponentInner javaComponentEnvelope) { - return this.beginCreateOrUpdateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope) - .getSyncPoller(); - } - - /** - * Creates or updates a Java Component. - * - * Creates or updates a Java Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of java Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JavaComponentInner> beginCreateOrUpdate(String resourceGroupName, - String environmentName, String name, JavaComponentInner javaComponentEnvelope, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope, context) - .getSyncPoller(); - } - - /** - * Creates or updates a Java Component. - * - * Creates or updates a Java Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return java Component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, String name, - JavaComponentInner javaComponentEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a Java Component. - * - * Creates or updates a Java Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return java Component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, String name, - JavaComponentInner javaComponentEnvelope, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a Java Component. - * - * Creates or updates a Java Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return java Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JavaComponentInner createOrUpdate(String resourceGroupName, String environmentName, String name, - JavaComponentInner javaComponentEnvelope) { - return createOrUpdateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope).block(); - } - - /** - * Creates or updates a Java Component. - * - * Creates or updates a Java Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return java Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JavaComponentInner createOrUpdate(String resourceGroupName, String environmentName, String name, - JavaComponentInner javaComponentEnvelope, Context context) { - return createOrUpdateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope, context).block(); - } - - /** - * Update properties of a Java Component - * - * Patches a Java Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return java Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String environmentName, - String name, JavaComponentInner javaComponentEnvelope) { - 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (javaComponentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter javaComponentEnvelope is required and cannot be null.")); - } else { - javaComponentEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, name, this.client.getApiVersion(), javaComponentEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update properties of a Java Component - * - * Patches a Java Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return java Component along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String environmentName, - String name, JavaComponentInner javaComponentEnvelope, 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); - } - if (javaComponentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter javaComponentEnvelope is required and cannot be null.")); - } else { - javaComponentEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, name, this.client.getApiVersion(), javaComponentEnvelope, accept, context); - } - - /** - * Update properties of a Java Component - * - * Patches a Java Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 java Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JavaComponentInner> beginUpdateAsync(String resourceGroupName, - String environmentName, String name, JavaComponentInner javaComponentEnvelope) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, environmentName, name, javaComponentEnvelope); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - JavaComponentInner.class, JavaComponentInner.class, this.client.getContext()); - } - - /** - * Update properties of a Java Component - * - * Patches a Java Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 java Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JavaComponentInner> beginUpdateAsync(String resourceGroupName, - String environmentName, String name, JavaComponentInner javaComponentEnvelope, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, environmentName, name, javaComponentEnvelope, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), - JavaComponentInner.class, JavaComponentInner.class, context); - } - - /** - * Update properties of a Java Component - * - * Patches a Java Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of java Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JavaComponentInner> beginUpdate(String resourceGroupName, - String environmentName, String name, JavaComponentInner javaComponentEnvelope) { - return this.beginUpdateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope).getSyncPoller(); - } - - /** - * Update properties of a Java Component - * - * Patches a Java Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of java Component. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JavaComponentInner> beginUpdate(String resourceGroupName, - String environmentName, String name, JavaComponentInner javaComponentEnvelope, Context context) { - return this.beginUpdateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope, context) - .getSyncPoller(); - } - - /** - * Update properties of a Java Component - * - * Patches a Java Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return java Component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String environmentName, String name, - JavaComponentInner javaComponentEnvelope) { - return beginUpdateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update properties of a Java Component - * - * Patches a Java Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return java Component on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String environmentName, String name, - JavaComponentInner javaComponentEnvelope, Context context) { - return beginUpdateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update properties of a Java Component - * - * Patches a Java Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return java Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JavaComponentInner update(String resourceGroupName, String environmentName, String name, - JavaComponentInner javaComponentEnvelope) { - return updateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope).block(); - } - - /** - * Update properties of a Java Component - * - * Patches a Java Component using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param javaComponentEnvelope Configuration details of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return java Component. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JavaComponentInner update(String resourceGroupName, String environmentName, String name, - JavaComponentInner javaComponentEnvelope, Context context) { - return updateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope, context).block(); - } - - /** - * Delete a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 name) { - 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, name, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 name, 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 (name == null) { - return Mono.error(new IllegalArgumentException("Parameter name 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, name, this.client.getApiVersion(), accept, context); - } - - /** - * Delete a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 name) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, environmentName, name); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 name, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = deleteWithResponseAsync(resourceGroupName, environmentName, name, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is 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 name) { - return this.beginDeleteAsync(resourceGroupName, environmentName, name).getSyncPoller(); - } - - /** - * Delete a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is 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 name, - Context context) { - return this.beginDeleteAsync(resourceGroupName, environmentName, name, context).getSyncPoller(); - } - - /** - * Delete a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 name) { - return beginDeleteAsync(resourceGroupName, environmentName, name).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 name, Context context) { - return beginDeleteAsync(resourceGroupName, environmentName, name, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 name) { - deleteAsync(resourceGroupName, environmentName, name).block(); - } - - /** - * Delete a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @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 name, Context context) { - deleteAsync(resourceGroupName, environmentName, name, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return java Components ARM 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return java Components ARM 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/JavaComponentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentsImpl.java deleted file mode 100644 index 1c820fa61d33..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentsImpl.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (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.JavaComponentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner; -import com.azure.resourcemanager.appcontainers.models.JavaComponent; -import com.azure.resourcemanager.appcontainers.models.JavaComponents; - -public final class JavaComponentsImpl implements JavaComponents { - private static final ClientLogger LOGGER = new ClientLogger(JavaComponentsImpl.class); - - private final JavaComponentsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public JavaComponentsImpl(JavaComponentsClient 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 JavaComponentImpl(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 JavaComponentImpl(inner1, this.manager())); - } - - public Response getWithResponse(String resourceGroupName, String environmentName, String name, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, environmentName, name, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new JavaComponentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public JavaComponent get(String resourceGroupName, String environmentName, String name) { - JavaComponentInner inner = this.serviceClient().get(resourceGroupName, environmentName, name); - if (inner != null) { - return new JavaComponentImpl(inner, this.manager()); - } else { - return null; - } - } - - public void delete(String resourceGroupName, String environmentName, String name) { - this.serviceClient().delete(resourceGroupName, environmentName, name); - } - - public void delete(String resourceGroupName, String environmentName, String name, Context context) { - this.serviceClient().delete(resourceGroupName, environmentName, name, context); - } - - public JavaComponent 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 name = ResourceManagerUtils.getValueFromIdByName(id, "javaComponents"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'javaComponents'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, name, 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 name = ResourceManagerUtils.getValueFromIdByName(id, "javaComponents"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'javaComponents'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, name, 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 name = ResourceManagerUtils.getValueFromIdByName(id, "javaComponents"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'javaComponents'.", id))); - } - this.delete(resourceGroupName, environmentName, name, 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 name = ResourceManagerUtils.getValueFromIdByName(id, "javaComponents"); - if (name == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'javaComponents'.", id))); - } - this.delete(resourceGroupName, environmentName, name, context); - } - - private JavaComponentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public JavaComponentImpl define(String name) { - return new JavaComponentImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionBaseImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionBaseImpl.java deleted file mode 100644 index 6f069589b1a4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionBaseImpl.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.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner; -import com.azure.resourcemanager.appcontainers.models.JobExecutionBase; - -public final class JobExecutionBaseImpl implements JobExecutionBase { - private JobExecutionBaseInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - JobExecutionBaseImpl(JobExecutionBaseInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public String id() { - return this.innerModel().id(); - } - - public JobExecutionBaseInner 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/JobExecutionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionImpl.java deleted file mode 100644 index 48488c9bbf21..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionImpl.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.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; -import java.time.OffsetDateTime; - -public final class JobExecutionImpl implements JobExecution { - private JobExecutionInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - JobExecutionImpl(JobExecutionInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public String id() { - return this.innerModel().id(); - } - - public String type() { - return this.innerModel().type(); - } - - public JobExecutionRunningState status() { - return this.innerModel().status(); - } - - public OffsetDateTime startTime() { - return this.innerModel().startTime(); - } - - public OffsetDateTime endTime() { - return this.innerModel().endTime(); - } - - public JobExecutionTemplate template() { - return this.innerModel().template(); - } - - public ExecutionStatus detailedStatus() { - return this.innerModel().detailedStatus(); - } - - public JobExecutionInner 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/JobImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobImpl.java deleted file mode 100644 index 014e8ff7f026..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobImpl.java +++ /dev/null @@ -1,308 +0,0 @@ -// Copyright (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.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.JobInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppJobExecutions; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.Job; -import com.azure.resourcemanager.appcontainers.models.JobConfiguration; -import com.azure.resourcemanager.appcontainers.models.JobExecutionBase; -import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; -import com.azure.resourcemanager.appcontainers.models.JobPatchProperties; -import com.azure.resourcemanager.appcontainers.models.JobPatchPropertiesProperties; -import com.azure.resourcemanager.appcontainers.models.JobProvisioningState; -import com.azure.resourcemanager.appcontainers.models.JobRunningState; -import com.azure.resourcemanager.appcontainers.models.JobSecretsCollection; -import com.azure.resourcemanager.appcontainers.models.JobTemplate; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public final class JobImpl implements Job, Job.Definition, Job.Update { - private JobInner 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 ExtendedLocation extendedLocation() { - return this.innerModel().extendedLocation(); - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public JobProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public JobRunningState runningState() { - return this.innerModel().runningState(); - } - - public String environmentId() { - return this.innerModel().environmentId(); - } - - public String workloadProfileName() { - return this.innerModel().workloadProfileName(); - } - - public JobConfiguration configuration() { - return this.innerModel().configuration(); - } - - public JobTemplate template() { - return this.innerModel().template(); - } - - public List outboundIpAddresses() { - List inner = this.innerModel().outboundIpAddresses(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public String eventStreamEndpoint() { - return this.innerModel().eventStreamEndpoint(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public JobInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String jobName; - - private JobPatchProperties updateJobEnvelope; - - public JobImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public Job create() { - 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); - return this; - } - - JobImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new JobInner(); - this.serviceManager = serviceManager; - this.jobName = name; - } - - public JobImpl update() { - this.updateJobEnvelope = new JobPatchProperties(); - return this; - } - - public Job apply() { - this.innerObject = serviceManager.serviceClient() - .getJobs() - .update(resourceGroupName, jobName, updateJobEnvelope, Context.NONE); - return this; - } - - public Job apply(Context context) { - this.innerObject - = serviceManager.serviceClient().getJobs().update(resourceGroupName, jobName, updateJobEnvelope, context); - return this; - } - - JobImpl(JobInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.jobName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "jobs"); - } - - public Job refresh() { - 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(); - return this; - } - - public JobExecutionBase start() { - return serviceManager.jobs().start(resourceGroupName, jobName); - } - - public JobExecutionBase start(JobExecutionTemplate template, Context context) { - return serviceManager.jobs().start(resourceGroupName, jobName, template, context); - } - - public ContainerAppJobExecutions stopMultipleExecutions() { - return serviceManager.jobs().stopMultipleExecutions(resourceGroupName, jobName); - } - - public ContainerAppJobExecutions stopMultipleExecutions(Context context) { - return serviceManager.jobs().stopMultipleExecutions(resourceGroupName, jobName, context); - } - - public Response listSecretsWithResponse(Context context) { - return serviceManager.jobs().listSecretsWithResponse(resourceGroupName, jobName, context); - } - - public JobSecretsCollection listSecrets() { - return serviceManager.jobs().listSecrets(resourceGroupName, jobName); - } - - public Job resume() { - return serviceManager.jobs().resume(resourceGroupName, jobName); - } - - public Job resume(Context context) { - return serviceManager.jobs().resume(resourceGroupName, jobName, context); - } - - public Job suspend() { - return serviceManager.jobs().suspend(resourceGroupName, jobName); - } - - public Job suspend(Context context) { - return serviceManager.jobs().suspend(resourceGroupName, jobName, context); - } - - public JobImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public JobImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public JobImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateJobEnvelope.withTags(tags); - return this; - } - } - - public JobImpl withExtendedLocation(ExtendedLocation extendedLocation) { - if (isInCreateMode()) { - this.innerModel().withExtendedLocation(extendedLocation); - return this; - } else { - this.updateJobEnvelope.withExtendedLocation(extendedLocation); - return this; - } - } - - public JobImpl withIdentity(ManagedServiceIdentity identity) { - if (isInCreateMode()) { - this.innerModel().withIdentity(identity); - return this; - } else { - this.updateJobEnvelope.withIdentity(identity); - return this; - } - } - - public JobImpl withEnvironmentId(String environmentId) { - this.innerModel().withEnvironmentId(environmentId); - return this; - } - - public JobImpl withWorkloadProfileName(String workloadProfileName) { - this.innerModel().withWorkloadProfileName(workloadProfileName); - return this; - } - - public JobImpl withConfiguration(JobConfiguration configuration) { - this.innerModel().withConfiguration(configuration); - return this; - } - - public JobImpl withTemplate(JobTemplate template) { - this.innerModel().withTemplate(template); - return this; - } - - public JobImpl withProperties(JobPatchPropertiesProperties properties) { - this.updateJobEnvelope.withProperties(properties); - 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/JobSecretsCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobSecretsCollectionImpl.java deleted file mode 100644 index ebec3ac60e34..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobSecretsCollectionImpl.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.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.JobSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.JobSecretsCollection; -import com.azure.resourcemanager.appcontainers.models.Secret; -import java.util.Collections; -import java.util.List; - -public final class JobSecretsCollectionImpl implements JobSecretsCollection { - private JobSecretsCollectionInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - JobSecretsCollectionImpl(JobSecretsCollectionInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public JobSecretsCollectionInner 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/JobsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsClientImpl.java deleted file mode 100644 index e0ecb59651e4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsClientImpl.java +++ /dev/null @@ -1,3097 +0,0 @@ -// Copyright (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.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.exception.ManagementException; -import com.azure.core.management.polling.PollResult; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.core.util.polling.PollerFlux; -import com.azure.core.util.polling.SyncPoller; -import com.azure.resourcemanager.appcontainers.fluent.JobsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppJobExecutionsInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner; -import com.azure.resourcemanager.appcontainers.fluent.models.JobInner; -import com.azure.resourcemanager.appcontainers.fluent.models.JobSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; -import com.azure.resourcemanager.appcontainers.models.JobPatchProperties; -import com.azure.resourcemanager.appcontainers.models.JobsCollection; -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 JobsClient. - */ -public final class JobsClientImpl implements JobsClient { - /** - * The proxy service used to perform REST calls. - */ - private final JobsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of JobsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - JobsClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(JobsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientJobs to be used by the proxy service to perform - * REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface JobsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/detectors") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listDetectors(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/detectors/{detectorName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getDetector(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, - @PathParam("detectorName") String detectorName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/detectorProperties/{apiName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> proxyGet(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, - @PathParam("apiName") String apiName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/jobs") - @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/jobs") - @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/jobs/{jobName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getByResourceGroup(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") JobInner jobEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") JobPatchProperties jobEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/start") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> start(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") JobExecutionTemplate template, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}/stop") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> stopExecution(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("jobName") String jobName, @PathParam("jobExecutionName") String jobExecutionName, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/stop") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> stopMultipleExecutions(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("jobName") String jobName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/listSecrets") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listSecrets(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("jobName") String jobName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/resume") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> resume(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("jobName") String jobName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/suspend") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(ManagementException.class) - Mono>> suspend(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("jobName") String jobName, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listDetectorsNext( - @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> 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 list of diagnostics for a given Container App Job. - * - * Get the list of diagnostics for a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 list of diagnostics for a Container App Job along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsSinglePageAsync(String resourceGroupName, - String jobName) { - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listDetectors(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, jobName, 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 list of diagnostics for a given Container App Job. - * - * Get the list of diagnostics for a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 list of diagnostics for a Container App Job along with {@link PagedResponse} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsSinglePageAsync(String resourceGroupName, String jobName, - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listDetectors(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, jobName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the list of diagnostics for a given Container App Job. - * - * Get the list of diagnostics for a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 list of diagnostics for a Container App Job as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDetectorsAsync(String resourceGroupName, String jobName) { - return new PagedFlux<>(() -> listDetectorsSinglePageAsync(resourceGroupName, jobName), - nextLink -> listDetectorsNextSinglePageAsync(nextLink)); - } - - /** - * Get the list of diagnostics for a given Container App Job. - * - * Get the list of diagnostics for a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 list of diagnostics for a Container App Job as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDetectorsAsync(String resourceGroupName, String jobName, Context context) { - return new PagedFlux<>(() -> listDetectorsSinglePageAsync(resourceGroupName, jobName, context), - nextLink -> listDetectorsNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the list of diagnostics for a given Container App Job. - * - * Get the list of diagnostics for a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 list of diagnostics for a Container App Job as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDetectors(String resourceGroupName, String jobName) { - return new PagedIterable<>(listDetectorsAsync(resourceGroupName, jobName)); - } - - /** - * Get the list of diagnostics for a given Container App Job. - * - * Get the list of diagnostics for a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 list of diagnostics for a Container App Job as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDetectors(String resourceGroupName, String jobName, Context context) { - return new PagedIterable<>(listDetectorsAsync(resourceGroupName, jobName, context)); - } - - /** - * Get the diagnostics data for a given Container App Job. - * - * Get the diagnostics data for a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param detectorName Name of the Container App Job detector. - * @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 diagnostics data for a Container App Job along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDetectorWithResponseAsync(String resourceGroupName, String jobName, - String detectorName) { - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (detectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter detectorName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getDetector(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, jobName, detectorName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the diagnostics data for a given Container App Job. - * - * Get the diagnostics data for a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param detectorName Name of the Container App Job detector. - * @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 diagnostics data for a Container App Job along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDetectorWithResponseAsync(String resourceGroupName, String jobName, - String detectorName, 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (detectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter detectorName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getDetector(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - jobName, detectorName, this.client.getApiVersion(), accept, context); - } - - /** - * Get the diagnostics data for a given Container App Job. - * - * Get the diagnostics data for a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param detectorName Name of the Container App Job detector. - * @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 diagnostics data for a Container App Job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDetectorAsync(String resourceGroupName, String jobName, String detectorName) { - return getDetectorWithResponseAsync(resourceGroupName, jobName, detectorName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the diagnostics data for a given Container App Job. - * - * Get the diagnostics data for a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param detectorName Name of the Container App Job detector. - * @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 diagnostics data for a Container App Job along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDetectorWithResponse(String resourceGroupName, String jobName, - String detectorName, Context context) { - return getDetectorWithResponseAsync(resourceGroupName, jobName, detectorName, context).block(); - } - - /** - * Get the diagnostics data for a given Container App Job. - * - * Get the diagnostics data for a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param detectorName Name of the Container App Job detector. - * @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 diagnostics data for a Container App Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiagnosticsInner getDetector(String resourceGroupName, String jobName, String detectorName) { - return getDetectorWithResponse(resourceGroupName, jobName, detectorName, Context.NONE).getValue(); - } - - /** - * Get the properties for a given Container App Job. - * - * Get the properties of a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param apiName Proxy API Name for Container App Job. - * @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 Container App Job along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> proxyGetWithResponseAsync(String resourceGroupName, String jobName, - String apiName) { - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (apiName == null) { - return Mono.error(new IllegalArgumentException("Parameter apiName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.proxyGet(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, jobName, apiName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the properties for a given Container App Job. - * - * Get the properties of a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param apiName Proxy API Name for Container App Job. - * @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 Container App Job along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> proxyGetWithResponseAsync(String resourceGroupName, String jobName, String apiName, - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (apiName == null) { - return Mono.error(new IllegalArgumentException("Parameter apiName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.proxyGet(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, jobName, - apiName, this.client.getApiVersion(), accept, context); - } - - /** - * Get the properties for a given Container App Job. - * - * Get the properties of a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param apiName Proxy API Name for Container App Job. - * @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 Container App Job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono proxyGetAsync(String resourceGroupName, String jobName, String apiName) { - return proxyGetWithResponseAsync(resourceGroupName, jobName, apiName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the properties for a given Container App Job. - * - * Get the properties of a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param apiName Proxy API Name for Container App Job. - * @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 Container App Job along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response proxyGetWithResponse(String resourceGroupName, String jobName, String apiName, - Context context) { - return proxyGetWithResponseAsync(resourceGroupName, jobName, apiName, context).block(); - } - - /** - * Get the properties for a given Container App Job. - * - * Get the properties of a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param apiName Proxy API Name for Container App Job. - * @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 Container App Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner proxyGet(String resourceGroupName, String jobName, String apiName) { - return proxyGetWithResponse(resourceGroupName, jobName, apiName, Context.NONE).getValue(); - } - - /** - * Get the Container Apps Jobs 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 Container Apps Jobs 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 Container Apps Jobs 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 Container Apps Jobs 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 Container Apps Jobs 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 Container Apps Jobs 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 Container Apps Jobs 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 Container Apps Jobs 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 Container Apps Jobs 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 Container Apps Jobs in a given subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Get the Container Apps Jobs 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 Container Apps Jobs 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 Container Apps Jobs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps Jobs in a given resource group 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 Container Apps Jobs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps Jobs in a given resource group 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 Container Apps Jobs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps Jobs in a given resource group 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 Container Apps Jobs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps Jobs in a given resource group 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 Container Apps Jobs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps Jobs in a given resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Get the Container Apps Jobs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps Jobs in a given resource group 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 Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 Container Apps Job along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String jobName) { - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, jobName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the properties of a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 Container Apps Job along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String jobName, - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName 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, - jobName, this.client.getApiVersion(), accept, context); - } - - /** - * Get the properties of a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 Container Apps Job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String jobName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, jobName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the properties of a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 Container Apps Job along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, String jobName, - Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, jobName, context).block(); - } - - /** - * Get the properties of a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 Container Apps Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner getByResourceGroup(String resourceGroupName, String jobName) { - return getByResourceGroupWithResponse(resourceGroupName, jobName, Context.NONE).getValue(); - } - - /** - * Create or Update a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String jobName, - JobInner jobEnvelope) { - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (jobEnvelope == null) { - return Mono.error(new IllegalArgumentException("Parameter jobEnvelope is required and cannot be null.")); - } else { - jobEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, jobName, this.client.getApiVersion(), jobEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or Update a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String jobName, - JobInner jobEnvelope, 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (jobEnvelope == null) { - return Mono.error(new IllegalArgumentException("Parameter jobEnvelope is required and cannot be null.")); - } else { - jobEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - jobName, this.client.getApiVersion(), jobEnvelope, accept, context); - } - - /** - * Create or Update a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginCreateOrUpdateAsync(String resourceGroupName, - String jobName, JobInner jobEnvelope) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, jobName, jobEnvelope); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, this.client.getContext()); - } - - /** - * Create or Update a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginCreateOrUpdateAsync(String resourceGroupName, - String jobName, JobInner jobEnvelope, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, jobName, jobEnvelope, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, context); - } - - /** - * Create or Update a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginCreateOrUpdate(String resourceGroupName, String jobName, - JobInner jobEnvelope) { - return this.beginCreateOrUpdateAsync(resourceGroupName, jobName, jobEnvelope).getSyncPoller(); - } - - /** - * Create or Update a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginCreateOrUpdate(String resourceGroupName, String jobName, - JobInner jobEnvelope, Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, jobName, jobEnvelope, context).getSyncPoller(); - } - - /** - * Create or Update a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String jobName, JobInner jobEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, jobName, jobEnvelope).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or Update a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String jobName, JobInner jobEnvelope, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, jobName, jobEnvelope, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or Update a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner createOrUpdate(String resourceGroupName, String jobName, JobInner jobEnvelope) { - return createOrUpdateAsync(resourceGroupName, jobName, jobEnvelope).block(); - } - - /** - * Create or Update a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner createOrUpdate(String resourceGroupName, String jobName, JobInner jobEnvelope, Context context) { - return createOrUpdateAsync(resourceGroupName, jobName, jobEnvelope, context).block(); - } - - /** - * Delete a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 jobName) { - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, jobName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 jobName, - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName 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, jobName, - this.client.getApiVersion(), accept, context); - } - - /** - * Delete a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 jobName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, jobName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 jobName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, jobName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 jobName) { - return this.beginDeleteAsync(resourceGroupName, jobName).getSyncPoller(); - } - - /** - * Delete a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 jobName, Context context) { - return this.beginDeleteAsync(resourceGroupName, jobName, context).getSyncPoller(); - } - - /** - * Delete a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 jobName) { - return beginDeleteAsync(resourceGroupName, jobName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 jobName, Context context) { - return beginDeleteAsync(resourceGroupName, jobName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 jobName) { - deleteAsync(resourceGroupName, jobName).block(); - } - - /** - * Delete a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 jobName, Context context) { - deleteAsync(resourceGroupName, jobName, context).block(); - } - - /** - * Update properties of a Container Apps Job - * - * Patches a Container Apps Job using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String jobName, - JobPatchProperties jobEnvelope) { - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (jobEnvelope == null) { - return Mono.error(new IllegalArgumentException("Parameter jobEnvelope is required and cannot be null.")); - } else { - jobEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, jobName, this.client.getApiVersion(), jobEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update properties of a Container Apps Job - * - * Patches a Container Apps Job using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String jobName, - JobPatchProperties jobEnvelope, 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (jobEnvelope == null) { - return Mono.error(new IllegalArgumentException("Parameter jobEnvelope is required and cannot be null.")); - } else { - jobEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, jobName, - this.client.getApiVersion(), jobEnvelope, accept, context); - } - - /** - * Update properties of a Container Apps Job - * - * Patches a Container Apps Job using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginUpdateAsync(String resourceGroupName, String jobName, - JobPatchProperties jobEnvelope) { - Mono>> mono = updateWithResponseAsync(resourceGroupName, jobName, jobEnvelope); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, this.client.getContext()); - } - - /** - * Update properties of a Container Apps Job - * - * Patches a Container Apps Job using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginUpdateAsync(String resourceGroupName, String jobName, - JobPatchProperties jobEnvelope, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, jobName, jobEnvelope, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, context); - } - - /** - * Update properties of a Container Apps Job - * - * Patches a Container Apps Job using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginUpdate(String resourceGroupName, String jobName, - JobPatchProperties jobEnvelope) { - return this.beginUpdateAsync(resourceGroupName, jobName, jobEnvelope).getSyncPoller(); - } - - /** - * Update properties of a Container Apps Job - * - * Patches a Container Apps Job using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginUpdate(String resourceGroupName, String jobName, - JobPatchProperties jobEnvelope, Context context) { - return this.beginUpdateAsync(resourceGroupName, jobName, jobEnvelope, context).getSyncPoller(); - } - - /** - * Update properties of a Container Apps Job - * - * Patches a Container Apps Job using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String jobName, JobPatchProperties jobEnvelope) { - return beginUpdateAsync(resourceGroupName, jobName, jobEnvelope).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update properties of a Container Apps Job - * - * Patches a Container Apps Job using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String jobName, JobPatchProperties jobEnvelope, - Context context) { - return beginUpdateAsync(resourceGroupName, jobName, jobEnvelope, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update properties of a Container Apps Job - * - * Patches a Container Apps Job using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner update(String resourceGroupName, String jobName, JobPatchProperties jobEnvelope) { - return updateAsync(resourceGroupName, jobName, jobEnvelope).block(); - } - - /** - * Update properties of a Container Apps Job - * - * Patches a Container Apps Job using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobEnvelope Properties used to create a container apps job. - * @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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner update(String resourceGroupName, String jobName, JobPatchProperties jobEnvelope, Context context) { - return updateAsync(resourceGroupName, jobName, jobEnvelope, context).block(); - } - - /** - * Start a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param template Properties used to start a job execution. - * @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's Job execution name along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync(String resourceGroupName, String jobName, - JobExecutionTemplate template) { - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (template != null) { - template.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.start(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, jobName, this.client.getApiVersion(), template, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Start a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param template Properties used to start a job execution. - * @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's Job execution name along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync(String resourceGroupName, String jobName, - JobExecutionTemplate template, 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (template != null) { - template.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.start(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, jobName, - this.client.getApiVersion(), template, accept, context); - } - - /** - * Start a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param template Properties used to start a job execution. - * @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's Job execution name. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobExecutionBaseInner> - beginStartAsync(String resourceGroupName, String jobName, JobExecutionTemplate template) { - Mono>> mono = startWithResponseAsync(resourceGroupName, jobName, template); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), JobExecutionBaseInner.class, JobExecutionBaseInner.class, - this.client.getContext()); - } - - /** - * Start a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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's Job execution name. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobExecutionBaseInner> - beginStartAsync(String resourceGroupName, String jobName) { - final JobExecutionTemplate template = null; - Mono>> mono = startWithResponseAsync(resourceGroupName, jobName, template); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), JobExecutionBaseInner.class, JobExecutionBaseInner.class, - this.client.getContext()); - } - - /** - * Start a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param template Properties used to start a job execution. - * @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's Job execution name. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobExecutionBaseInner> - beginStartAsync(String resourceGroupName, String jobName, JobExecutionTemplate template, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = startWithResponseAsync(resourceGroupName, jobName, template, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), JobExecutionBaseInner.class, JobExecutionBaseInner.class, context); - } - - /** - * Start a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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's Job execution name. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobExecutionBaseInner> beginStart(String resourceGroupName, - String jobName) { - final JobExecutionTemplate template = null; - return this.beginStartAsync(resourceGroupName, jobName, template).getSyncPoller(); - } - - /** - * Start a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param template Properties used to start a job execution. - * @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's Job execution name. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobExecutionBaseInner> beginStart(String resourceGroupName, - String jobName, JobExecutionTemplate template, Context context) { - return this.beginStartAsync(resourceGroupName, jobName, template, context).getSyncPoller(); - } - - /** - * Start a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param template Properties used to start a job execution. - * @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's Job execution name on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String jobName, - JobExecutionTemplate template) { - return beginStartAsync(resourceGroupName, jobName, template).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Start a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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's Job execution name on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String jobName) { - final JobExecutionTemplate template = null; - return beginStartAsync(resourceGroupName, jobName, template).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Start a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param template Properties used to start a job execution. - * @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's Job execution name on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync(String resourceGroupName, String jobName, - JobExecutionTemplate template, Context context) { - return beginStartAsync(resourceGroupName, jobName, template, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Start a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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's Job execution name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobExecutionBaseInner start(String resourceGroupName, String jobName) { - final JobExecutionTemplate template = null; - return startAsync(resourceGroupName, jobName, template).block(); - } - - /** - * Start a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param template Properties used to start a job execution. - * @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's Job execution name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobExecutionBaseInner start(String resourceGroupName, String jobName, JobExecutionTemplate template, - Context context) { - return startAsync(resourceGroupName, jobName, template, context).block(); - } - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @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>> stopExecutionWithResponseAsync(String resourceGroupName, String jobName, - String jobExecutionName) { - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (jobExecutionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter jobExecutionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.stopExecution(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), jobName, jobExecutionName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @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>> stopExecutionWithResponseAsync(String resourceGroupName, String jobName, - String jobExecutionName, 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (jobExecutionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter jobExecutionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.stopExecution(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), jobName, jobExecutionName, accept, context); - } - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @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> beginStopExecutionAsync(String resourceGroupName, String jobName, - String jobExecutionName) { - Mono>> mono - = stopExecutionWithResponseAsync(resourceGroupName, jobName, jobExecutionName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @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> beginStopExecutionAsync(String resourceGroupName, String jobName, - String jobExecutionName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = stopExecutionWithResponseAsync(resourceGroupName, jobName, jobExecutionName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @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> beginStopExecution(String resourceGroupName, String jobName, - String jobExecutionName) { - return this.beginStopExecutionAsync(resourceGroupName, jobName, jobExecutionName).getSyncPoller(); - } - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @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> beginStopExecution(String resourceGroupName, String jobName, - String jobExecutionName, Context context) { - return this.beginStopExecutionAsync(resourceGroupName, jobName, jobExecutionName, context).getSyncPoller(); - } - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @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 stopExecutionAsync(String resourceGroupName, String jobName, String jobExecutionName) { - return beginStopExecutionAsync(resourceGroupName, jobName, jobExecutionName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @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 stopExecutionAsync(String resourceGroupName, String jobName, String jobExecutionName, - Context context) { - return beginStopExecutionAsync(resourceGroupName, jobName, jobExecutionName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @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 stopExecution(String resourceGroupName, String jobName, String jobExecutionName) { - stopExecutionAsync(resourceGroupName, jobName, jobExecutionName).block(); - } - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @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 stopExecution(String resourceGroupName, String jobName, String jobExecutionName, Context context) { - stopExecutionAsync(resourceGroupName, jobName, jobExecutionName, context).block(); - } - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 executions collection ARM resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopMultipleExecutionsWithResponseAsync(String resourceGroupName, - String jobName) { - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.stopMultipleExecutions(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), jobName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 executions collection ARM resource along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopMultipleExecutionsWithResponseAsync(String resourceGroupName, - String jobName, 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.stopMultipleExecutions(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), jobName, accept, context); - } - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 executions collection ARM resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContainerAppJobExecutionsInner> - beginStopMultipleExecutionsAsync(String resourceGroupName, String jobName) { - Mono>> mono = stopMultipleExecutionsWithResponseAsync(resourceGroupName, jobName); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ContainerAppJobExecutionsInner.class, ContainerAppJobExecutionsInner.class, - this.client.getContext()); - } - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 executions collection ARM resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContainerAppJobExecutionsInner> - beginStopMultipleExecutionsAsync(String resourceGroupName, String jobName, Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = stopMultipleExecutionsWithResponseAsync(resourceGroupName, jobName, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ContainerAppJobExecutionsInner.class, ContainerAppJobExecutionsInner.class, - context); - } - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 executions collection ARM resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppJobExecutionsInner> - beginStopMultipleExecutions(String resourceGroupName, String jobName) { - return this.beginStopMultipleExecutionsAsync(resourceGroupName, jobName).getSyncPoller(); - } - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 executions collection ARM resource. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppJobExecutionsInner> - beginStopMultipleExecutions(String resourceGroupName, String jobName, Context context) { - return this.beginStopMultipleExecutionsAsync(resourceGroupName, jobName, context).getSyncPoller(); - } - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 executions collection ARM resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopMultipleExecutionsAsync(String resourceGroupName, String jobName) { - return beginStopMultipleExecutionsAsync(resourceGroupName, jobName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 executions collection ARM resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopMultipleExecutionsAsync(String resourceGroupName, String jobName, - Context context) { - return beginStopMultipleExecutionsAsync(resourceGroupName, jobName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 executions collection ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppJobExecutionsInner stopMultipleExecutions(String resourceGroupName, String jobName) { - return stopMultipleExecutionsAsync(resourceGroupName, jobName).block(); - } - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 executions collection ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppJobExecutionsInner stopMultipleExecutions(String resourceGroupName, String jobName, - Context context) { - return stopMultipleExecutionsAsync(resourceGroupName, jobName, context).block(); - } - - /** - * List secrets for a container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 Apps Job Secrets Collection ARM resource along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync(String resourceGroupName, - String jobName) { - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), jobName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List secrets for a container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 Apps Job Secrets Collection ARM resource along with {@link Response} on successful completion - * of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync(String resourceGroupName, - String jobName, 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), jobName, accept, context); - } - - /** - * List secrets for a container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 Apps Job Secrets Collection ARM resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listSecretsAsync(String resourceGroupName, String jobName) { - return listSecretsWithResponseAsync(resourceGroupName, jobName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * List secrets for a container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 Apps Job Secrets Collection ARM resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSecretsWithResponse(String resourceGroupName, String jobName, - Context context) { - return listSecretsWithResponseAsync(resourceGroupName, jobName, context).block(); - } - - /** - * List secrets for a container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 Apps Job Secrets Collection ARM resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobSecretsCollectionInner listSecrets(String resourceGroupName, String jobName) { - return listSecretsWithResponse(resourceGroupName, jobName, Context.NONE).getValue(); - } - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resumeWithResponseAsync(String resourceGroupName, String jobName) { - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.resume(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), jobName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> resumeWithResponseAsync(String resourceGroupName, String jobName, - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.resume(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), jobName, accept, context); - } - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginResumeAsync(String resourceGroupName, String jobName) { - Mono>> mono = resumeWithResponseAsync(resourceGroupName, jobName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, this.client.getContext()); - } - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginResumeAsync(String resourceGroupName, String jobName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = resumeWithResponseAsync(resourceGroupName, jobName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, context); - } - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is 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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginResume(String resourceGroupName, String jobName) { - return this.beginResumeAsync(resourceGroupName, jobName).getSyncPoller(); - } - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is 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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginResume(String resourceGroupName, String jobName, - Context context) { - return this.beginResumeAsync(resourceGroupName, jobName, context).getSyncPoller(); - } - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resumeAsync(String resourceGroupName, String jobName) { - return beginResumeAsync(resourceGroupName, jobName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono resumeAsync(String resourceGroupName, String jobName, Context context) { - return beginResumeAsync(resourceGroupName, jobName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner resume(String resourceGroupName, String jobName) { - return resumeAsync(resourceGroupName, jobName).block(); - } - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner resume(String resourceGroupName, String jobName, Context context) { - return resumeAsync(resourceGroupName, jobName, context).block(); - } - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> suspendWithResponseAsync(String resourceGroupName, String jobName) { - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.suspend(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), jobName, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Job along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> suspendWithResponseAsync(String resourceGroupName, String jobName, - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.suspend(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), jobName, accept, context); - } - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginSuspendAsync(String resourceGroupName, String jobName) { - Mono>> mono = suspendWithResponseAsync(resourceGroupName, jobName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, this.client.getContext()); - } - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown 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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginSuspendAsync(String resourceGroupName, String jobName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = suspendWithResponseAsync(resourceGroupName, jobName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, - JobInner.class, context); - } - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is 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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginSuspend(String resourceGroupName, String jobName) { - return this.beginSuspendAsync(resourceGroupName, jobName).getSyncPoller(); - } - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is 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 Job. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginSuspend(String resourceGroupName, String jobName, - Context context) { - return this.beginSuspendAsync(resourceGroupName, jobName, context).getSyncPoller(); - } - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono suspendAsync(String resourceGroupName, String jobName) { - return beginSuspendAsync(resourceGroupName, jobName).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Job on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono suspendAsync(String resourceGroupName, String jobName, Context context) { - return beginSuspendAsync(resourceGroupName, jobName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner suspend(String resourceGroupName, String jobName) { - return suspendAsync(resourceGroupName, jobName).block(); - } - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Job. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobInner suspend(String resourceGroupName, String jobName, Context context) { - return suspendAsync(resourceGroupName, jobName, context).block(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return diagnostics data collection for a resource along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsNextSinglePageAsync(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.listDetectorsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return diagnostics data collection for a resource along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsNextSinglePageAsync(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.listDetectorsNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 Apps Jobs collection ARM 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. - * @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 Apps Jobs collection ARM 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. - * @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 Apps Jobs collection ARM 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. - * @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 Apps Jobs collection ARM 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/JobsExecutionsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsExecutionsClientImpl.java deleted file mode 100644 index 24dc36286952..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsExecutionsClientImpl.java +++ /dev/null @@ -1,302 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.JobsExecutionsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppJobExecutionsInner; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; -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 JobsExecutionsClient. - */ -public final class JobsExecutionsClientImpl implements JobsExecutionsClient { - /** - * The proxy service used to perform REST calls. - */ - private final JobsExecutionsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of JobsExecutionsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - JobsExecutionsClientImpl(ContainerAppsApiClientImpl client) { - this.service - = RestProxy.create(JobsExecutionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientJobsExecutions to be used by the proxy service - * to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface JobsExecutionsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get a Container Apps Job's executions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Container Apps Job's executions along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String jobName, - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, jobName, this.client.getApiVersion(), 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())); - } - - /** - * Get a Container Apps Job's executions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Container Apps Job's executions along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String jobName, - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName 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, jobName, - this.client.getApiVersion(), filter, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get a Container Apps Job's executions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param filter The filter to apply on the operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Container Apps Job's executions as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String jobName, String filter) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, jobName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get a Container Apps Job's executions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 Container Apps Job's executions as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String jobName) { - final String filter = null; - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, jobName, filter), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get a Container Apps Job's executions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Container Apps Job's executions as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String jobName, String filter, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, jobName, filter, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get a Container Apps Job's executions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 Container Apps Job's executions as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String jobName) { - final String filter = null; - return new PagedIterable<>(listAsync(resourceGroupName, jobName, filter)); - } - - /** - * Get a Container Apps Job's executions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Container Apps Job's executions as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String jobName, String filter, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, jobName, filter, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 executions collection ARM 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. - * @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 executions collection ARM 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/JobsExecutionsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsExecutionsImpl.java deleted file mode 100644 index eb3cb8fe223a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsExecutionsImpl.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.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.JobsExecutionsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; -import com.azure.resourcemanager.appcontainers.models.JobExecution; -import com.azure.resourcemanager.appcontainers.models.JobsExecutions; - -public final class JobsExecutionsImpl implements JobsExecutions { - private static final ClientLogger LOGGER = new ClientLogger(JobsExecutionsImpl.class); - - private final JobsExecutionsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public JobsExecutionsImpl(JobsExecutionsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String jobName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, jobName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new JobExecutionImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String jobName, String filter, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, jobName, filter, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new JobExecutionImpl(inner1, this.manager())); - } - - private JobsExecutionsClient 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/JobsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsImpl.java deleted file mode 100644 index 7a1599cde8f8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsImpl.java +++ /dev/null @@ -1,309 +0,0 @@ -// Copyright (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.JobsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppJobExecutionsInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner; -import com.azure.resourcemanager.appcontainers.fluent.models.JobInner; -import com.azure.resourcemanager.appcontainers.fluent.models.JobSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppJobExecutions; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -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; - -public final class JobsImpl implements Jobs { - private static final ClientLogger LOGGER = new ClientLogger(JobsImpl.class); - - private final JobsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public JobsImpl(JobsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable listDetectors(String resourceGroupName, String jobName) { - PagedIterable inner = this.serviceClient().listDetectors(resourceGroupName, jobName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DiagnosticsImpl(inner1, this.manager())); - } - - public PagedIterable listDetectors(String resourceGroupName, String jobName, Context context) { - PagedIterable inner = this.serviceClient().listDetectors(resourceGroupName, jobName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new DiagnosticsImpl(inner1, this.manager())); - } - - public Response getDetectorWithResponse(String resourceGroupName, String jobName, String detectorName, - Context context) { - Response inner - = this.serviceClient().getDetectorWithResponse(resourceGroupName, jobName, detectorName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DiagnosticsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Diagnostics getDetector(String resourceGroupName, String jobName, String detectorName) { - DiagnosticsInner inner = this.serviceClient().getDetector(resourceGroupName, jobName, detectorName); - if (inner != null) { - return new DiagnosticsImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response proxyGetWithResponse(String resourceGroupName, String jobName, String apiName, - Context context) { - Response inner - = this.serviceClient().proxyGetWithResponse(resourceGroupName, jobName, apiName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new JobImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Job proxyGet(String resourceGroupName, String jobName, String apiName) { - JobInner inner = this.serviceClient().proxyGet(resourceGroupName, jobName, apiName); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable list() { - PagedIterable inner = this.serviceClient().list(); - return ResourceManagerUtils.mapPage(inner, inner1 -> new JobImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new JobImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new JobImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new JobImpl(inner1, this.manager())); - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String jobName, Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, jobName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new JobImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Job getByResourceGroup(String resourceGroupName, String jobName) { - JobInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, jobName); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String jobName) { - this.serviceClient().delete(resourceGroupName, jobName); - } - - public void delete(String resourceGroupName, String jobName, Context context) { - this.serviceClient().delete(resourceGroupName, jobName, context); - } - - public JobExecutionBase start(String resourceGroupName, String jobName) { - JobExecutionBaseInner inner = this.serviceClient().start(resourceGroupName, jobName); - if (inner != null) { - return new JobExecutionBaseImpl(inner, this.manager()); - } else { - return null; - } - } - - public JobExecutionBase start(String resourceGroupName, String jobName, JobExecutionTemplate template, - Context context) { - JobExecutionBaseInner inner = this.serviceClient().start(resourceGroupName, jobName, template, context); - if (inner != null) { - return new JobExecutionBaseImpl(inner, this.manager()); - } else { - return null; - } - } - - public void stopExecution(String resourceGroupName, String jobName, String jobExecutionName) { - this.serviceClient().stopExecution(resourceGroupName, jobName, jobExecutionName); - } - - public void stopExecution(String resourceGroupName, String jobName, String jobExecutionName, Context context) { - this.serviceClient().stopExecution(resourceGroupName, jobName, jobExecutionName, context); - } - - public ContainerAppJobExecutions stopMultipleExecutions(String resourceGroupName, String jobName) { - ContainerAppJobExecutionsInner inner = this.serviceClient().stopMultipleExecutions(resourceGroupName, jobName); - if (inner != null) { - return new ContainerAppJobExecutionsImpl(inner, this.manager()); - } else { - return null; - } - } - - public ContainerAppJobExecutions stopMultipleExecutions(String resourceGroupName, String jobName, Context context) { - ContainerAppJobExecutionsInner inner - = this.serviceClient().stopMultipleExecutions(resourceGroupName, jobName, context); - if (inner != null) { - return new ContainerAppJobExecutionsImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response listSecretsWithResponse(String resourceGroupName, String jobName, - Context context) { - Response inner - = this.serviceClient().listSecretsWithResponse(resourceGroupName, jobName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new JobSecretsCollectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public JobSecretsCollection listSecrets(String resourceGroupName, String jobName) { - JobSecretsCollectionInner inner = this.serviceClient().listSecrets(resourceGroupName, jobName); - if (inner != null) { - return new JobSecretsCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Job resume(String resourceGroupName, String jobName) { - JobInner inner = this.serviceClient().resume(resourceGroupName, jobName); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - - public Job resume(String resourceGroupName, String jobName, Context context) { - JobInner inner = this.serviceClient().resume(resourceGroupName, jobName, context); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - - public Job suspend(String resourceGroupName, String jobName) { - JobInner inner = this.serviceClient().suspend(resourceGroupName, jobName); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - - public Job suspend(String resourceGroupName, String jobName, Context context) { - JobInner inner = this.serviceClient().suspend(resourceGroupName, jobName, context); - if (inner != null) { - return new JobImpl(inner, this.manager()); - } else { - return null; - } - } - - public Job 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 jobName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, jobName, 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 jobName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, jobName, 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 jobName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - this.delete(resourceGroupName, jobName, 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 jobName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); - if (jobName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); - } - this.delete(resourceGroupName, jobName, context); - } - - private JobsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public JobImpl define(String name) { - return new JobImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LogicAppImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LogicAppImpl.java deleted file mode 100644 index 101a332d0e4e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LogicAppImpl.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.implementation; - -import com.azure.core.http.rest.Response; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.LogicAppInner; -import com.azure.resourcemanager.appcontainers.models.LogicApp; -import com.azure.resourcemanager.appcontainers.models.WorkflowArtifacts; -import com.azure.resourcemanager.appcontainers.models.WorkflowEnvelope; - -public final class LogicAppImpl implements LogicApp, LogicApp.Definition, LogicApp.Update { - private LogicAppInner 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 Object properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public LogicAppInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String containerAppName; - - private String logicAppName; - - public LogicAppImpl withExistingContainerApp(String resourceGroupName, String containerAppName) { - this.resourceGroupName = resourceGroupName; - this.containerAppName = containerAppName; - return this; - } - - public LogicApp create() { - this.innerObject = serviceManager.serviceClient() - .getLogicApps() - .createOrUpdateWithResponse(resourceGroupName, containerAppName, logicAppName, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public LogicApp create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getLogicApps() - .createOrUpdateWithResponse(resourceGroupName, containerAppName, logicAppName, this.innerModel(), context) - .getValue(); - return this; - } - - LogicAppImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new LogicAppInner(); - this.serviceManager = serviceManager; - this.logicAppName = name; - } - - public LogicAppImpl update() { - return this; - } - - public LogicApp apply() { - this.innerObject = serviceManager.serviceClient() - .getLogicApps() - .createOrUpdateWithResponse(resourceGroupName, containerAppName, logicAppName, this.innerModel(), - Context.NONE) - .getValue(); - return this; - } - - public LogicApp apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getLogicApps() - .createOrUpdateWithResponse(resourceGroupName, containerAppName, logicAppName, this.innerModel(), context) - .getValue(); - return this; - } - - LogicAppImpl(LogicAppInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.containerAppName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "containerApps"); - this.logicAppName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "logicApps"); - } - - public LogicApp refresh() { - this.innerObject = serviceManager.serviceClient() - .getLogicApps() - .getWithResponse(resourceGroupName, containerAppName, logicAppName, Context.NONE) - .getValue(); - return this; - } - - public LogicApp refresh(Context context) { - this.innerObject = serviceManager.serviceClient() - .getLogicApps() - .getWithResponse(resourceGroupName, containerAppName, logicAppName, context) - .getValue(); - return this; - } - - public Response deployWorkflowArtifactsWithResponse(WorkflowArtifacts workflowArtifacts, Context context) { - return serviceManager.logicApps() - .deployWorkflowArtifactsWithResponse(resourceGroupName, containerAppName, logicAppName, workflowArtifacts, - context); - } - - public void deployWorkflowArtifacts() { - serviceManager.logicApps().deployWorkflowArtifacts(resourceGroupName, containerAppName, logicAppName); - } - - public Response listWorkflowsConnectionsWithResponse(Context context) { - return serviceManager.logicApps() - .listWorkflowsConnectionsWithResponse(resourceGroupName, containerAppName, logicAppName, context); - } - - public WorkflowEnvelope listWorkflowsConnections() { - return serviceManager.logicApps().listWorkflowsConnections(resourceGroupName, containerAppName, logicAppName); - } - - public LogicAppImpl withProperties(Object properties) { - this.innerModel().withProperties(properties); - return this; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LogicAppsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LogicAppsClientImpl.java deleted file mode 100644 index 8c6c8f39a707..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LogicAppsClientImpl.java +++ /dev/null @@ -1,1386 +0,0 @@ -// Copyright (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.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.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.LogicAppsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.LogicAppInner; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkflowEnvelopeInner; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import com.azure.resourcemanager.appcontainers.models.LogicAppsProxyMethod; -import com.azure.resourcemanager.appcontainers.models.WorkflowArtifacts; -import com.azure.resourcemanager.appcontainers.models.WorkflowEnvelopeCollection; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in LogicAppsClient. - */ -public final class LogicAppsClientImpl implements LogicAppsClient { - /** - * The proxy service used to perform REST calls. - */ - private final LogicAppsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of LogicAppsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - LogicAppsClientImpl(ContainerAppsApiClientImpl client) { - this.service - = RestProxy.create(LogicAppsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientLogicApps to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface LogicAppsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("logicAppName") String logicAppName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("logicAppName") String logicAppName, - @QueryParam("api-version") String apiVersion, @BodyParam("application/json") LogicAppInner resource, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("logicAppName") String logicAppName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}/workflows") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listWorkflows(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("logicAppName") String logicAppName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}/workflows/{workflowName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getWorkflow(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("logicAppName") String logicAppName, - @PathParam("workflowName") String workflowName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}/deployWorkflowArtifacts") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> deployWorkflowArtifacts(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("logicAppName") String logicAppName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") WorkflowArtifacts workflowArtifacts, @HeaderParam("Accept") String accept, - Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}/listWorkflowsConnections") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listWorkflowsConnections(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("logicAppName") String logicAppName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/providers/Microsoft.App/logicApps/{logicAppName}/invoke") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> invoke(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, @PathParam("logicAppName") String logicAppName, - @HeaderParam("x-ms-logicApps-proxy-path") String xMsLogicAppsProxyPath, - @HeaderParam("x-ms-logicApps-proxy-method") LogicAppsProxyMethod xMsLogicAppsProxyMethod, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listWorkflowsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets a logic app extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 a logic app extension resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String containerAppName, - String logicAppName) { - 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 (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, logicAppName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets a logic app extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 a logic app extension resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, String containerAppName, - String logicAppName, 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 (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName 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, - containerAppName, logicAppName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets a logic app extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 a logic app extension resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String containerAppName, String logicAppName) { - return getWithResponseAsync(resourceGroupName, containerAppName, logicAppName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets a logic app extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 a logic app extension resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, Context context) { - return getWithResponseAsync(resourceGroupName, containerAppName, logicAppName, context).block(); - } - - /** - * Gets a logic app extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 a logic app extension resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LogicAppInner get(String resourceGroupName, String containerAppName, String logicAppName) { - return getWithResponse(resourceGroupName, containerAppName, logicAppName, Context.NONE).getValue(); - } - - /** - * Create or update a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param resource Logic app resource properties. - * @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 logic app extension resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String containerAppName, String logicAppName, LogicAppInner resource) { - 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 (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, logicAppName, this.client.getApiVersion(), resource, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param resource Logic app resource properties. - * @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 logic app extension resource along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String containerAppName, String logicAppName, LogicAppInner resource, 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 (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - if (resource == null) { - return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null.")); - } else { - resource.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, logicAppName, this.client.getApiVersion(), resource, accept, context); - } - - /** - * Create or update a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param resource Logic app resource properties. - * @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 logic app extension resource on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String containerAppName, - String logicAppName, LogicAppInner resource) { - return createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, logicAppName, resource) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param resource Logic app resource properties. - * @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 logic app extension resource along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, LogicAppInner resource, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, logicAppName, resource, context) - .block(); - } - - /** - * Create or update a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param resource Logic app resource properties. - * @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 logic app extension resource. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public LogicAppInner createOrUpdate(String resourceGroupName, String containerAppName, String logicAppName, - LogicAppInner resource) { - return createOrUpdateWithResponse(resourceGroupName, containerAppName, logicAppName, resource, Context.NONE) - .getValue(); - } - - /** - * Deletes a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String containerAppName, - String logicAppName) { - 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 (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, logicAppName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync(String resourceGroupName, String containerAppName, - String logicAppName, 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 (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName 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, - containerAppName, logicAppName, this.client.getApiVersion(), accept, context); - } - - /** - * Deletes a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String containerAppName, String logicAppName) { - return deleteWithResponseAsync(resourceGroupName, containerAppName, logicAppName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, containerAppName, logicAppName, context).block(); - } - - /** - * Deletes a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String containerAppName, String logicAppName) { - deleteWithResponse(resourceGroupName, containerAppName, logicAppName, Context.NONE); - } - - /** - * List the workflows for a logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 collection of workflow information elements along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWorkflowsSinglePageAsync(String resourceGroupName, - String containerAppName, String logicAppName) { - 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 (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listWorkflows(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, logicAppName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * List the workflows for a logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 collection of workflow information elements along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWorkflowsSinglePageAsync(String resourceGroupName, - String containerAppName, String logicAppName, 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 (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .listWorkflows(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, logicAppName, this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * List the workflows for a logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 collection of workflow information elements as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listWorkflowsAsync(String resourceGroupName, String containerAppName, - String logicAppName) { - return new PagedFlux<>(() -> listWorkflowsSinglePageAsync(resourceGroupName, containerAppName, logicAppName), - nextLink -> listWorkflowsNextSinglePageAsync(nextLink)); - } - - /** - * List the workflows for a logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 collection of workflow information elements as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listWorkflowsAsync(String resourceGroupName, String containerAppName, - String logicAppName, Context context) { - return new PagedFlux<>( - () -> listWorkflowsSinglePageAsync(resourceGroupName, containerAppName, logicAppName, context), - nextLink -> listWorkflowsNextSinglePageAsync(nextLink, context)); - } - - /** - * List the workflows for a logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 collection of workflow information elements as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listWorkflows(String resourceGroupName, String containerAppName, - String logicAppName) { - return new PagedIterable<>(listWorkflowsAsync(resourceGroupName, containerAppName, logicAppName)); - } - - /** - * List the workflows for a logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 collection of workflow information elements as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listWorkflows(String resourceGroupName, String containerAppName, - String logicAppName, Context context) { - return new PagedIterable<>(listWorkflowsAsync(resourceGroupName, containerAppName, logicAppName, context)); - } - - /** - * Get workflow information by its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowName Workflow name. - * @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 workflow information by its name along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWorkflowWithResponseAsync(String resourceGroupName, - String containerAppName, String logicAppName, String workflowName) { - 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 (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - if (workflowName == null) { - return Mono.error(new IllegalArgumentException("Parameter workflowName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getWorkflow(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, logicAppName, workflowName, this.client.getApiVersion(), accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get workflow information by its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowName Workflow name. - * @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 workflow information by its name along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWorkflowWithResponseAsync(String resourceGroupName, - String containerAppName, String logicAppName, String workflowName, 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 (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - if (workflowName == null) { - return Mono.error(new IllegalArgumentException("Parameter workflowName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getWorkflow(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, logicAppName, workflowName, this.client.getApiVersion(), accept, context); - } - - /** - * Get workflow information by its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowName Workflow name. - * @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 workflow information by its name on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getWorkflowAsync(String resourceGroupName, String containerAppName, - String logicAppName, String workflowName) { - return getWorkflowWithResponseAsync(resourceGroupName, containerAppName, logicAppName, workflowName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get workflow information by its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowName Workflow name. - * @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 workflow information by its name along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWorkflowWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, String workflowName, Context context) { - return getWorkflowWithResponseAsync(resourceGroupName, containerAppName, logicAppName, workflowName, context) - .block(); - } - - /** - * Get workflow information by its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowName Workflow name. - * @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 workflow information by its name. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkflowEnvelopeInner getWorkflow(String resourceGroupName, String containerAppName, String logicAppName, - String workflowName) { - return getWorkflowWithResponse(resourceGroupName, containerAppName, logicAppName, workflowName, Context.NONE) - .getValue(); - } - - /** - * Creates or updates the artifacts for the logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowArtifacts Application settings and files of the workflow. - * @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> deployWorkflowArtifactsWithResponseAsync(String resourceGroupName, - String containerAppName, String logicAppName, WorkflowArtifacts workflowArtifacts) { - 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 (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - if (workflowArtifacts != null) { - workflowArtifacts.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.deployWorkflowArtifacts(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, containerAppName, logicAppName, - this.client.getApiVersion(), workflowArtifacts, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates the artifacts for the logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowArtifacts Application settings and files of the workflow. - * @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> deployWorkflowArtifactsWithResponseAsync(String resourceGroupName, - String containerAppName, String logicAppName, WorkflowArtifacts workflowArtifacts, 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 (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - if (workflowArtifacts != null) { - workflowArtifacts.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.deployWorkflowArtifacts(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, logicAppName, this.client.getApiVersion(), workflowArtifacts, accept, - context); - } - - /** - * Creates or updates the artifacts for the logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deployWorkflowArtifactsAsync(String resourceGroupName, String containerAppName, - String logicAppName) { - final WorkflowArtifacts workflowArtifacts = null; - return deployWorkflowArtifactsWithResponseAsync(resourceGroupName, containerAppName, logicAppName, - workflowArtifacts).flatMap(ignored -> Mono.empty()); - } - - /** - * Creates or updates the artifacts for the logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowArtifacts Application settings and files of the workflow. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deployWorkflowArtifactsWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, WorkflowArtifacts workflowArtifacts, Context context) { - return deployWorkflowArtifactsWithResponseAsync(resourceGroupName, containerAppName, logicAppName, - workflowArtifacts, context).block(); - } - - /** - * Creates or updates the artifacts for the logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void deployWorkflowArtifacts(String resourceGroupName, String containerAppName, String logicAppName) { - final WorkflowArtifacts workflowArtifacts = null; - deployWorkflowArtifactsWithResponse(resourceGroupName, containerAppName, logicAppName, workflowArtifacts, - Context.NONE); - } - - /** - * Gets logic app's connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 logic app's connections along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWorkflowsConnectionsWithResponseAsync(String resourceGroupName, - String containerAppName, String logicAppName) { - 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 (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.listWorkflowsConnections(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, logicAppName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets logic app's connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 logic app's connections along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWorkflowsConnectionsWithResponseAsync(String resourceGroupName, - String containerAppName, String logicAppName, 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 (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listWorkflowsConnections(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, logicAppName, this.client.getApiVersion(), accept, context); - } - - /** - * Gets logic app's connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 logic app's connections on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listWorkflowsConnectionsAsync(String resourceGroupName, String containerAppName, - String logicAppName) { - return listWorkflowsConnectionsWithResponseAsync(resourceGroupName, containerAppName, logicAppName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Gets logic app's connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 logic app's connections along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWorkflowsConnectionsWithResponse(String resourceGroupName, - String containerAppName, String logicAppName, Context context) { - return listWorkflowsConnectionsWithResponseAsync(resourceGroupName, containerAppName, logicAppName, context) - .block(); - } - - /** - * Gets logic app's connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 logic app's connections. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public WorkflowEnvelopeInner listWorkflowsConnections(String resourceGroupName, String containerAppName, - String logicAppName) { - return listWorkflowsConnectionsWithResponse(resourceGroupName, containerAppName, logicAppName, Context.NONE) - .getValue(); - } - - /** - * Proxies a the API call to the logic 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 logicAppName Name of the LogicApp App, the extension resource. - * @param xMsLogicAppsProxyPath The proxy path for the API call. - * @param xMsLogicAppsProxyMethod The proxy method for the API call. - * @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 any object along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> invokeWithResponseAsync(String resourceGroupName, String containerAppName, - String logicAppName, String xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod) { - 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 (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - if (xMsLogicAppsProxyPath == null) { - return Mono - .error(new IllegalArgumentException("Parameter xMsLogicAppsProxyPath is required and cannot be null.")); - } - if (xMsLogicAppsProxyMethod == null) { - return Mono.error( - new IllegalArgumentException("Parameter xMsLogicAppsProxyMethod is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.invoke(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, containerAppName, logicAppName, xMsLogicAppsProxyPath, xMsLogicAppsProxyMethod, - this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Proxies a the API call to the logic 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 logicAppName Name of the LogicApp App, the extension resource. - * @param xMsLogicAppsProxyPath The proxy path for the API call. - * @param xMsLogicAppsProxyMethod The proxy method for the API call. - * @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 any object along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> invokeWithResponseAsync(String resourceGroupName, String containerAppName, - String logicAppName, String xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod, - 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 (logicAppName == null) { - return Mono.error(new IllegalArgumentException("Parameter logicAppName is required and cannot be null.")); - } - if (xMsLogicAppsProxyPath == null) { - return Mono - .error(new IllegalArgumentException("Parameter xMsLogicAppsProxyPath is required and cannot be null.")); - } - if (xMsLogicAppsProxyMethod == null) { - return Mono.error( - new IllegalArgumentException("Parameter xMsLogicAppsProxyMethod is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.invoke(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - containerAppName, logicAppName, xMsLogicAppsProxyPath, xMsLogicAppsProxyMethod, this.client.getApiVersion(), - accept, context); - } - - /** - * Proxies a the API call to the logic 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 logicAppName Name of the LogicApp App, the extension resource. - * @param xMsLogicAppsProxyPath The proxy path for the API call. - * @param xMsLogicAppsProxyMethod The proxy method for the API call. - * @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 any object on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono invokeAsync(String resourceGroupName, String containerAppName, String logicAppName, - String xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod) { - return invokeWithResponseAsync(resourceGroupName, containerAppName, logicAppName, xMsLogicAppsProxyPath, - xMsLogicAppsProxyMethod).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Proxies a the API call to the logic 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 logicAppName Name of the LogicApp App, the extension resource. - * @param xMsLogicAppsProxyPath The proxy path for the API call. - * @param xMsLogicAppsProxyMethod The proxy method for the API call. - * @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 any object along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response invokeWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - String xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod, Context context) { - return invokeWithResponseAsync(resourceGroupName, containerAppName, logicAppName, xMsLogicAppsProxyPath, - xMsLogicAppsProxyMethod, context).block(); - } - - /** - * Proxies a the API call to the logic 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 logicAppName Name of the LogicApp App, the extension resource. - * @param xMsLogicAppsProxyPath The proxy path for the API call. - * @param xMsLogicAppsProxyMethod The proxy method for the API call. - * @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 any object. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Object invoke(String resourceGroupName, String containerAppName, String logicAppName, - String xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod) { - return invokeWithResponse(resourceGroupName, containerAppName, logicAppName, xMsLogicAppsProxyPath, - xMsLogicAppsProxyMethod, Context.NONE).getValue(); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of workflow information elements along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWorkflowsNextSinglePageAsync(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.listWorkflowsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of workflow information elements along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWorkflowsNextSinglePageAsync(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.listWorkflowsNext(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/LogicAppsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LogicAppsImpl.java deleted file mode 100644 index 80699ff512c1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/LogicAppsImpl.java +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright (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.LogicAppsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.LogicAppInner; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkflowEnvelopeInner; -import com.azure.resourcemanager.appcontainers.models.LogicApp; -import com.azure.resourcemanager.appcontainers.models.LogicApps; -import com.azure.resourcemanager.appcontainers.models.LogicAppsProxyMethod; -import com.azure.resourcemanager.appcontainers.models.WorkflowArtifacts; -import com.azure.resourcemanager.appcontainers.models.WorkflowEnvelope; - -public final class LogicAppsImpl implements LogicApps { - private static final ClientLogger LOGGER = new ClientLogger(LogicAppsImpl.class); - - private final LogicAppsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public LogicAppsImpl(LogicAppsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, containerAppName, logicAppName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new LogicAppImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public LogicApp get(String resourceGroupName, String containerAppName, String logicAppName) { - LogicAppInner inner = this.serviceClient().get(resourceGroupName, containerAppName, logicAppName); - if (inner != null) { - return new LogicAppImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, containerAppName, logicAppName, context); - } - - public void delete(String resourceGroupName, String containerAppName, String logicAppName) { - this.serviceClient().delete(resourceGroupName, containerAppName, logicAppName); - } - - public PagedIterable listWorkflows(String resourceGroupName, String containerAppName, - String logicAppName) { - PagedIterable inner - = this.serviceClient().listWorkflows(resourceGroupName, containerAppName, logicAppName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkflowEnvelopeImpl(inner1, this.manager())); - } - - public PagedIterable listWorkflows(String resourceGroupName, String containerAppName, - String logicAppName, Context context) { - PagedIterable inner - = this.serviceClient().listWorkflows(resourceGroupName, containerAppName, logicAppName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkflowEnvelopeImpl(inner1, this.manager())); - } - - public Response getWorkflowWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, String workflowName, Context context) { - Response inner = this.serviceClient() - .getWorkflowWithResponse(resourceGroupName, containerAppName, logicAppName, workflowName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkflowEnvelopeImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkflowEnvelope getWorkflow(String resourceGroupName, String containerAppName, String logicAppName, - String workflowName) { - WorkflowEnvelopeInner inner - = this.serviceClient().getWorkflow(resourceGroupName, containerAppName, logicAppName, workflowName); - if (inner != null) { - return new WorkflowEnvelopeImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deployWorkflowArtifactsWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, WorkflowArtifacts workflowArtifacts, Context context) { - return this.serviceClient() - .deployWorkflowArtifactsWithResponse(resourceGroupName, containerAppName, logicAppName, workflowArtifacts, - context); - } - - public void deployWorkflowArtifacts(String resourceGroupName, String containerAppName, String logicAppName) { - this.serviceClient().deployWorkflowArtifacts(resourceGroupName, containerAppName, logicAppName); - } - - public Response listWorkflowsConnectionsWithResponse(String resourceGroupName, - String containerAppName, String logicAppName, Context context) { - Response inner = this.serviceClient() - .listWorkflowsConnectionsWithResponse(resourceGroupName, containerAppName, logicAppName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new WorkflowEnvelopeImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public WorkflowEnvelope listWorkflowsConnections(String resourceGroupName, String containerAppName, - String logicAppName) { - WorkflowEnvelopeInner inner - = this.serviceClient().listWorkflowsConnections(resourceGroupName, containerAppName, logicAppName); - if (inner != null) { - return new WorkflowEnvelopeImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response invokeWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - String xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod, Context context) { - return this.serviceClient() - .invokeWithResponse(resourceGroupName, containerAppName, logicAppName, xMsLogicAppsProxyPath, - xMsLogicAppsProxyMethod, context); - } - - public Object invoke(String resourceGroupName, String containerAppName, String logicAppName, - String xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod) { - return this.serviceClient() - .invoke(resourceGroupName, containerAppName, logicAppName, xMsLogicAppsProxyPath, xMsLogicAppsProxyMethod); - } - - public LogicApp 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 containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String logicAppName = ResourceManagerUtils.getValueFromIdByName(id, "logicApps"); - if (logicAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'logicApps'.", id))); - } - return this.getWithResponse(resourceGroupName, containerAppName, logicAppName, 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 containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String logicAppName = ResourceManagerUtils.getValueFromIdByName(id, "logicApps"); - if (logicAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'logicApps'.", id))); - } - return this.getWithResponse(resourceGroupName, containerAppName, logicAppName, 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 containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String logicAppName = ResourceManagerUtils.getValueFromIdByName(id, "logicApps"); - if (logicAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'logicApps'.", id))); - } - this.deleteWithResponse(resourceGroupName, containerAppName, logicAppName, Context.NONE); - } - - public Response 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 containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); - if (containerAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); - } - String logicAppName = ResourceManagerUtils.getValueFromIdByName(id, "logicApps"); - if (logicAppName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'logicApps'.", id))); - } - return this.deleteWithResponse(resourceGroupName, containerAppName, logicAppName, context); - } - - private LogicAppsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public LogicAppImpl define(String name) { - return new LogicAppImpl(name, this.manager()); - } -} 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 deleted file mode 100644 index 4c9c56e75a7f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificateImpl.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (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.ManagedCertificateInner; -import com.azure.resourcemanager.appcontainers.models.ManagedCertificate; -import com.azure.resourcemanager.appcontainers.models.ManagedCertificatePatch; -import com.azure.resourcemanager.appcontainers.models.ManagedCertificateProperties; -import java.util.Collections; -import java.util.Map; - -public final class ManagedCertificateImpl - implements ManagedCertificate, ManagedCertificate.Definition, ManagedCertificate.Update { - private ManagedCertificateInner 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 ManagedCertificateProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ManagedCertificateInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String environmentName; - - private String managedCertificateName; - - private ManagedCertificatePatch updateManagedCertificateEnvelope; - - public ManagedCertificateImpl withExistingManagedEnvironment(String resourceGroupName, String environmentName) { - this.resourceGroupName = resourceGroupName; - this.environmentName = environmentName; - return this; - } - - public ManagedCertificate create() { - 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); - return this; - } - - ManagedCertificateImpl(String name, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new ManagedCertificateInner(); - this.serviceManager = serviceManager; - this.managedCertificateName = name; - } - - public ManagedCertificateImpl update() { - this.updateManagedCertificateEnvelope = new ManagedCertificatePatch(); - return this; - } - - public ManagedCertificate apply() { - 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(); - return this; - } - - ManagedCertificateImpl(ManagedCertificateInner 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.managedCertificateName - = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedCertificates"); - } - - public ManagedCertificate refresh() { - 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(); - return this; - } - - public ManagedCertificateImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ManagedCertificateImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ManagedCertificateImpl withTags(Map tags) { - if (isInCreateMode()) { - this.innerModel().withTags(tags); - return this; - } else { - this.updateManagedCertificateEnvelope.withTags(tags); - return this; - } - } - - public ManagedCertificateImpl withProperties(ManagedCertificateProperties properties) { - this.innerModel().withProperties(properties); - 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/ManagedCertificatesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesClientImpl.java deleted file mode 100644 index 9a50cf3da9a3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesClientImpl.java +++ /dev/null @@ -1,1106 +0,0 @@ -// Copyright (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.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.ManagedCertificatesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedCertificateInner; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import com.azure.resourcemanager.appcontainers.models.ManagedCertificateCollection; -import com.azure.resourcemanager.appcontainers.models.ManagedCertificatePatch; -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 ManagedCertificatesClient. - */ -public final class ManagedCertificatesClientImpl implements ManagedCertificatesClient { - /** - * The proxy service used to perform REST calls. - */ - private final ManagedCertificatesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ManagedCertificatesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedCertificatesClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(ManagedCertificatesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientManagedCertificates to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ManagedCertificatesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("managedCertificateName") String managedCertificateName, - @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}/managedCertificates/{managedCertificateName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(value = ManagementException.class, code = { 400 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("managedCertificateName") String managedCertificateName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ManagedCertificateInner managedCertificateEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("managedCertificateName") String managedCertificateName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("managedCertificateName") String managedCertificateName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ManagedCertificatePatch managedCertificateEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the specified Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @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 specified Managed Certificate along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String environmentName, String managedCertificateName) { - 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 (managedCertificateName == null) { - return Mono.error( - new IllegalArgumentException("Parameter managedCertificateName 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, managedCertificateName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the specified Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @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 specified Managed Certificate along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String environmentName, String managedCertificateName, 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 (managedCertificateName == null) { - return Mono.error( - new IllegalArgumentException("Parameter managedCertificateName 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, managedCertificateName, this.client.getApiVersion(), accept, context); - } - - /** - * Get the specified Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @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 specified Managed Certificate on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String environmentName, - String managedCertificateName) { - return getWithResponseAsync(resourceGroupName, environmentName, managedCertificateName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the specified Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @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 specified Managed Certificate along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String environmentName, - String managedCertificateName, Context context) { - return getWithResponseAsync(resourceGroupName, environmentName, managedCertificateName, context).block(); - } - - /** - * Get the specified Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @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 specified Managed Certificate. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedCertificateInner get(String resourceGroupName, String environmentName, - String managedCertificateName) { - return getWithResponse(resourceGroupName, environmentName, managedCertificateName, Context.NONE).getValue(); - } - - /** - * Create or Update a Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @param managedCertificateEnvelope Managed Certificate to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 400. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment along - * with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String managedCertificateName, ManagedCertificateInner managedCertificateEnvelope) { - 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 (managedCertificateName == null) { - return Mono.error( - new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); - } - if (managedCertificateEnvelope != null) { - managedCertificateEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, managedCertificateName, this.client.getApiVersion(), - managedCertificateEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or Update a Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @param managedCertificateEnvelope Managed Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 400. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment along - * with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String managedCertificateName, ManagedCertificateInner managedCertificateEnvelope, - 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 (managedCertificateName == null) { - return Mono.error( - new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); - } - if (managedCertificateEnvelope != null) { - managedCertificateEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, managedCertificateName, this.client.getApiVersion(), managedCertificateEnvelope, accept, - context); - } - - /** - * Create or Update a Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @param managedCertificateEnvelope Managed Certificate to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 400. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed certificates used for Custom Domain bindings of Container - * Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedCertificateInner> beginCreateOrUpdateAsync( - String resourceGroupName, String environmentName, String managedCertificateName, - ManagedCertificateInner managedCertificateEnvelope) { - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, - managedCertificateName, managedCertificateEnvelope); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedCertificateInner.class, ManagedCertificateInner.class, - this.client.getContext()); - } - - /** - * Create or Update a Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 400. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed certificates used for Custom Domain bindings of Container - * Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedCertificateInner> - beginCreateOrUpdateAsync(String resourceGroupName, String environmentName, String managedCertificateName) { - final ManagedCertificateInner managedCertificateEnvelope = null; - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, - managedCertificateName, managedCertificateEnvelope); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedCertificateInner.class, ManagedCertificateInner.class, - this.client.getContext()); - } - - /** - * Create or Update a Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @param managedCertificateEnvelope Managed Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 400. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of managed certificates used for Custom Domain bindings of Container - * Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedCertificateInner> beginCreateOrUpdateAsync( - String resourceGroupName, String environmentName, String managedCertificateName, - ManagedCertificateInner managedCertificateEnvelope, Context context) { - context = this.client.mergeContext(context); - Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, - managedCertificateName, managedCertificateEnvelope, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedCertificateInner.class, ManagedCertificateInner.class, context); - } - - /** - * Create or Update a Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 400. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed certificates used for Custom Domain bindings of Container - * Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedCertificateInner> - beginCreateOrUpdate(String resourceGroupName, String environmentName, String managedCertificateName) { - final ManagedCertificateInner managedCertificateEnvelope = null; - return this - .beginCreateOrUpdateAsync(resourceGroupName, environmentName, managedCertificateName, - managedCertificateEnvelope) - .getSyncPoller(); - } - - /** - * Create or Update a Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @param managedCertificateEnvelope Managed Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 400. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of managed certificates used for Custom Domain bindings of Container - * Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedCertificateInner> beginCreateOrUpdate( - String resourceGroupName, String environmentName, String managedCertificateName, - ManagedCertificateInner managedCertificateEnvelope, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, environmentName, managedCertificateName, - managedCertificateEnvelope, context) - .getSyncPoller(); - } - - /** - * Create or Update a Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @param managedCertificateEnvelope Managed Certificate to be created or updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 400. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, - String managedCertificateName, ManagedCertificateInner managedCertificateEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, environmentName, managedCertificateName, - managedCertificateEnvelope).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or Update a Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 400. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, - String managedCertificateName) { - final ManagedCertificateInner managedCertificateEnvelope = null; - return beginCreateOrUpdateAsync(resourceGroupName, environmentName, managedCertificateName, - managedCertificateEnvelope).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or Update a Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @param managedCertificateEnvelope Managed Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 400. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, - String managedCertificateName, ManagedCertificateInner managedCertificateEnvelope, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, environmentName, managedCertificateName, - managedCertificateEnvelope, context).last().flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Create or Update a Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 400. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedCertificateInner createOrUpdate(String resourceGroupName, String environmentName, - String managedCertificateName) { - final ManagedCertificateInner managedCertificateEnvelope = null; - return createOrUpdateAsync(resourceGroupName, environmentName, managedCertificateName, - managedCertificateEnvelope).block(); - } - - /** - * Create or Update a Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @param managedCertificateEnvelope Managed Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws ManagementException thrown if the request is rejected by server on status code 400. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedCertificateInner createOrUpdate(String resourceGroupName, String environmentName, - String managedCertificateName, ManagedCertificateInner managedCertificateEnvelope, Context context) { - return createOrUpdateAsync(resourceGroupName, environmentName, managedCertificateName, - managedCertificateEnvelope, context).block(); - } - - /** - * Deletes the specified Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @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 environmentName, - String managedCertificateName) { - 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 (managedCertificateName == null) { - return Mono.error( - new IllegalArgumentException("Parameter managedCertificateName 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, managedCertificateName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Deletes the specified Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @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 environmentName, - String managedCertificateName, 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 (managedCertificateName == null) { - return Mono.error( - new IllegalArgumentException("Parameter managedCertificateName 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, managedCertificateName, this.client.getApiVersion(), accept, context); - } - - /** - * Deletes the specified Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @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 environmentName, String managedCertificateName) { - return deleteWithResponseAsync(resourceGroupName, environmentName, managedCertificateName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Deletes the specified Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String environmentName, - String managedCertificateName, Context context) { - return deleteWithResponseAsync(resourceGroupName, environmentName, managedCertificateName, context).block(); - } - - /** - * Deletes the specified Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @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 environmentName, String managedCertificateName) { - deleteWithResponse(resourceGroupName, environmentName, managedCertificateName, Context.NONE); - } - - /** - * Update tags of a managed certificate - * - * Patches a managed certificate. Oly patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @param managedCertificateEnvelope Properties of a managed certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment along - * with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String environmentName, String managedCertificateName, ManagedCertificatePatch managedCertificateEnvelope) { - 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 (managedCertificateName == null) { - return Mono.error( - new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); - } - if (managedCertificateEnvelope == null) { - return Mono.error( - new IllegalArgumentException("Parameter managedCertificateEnvelope is required and cannot be null.")); - } else { - managedCertificateEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, managedCertificateName, this.client.getApiVersion(), - managedCertificateEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update tags of a managed certificate - * - * Patches a managed certificate. Oly patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @param managedCertificateEnvelope Properties of a managed certificate that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment along - * with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync(String resourceGroupName, - String environmentName, String managedCertificateName, ManagedCertificatePatch managedCertificateEnvelope, - 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 (managedCertificateName == null) { - return Mono.error( - new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); - } - if (managedCertificateEnvelope == null) { - return Mono.error( - new IllegalArgumentException("Parameter managedCertificateEnvelope is required and cannot be null.")); - } else { - managedCertificateEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, managedCertificateName, this.client.getApiVersion(), managedCertificateEnvelope, accept, - context); - } - - /** - * Update tags of a managed certificate - * - * Patches a managed certificate. Oly patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @param managedCertificateEnvelope Properties of a managed certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String environmentName, - String managedCertificateName, ManagedCertificatePatch managedCertificateEnvelope) { - return updateWithResponseAsync(resourceGroupName, environmentName, managedCertificateName, - managedCertificateEnvelope).flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Update tags of a managed certificate - * - * Patches a managed certificate. Oly patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @param managedCertificateEnvelope Properties of a managed certificate that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment along - * with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse(String resourceGroupName, String environmentName, - String managedCertificateName, ManagedCertificatePatch managedCertificateEnvelope, Context context) { - return updateWithResponseAsync(resourceGroupName, environmentName, managedCertificateName, - managedCertificateEnvelope, context).block(); - } - - /** - * Update tags of a managed certificate - * - * Patches a managed certificate. Oly patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @param managedCertificateEnvelope Properties of a managed certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedCertificateInner update(String resourceGroupName, String environmentName, - String managedCertificateName, ManagedCertificatePatch managedCertificateEnvelope) { - return updateWithResponse(resourceGroupName, environmentName, managedCertificateName, - managedCertificateEnvelope, Context.NONE).getValue(); - } - - /** - * Get the Managed Certificates in 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 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 Managed Certificates in a given managed environment along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the Managed Certificates in 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 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 Managed Certificates in a given managed environment along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, - String environmentName, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, environmentName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get the Managed Certificates in 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 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 Managed Certificates in a given managed environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Get the Managed Certificates in 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 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 Managed Certificates in a given managed environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName, - Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Get the Managed Certificates in 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 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 Managed Certificates in a given managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); - } - - /** - * Get the Managed Certificates in 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 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 Managed Certificates in a given managed environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName, - Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @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 collection of Managed Certificates along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of Managed Certificates 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/ManagedCertificatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesImpl.java deleted file mode 100644 index 3f5344d87c4d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesImpl.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (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.ManagedCertificatesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedCertificateInner; -import com.azure.resourcemanager.appcontainers.models.ManagedCertificate; -import com.azure.resourcemanager.appcontainers.models.ManagedCertificates; - -public final class ManagedCertificatesImpl implements ManagedCertificates { - private static final ClientLogger LOGGER = new ClientLogger(ManagedCertificatesImpl.class); - - private final ManagedCertificatesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ManagedCertificatesImpl(ManagedCertificatesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getWithResponse(String resourceGroupName, String environmentName, - String managedCertificateName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, environmentName, managedCertificateName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ManagedCertificateImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ManagedCertificate get(String resourceGroupName, String environmentName, String managedCertificateName) { - ManagedCertificateInner inner - = this.serviceClient().get(resourceGroupName, environmentName, managedCertificateName); - if (inner != null) { - return new ManagedCertificateImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String environmentName, - String managedCertificateName, Context context) { - return this.serviceClient() - .deleteWithResponse(resourceGroupName, environmentName, managedCertificateName, context); - } - - public void delete(String resourceGroupName, String environmentName, String managedCertificateName) { - this.serviceClient().delete(resourceGroupName, environmentName, managedCertificateName); - } - - public PagedIterable list(String resourceGroupName, String environmentName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedCertificateImpl(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 ManagedCertificateImpl(inner1, this.manager())); - } - - public ManagedCertificate 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 managedCertificateName = ResourceManagerUtils.getValueFromIdByName(id, "managedCertificates"); - if (managedCertificateName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedCertificates'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, managedCertificateName, 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 managedCertificateName = ResourceManagerUtils.getValueFromIdByName(id, "managedCertificates"); - if (managedCertificateName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedCertificates'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, managedCertificateName, 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 managedCertificateName = ResourceManagerUtils.getValueFromIdByName(id, "managedCertificates"); - if (managedCertificateName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedCertificates'.", id))); - } - this.deleteWithResponse(resourceGroupName, environmentName, managedCertificateName, Context.NONE); - } - - public Response 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 managedCertificateName = ResourceManagerUtils.getValueFromIdByName(id, "managedCertificates"); - if (managedCertificateName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'managedCertificates'.", id))); - } - return this.deleteWithResponse(resourceGroupName, environmentName, managedCertificateName, context); - } - - private ManagedCertificatesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public ManagedCertificateImpl define(String name) { - return new ManagedCertificateImpl(name, this.manager()); - } -} 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 deleted file mode 100644 index 5205db636ec4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java +++ /dev/null @@ -1,360 +0,0 @@ -// Copyright (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.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.ManagedEnvironmentDiagnosticsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -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 ManagedEnvironmentDiagnosticsClient. - */ -public final class ManagedEnvironmentDiagnosticsClientImpl implements ManagedEnvironmentDiagnosticsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ManagedEnvironmentDiagnosticsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ManagedEnvironmentDiagnosticsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedEnvironmentDiagnosticsClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(ManagedEnvironmentDiagnosticsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientManagedEnvironmentDiagnostics to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ManagedEnvironmentDiagnosticsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectors") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listDetectors(@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}/detectors/{detectorName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getDetector(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("detectorName") String detectorName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get the list of diagnostics for a given Managed Environment. - * - * Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps along with {@link Response} - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsWithResponseAsync(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.listDetectors(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the list of diagnostics for a given Managed Environment. - * - * Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps along with {@link Response} - * on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsWithResponseAsync(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.listDetectors(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, this.client.getApiVersion(), accept, context); - } - - /** - * Get the list of diagnostics for a given Managed Environment. - * - * Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listDetectorsAsync(String resourceGroupName, String environmentName) { - return listDetectorsWithResponseAsync(resourceGroupName, environmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the list of diagnostics for a given Managed Environment. - * - * Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps along with - * {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listDetectorsWithResponse(String resourceGroupName, - String environmentName, Context context) { - return listDetectorsWithResponseAsync(resourceGroupName, environmentName, context).block(); - } - - /** - * Get the list of diagnostics for a given Managed Environment. - * - * Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiagnosticsCollectionInner listDetectors(String resourceGroupName, String environmentName) { - return listDetectorsWithResponse(resourceGroupName, environmentName, Context.NONE).getValue(); - } - - /** - * Get the diagnostics data for a given Managed Environment. - * - * Get the diagnostics data for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param detectorName Name of the Managed Environment detector. - * @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 diagnostics data for a Managed Environment used to host container apps along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDetectorWithResponseAsync(String resourceGroupName, - String environmentName, String detectorName) { - 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 (detectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter detectorName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getDetector(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, detectorName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the diagnostics data for a given Managed Environment. - * - * Get the diagnostics data for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param detectorName Name of the Managed Environment detector. - * @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 diagnostics data for a Managed Environment used to host container apps along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDetectorWithResponseAsync(String resourceGroupName, - String environmentName, String detectorName, 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 (detectorName == null) { - return Mono.error(new IllegalArgumentException("Parameter detectorName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getDetector(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, detectorName, this.client.getApiVersion(), accept, context); - } - - /** - * Get the diagnostics data for a given Managed Environment. - * - * Get the diagnostics data for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param detectorName Name of the Managed Environment detector. - * @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 diagnostics data for a Managed Environment used to host container apps on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDetectorAsync(String resourceGroupName, String environmentName, - String detectorName) { - return getDetectorWithResponseAsync(resourceGroupName, environmentName, detectorName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the diagnostics data for a given Managed Environment. - * - * Get the diagnostics data for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param detectorName Name of the Managed Environment detector. - * @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 diagnostics data for a Managed Environment used to host container apps along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDetectorWithResponse(String resourceGroupName, String environmentName, - String detectorName, Context context) { - return getDetectorWithResponseAsync(resourceGroupName, environmentName, detectorName, context).block(); - } - - /** - * Get the diagnostics data for a given Managed Environment. - * - * Get the diagnostics data for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param detectorName Name of the Managed Environment detector. - * @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 diagnostics data for a Managed Environment used to host container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public DiagnosticsInner getDetector(String resourceGroupName, String environmentName, String detectorName) { - return getDetectorWithResponse(resourceGroupName, environmentName, detectorName, Context.NONE).getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsImpl.java deleted file mode 100644 index 0a191bfe668a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (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.ManagedEnvironmentDiagnosticsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsCollection; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentDiagnostics; - -public final class ManagedEnvironmentDiagnosticsImpl implements ManagedEnvironmentDiagnostics { - private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentDiagnosticsImpl.class); - - private final ManagedEnvironmentDiagnosticsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ManagedEnvironmentDiagnosticsImpl(ManagedEnvironmentDiagnosticsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response listDetectorsWithResponse(String resourceGroupName, String environmentName, - Context context) { - Response inner - = this.serviceClient().listDetectorsWithResponse(resourceGroupName, environmentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DiagnosticsCollectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DiagnosticsCollection listDetectors(String resourceGroupName, String environmentName) { - DiagnosticsCollectionInner inner = this.serviceClient().listDetectors(resourceGroupName, environmentName); - if (inner != null) { - return new DiagnosticsCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getDetectorWithResponse(String resourceGroupName, String environmentName, - String detectorName, Context context) { - Response inner - = this.serviceClient().getDetectorWithResponse(resourceGroupName, environmentName, detectorName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new DiagnosticsImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Diagnostics getDetector(String resourceGroupName, String environmentName, String detectorName) { - DiagnosticsInner inner = this.serviceClient().getDetector(resourceGroupName, environmentName, detectorName); - if (inner != null) { - return new DiagnosticsImpl(inner, this.manager()); - } else { - return null; - } - } - - private ManagedEnvironmentDiagnosticsClient 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/ManagedEnvironmentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java deleted file mode 100644 index ac1df30cdd61..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java +++ /dev/null @@ -1,376 +0,0 @@ -// Copyright (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.management.Region; -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; -import com.azure.resourcemanager.appcontainers.models.DaprConfiguration; -import com.azure.resourcemanager.appcontainers.models.EnvironmentAuthToken; -import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; -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.PublicNetworkAccess; -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 { - private ManagedEnvironmentInner 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 String kind() { - return this.innerModel().kind(); - } - - public ManagedServiceIdentity identity() { - return this.innerModel().identity(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public EnvironmentProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public String daprAIInstrumentationKey() { - return this.innerModel().daprAIInstrumentationKey(); - } - - public String daprAIConnectionString() { - return this.innerModel().daprAIConnectionString(); - } - - public VnetConfiguration vnetConfiguration() { - return this.innerModel().vnetConfiguration(); - } - - public String deploymentErrors() { - return this.innerModel().deploymentErrors(); - } - - public String defaultDomain() { - return this.innerModel().defaultDomain(); - } - - public String staticIp() { - return this.innerModel().staticIp(); - } - - public AppLogsConfiguration appLogsConfiguration() { - return this.innerModel().appLogsConfiguration(); - } - - public AppInsightsConfiguration appInsightsConfiguration() { - return this.innerModel().appInsightsConfiguration(); - } - - public OpenTelemetryConfiguration openTelemetryConfiguration() { - return this.innerModel().openTelemetryConfiguration(); - } - - public Boolean zoneRedundant() { - return this.innerModel().zoneRedundant(); - } - - public CustomDomainConfiguration customDomainConfiguration() { - return this.innerModel().customDomainConfiguration(); - } - - public String eventStreamEndpoint() { - return this.innerModel().eventStreamEndpoint(); - } - - public List workloadProfiles() { - List inner = this.innerModel().workloadProfiles(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public KedaConfiguration kedaConfiguration() { - return this.innerModel().kedaConfiguration(); - } - - public DaprConfiguration daprConfiguration() { - return this.innerModel().daprConfiguration(); - } - - public String infrastructureResourceGroup() { - return this.innerModel().infrastructureResourceGroup(); - } - - 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 PublicNetworkAccess publicNetworkAccess() { - return this.innerModel().publicNetworkAccess(); - } - - public Region region() { - return Region.fromName(this.regionName()); - } - - public String regionName() { - return this.location(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ManagedEnvironmentInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String environmentName; - - public ManagedEnvironmentImpl withExistingResourceGroup(String resourceGroupName) { - this.resourceGroupName = resourceGroupName; - return this; - } - - public ManagedEnvironment create() { - 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); - return this; - } - - ManagedEnvironmentImpl(String name, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new ManagedEnvironmentInner(); - this.serviceManager = serviceManager; - this.environmentName = name; - } - - public ManagedEnvironmentImpl update() { - return this; - } - - public ManagedEnvironment apply() { - 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); - return this; - } - - ManagedEnvironmentImpl(ManagedEnvironmentInner 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"); - } - - public ManagedEnvironment refresh() { - 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(); - return this; - } - - public Response getAuthTokenWithResponse(Context context) { - return serviceManager.managedEnvironments() - .getAuthTokenWithResponse(resourceGroupName, environmentName, context); - } - - public EnvironmentAuthToken getAuthToken() { - return serviceManager.managedEnvironments().getAuthToken(resourceGroupName, environmentName); - } - - public ManagedEnvironmentImpl withRegion(Region location) { - this.innerModel().withLocation(location.toString()); - return this; - } - - public ManagedEnvironmentImpl withRegion(String location) { - this.innerModel().withLocation(location); - return this; - } - - public ManagedEnvironmentImpl withTags(Map tags) { - this.innerModel().withTags(tags); - return this; - } - - public ManagedEnvironmentImpl withKind(String kind) { - this.innerModel().withKind(kind); - return this; - } - - public ManagedEnvironmentImpl withIdentity(ManagedServiceIdentity identity) { - this.innerModel().withIdentity(identity); - return this; - } - - public ManagedEnvironmentImpl withDaprAIInstrumentationKey(String daprAIInstrumentationKey) { - this.innerModel().withDaprAIInstrumentationKey(daprAIInstrumentationKey); - return this; - } - - public ManagedEnvironmentImpl withDaprAIConnectionString(String daprAIConnectionString) { - this.innerModel().withDaprAIConnectionString(daprAIConnectionString); - return this; - } - - public ManagedEnvironmentImpl withVnetConfiguration(VnetConfiguration vnetConfiguration) { - this.innerModel().withVnetConfiguration(vnetConfiguration); - return this; - } - - public ManagedEnvironmentImpl withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration) { - this.innerModel().withAppLogsConfiguration(appLogsConfiguration); - return this; - } - - public ManagedEnvironmentImpl withAppInsightsConfiguration(AppInsightsConfiguration appInsightsConfiguration) { - this.innerModel().withAppInsightsConfiguration(appInsightsConfiguration); - return this; - } - - public ManagedEnvironmentImpl - withOpenTelemetryConfiguration(OpenTelemetryConfiguration openTelemetryConfiguration) { - this.innerModel().withOpenTelemetryConfiguration(openTelemetryConfiguration); - return this; - } - - public ManagedEnvironmentImpl withZoneRedundant(Boolean zoneRedundant) { - this.innerModel().withZoneRedundant(zoneRedundant); - return this; - } - - public ManagedEnvironmentImpl withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration) { - this.innerModel().withCustomDomainConfiguration(customDomainConfiguration); - return this; - } - - public ManagedEnvironmentImpl withWorkloadProfiles(List workloadProfiles) { - this.innerModel().withWorkloadProfiles(workloadProfiles); - return this; - } - - public ManagedEnvironmentImpl withKedaConfiguration(KedaConfiguration kedaConfiguration) { - this.innerModel().withKedaConfiguration(kedaConfiguration); - return this; - } - - public ManagedEnvironmentImpl withDaprConfiguration(DaprConfiguration daprConfiguration) { - this.innerModel().withDaprConfiguration(daprConfiguration); - return this; - } - - public ManagedEnvironmentImpl withInfrastructureResourceGroup(String infrastructureResourceGroup) { - this.innerModel().withInfrastructureResourceGroup(infrastructureResourceGroup); - return this; - } - - public ManagedEnvironmentImpl - withPeerAuthentication(ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication) { - this.innerModel().withPeerAuthentication(peerAuthentication); - return this; - } - - public ManagedEnvironmentImpl - withPeerTrafficConfiguration(ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration) { - this.innerModel().withPeerTrafficConfiguration(peerTrafficConfiguration); - return this; - } - - public ManagedEnvironmentImpl withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) { - this.innerModel().withPublicNetworkAccess(publicNetworkAccess); - 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 deleted file mode 100644 index fda1c378f6b1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateEndpointConnectionsClientImpl.java +++ /dev/null @@ -1,1000 +0,0 @@ -// Copyright (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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 deleted file mode 100644 index 225993918b6c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateEndpointConnectionsImpl.java +++ /dev/null @@ -1,169 +0,0 @@ -// Copyright (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 deleted file mode 100644 index 0c3f4e3e83b2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateLinkResourcesClientImpl.java +++ /dev/null @@ -1,283 +0,0 @@ -// Copyright (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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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 deleted file mode 100644 index 34a753a0e7d7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentPrivateLinkResourcesImpl.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.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 deleted file mode 100644 index 79142fceb10b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStorageImpl.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (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.ManagedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorage; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorageProperties; - -public final class ManagedEnvironmentStorageImpl - implements ManagedEnvironmentStorage, ManagedEnvironmentStorage.Definition, ManagedEnvironmentStorage.Update { - private ManagedEnvironmentStorageInner 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 ManagedEnvironmentStorageProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public ManagedEnvironmentStorageInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String environmentName; - - private String storageName; - - public ManagedEnvironmentStorageImpl withExistingManagedEnvironment(String resourceGroupName, - String environmentName) { - this.resourceGroupName = resourceGroupName; - this.environmentName = environmentName; - return this; - } - - public ManagedEnvironmentStorage create() { - 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() - .createOrUpdateWithResponse(resourceGroupName, environmentName, storageName, this.innerModel(), context) - .getValue(); - return this; - } - - ManagedEnvironmentStorageImpl(String name, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new ManagedEnvironmentStorageInner(); - this.serviceManager = serviceManager; - this.storageName = name; - } - - public ManagedEnvironmentStorageImpl update() { - return this; - } - - public ManagedEnvironmentStorage apply() { - 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() - .createOrUpdateWithResponse(resourceGroupName, environmentName, storageName, this.innerModel(), context) - .getValue(); - return this; - } - - ManagedEnvironmentStorageImpl(ManagedEnvironmentStorageInner 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.storageName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "storages"); - } - - public ManagedEnvironmentStorage refresh() { - 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(); - return this; - } - - public ManagedEnvironmentStorageImpl withProperties(ManagedEnvironmentStorageProperties properties) { - this.innerModel().withProperties(properties); - 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 deleted file mode 100644 index b277fae73421..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStoragesCollectionImpl.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.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorage; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStoragesCollection; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class ManagedEnvironmentStoragesCollectionImpl implements ManagedEnvironmentStoragesCollection { - private ManagedEnvironmentStoragesCollectionInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - ManagedEnvironmentStoragesCollectionImpl(ManagedEnvironmentStoragesCollectionInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner.stream() - .map(inner1 -> new ManagedEnvironmentStorageImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public ManagedEnvironmentStoragesCollectionInner 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/ManagedEnvironmentUsagesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesClientImpl.java deleted file mode 100644 index 5e1d74286442..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesClientImpl.java +++ /dev/null @@ -1,279 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentUsagesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import com.azure.resourcemanager.appcontainers.models.ListUsagesResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in ManagedEnvironmentUsagesClient. - */ -public final class ManagedEnvironmentUsagesClientImpl implements ManagedEnvironmentUsagesClient { - /** - * The proxy service used to perform REST calls. - */ - private final ManagedEnvironmentUsagesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ManagedEnvironmentUsagesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedEnvironmentUsagesClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(ManagedEnvironmentUsagesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientManagedEnvironmentUsages to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ManagedEnvironmentUsagesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/usages") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets the current usage information as well as the limits for environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as the limits for environment along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String environmentName) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets the current usage information as well as the limits for environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as the limits for environment along with {@link PagedResponse} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String resourceGroupName, String environmentName, - Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - if (resourceGroupName == null) { - return Mono - .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - } - if (environmentName == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, environmentName, - this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets the current usage information as well as the limits for environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as the limits for environment as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName), - nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets the current usage information as well as the limits for environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as the limits for environment as paginated response with - * {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String resourceGroupName, String environmentName, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets the current usage information as well as the limits for environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as the limits for environment as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); - } - - /** - * Gets the current usage information as well as the limits for environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as the limits for environment as paginated response with - * {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String resourceGroupName, String environmentName, Context context) { - return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesImpl.java deleted file mode 100644 index d50d07f8e2b2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesImpl.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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentUsagesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentUsages; -import com.azure.resourcemanager.appcontainers.models.Usage; - -public final class ManagedEnvironmentUsagesImpl implements ManagedEnvironmentUsages { - private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentUsagesImpl.class); - - private final ManagedEnvironmentUsagesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ManagedEnvironmentUsagesImpl(ManagedEnvironmentUsagesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String resourceGroupName, String environmentName) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); - } - - public PagedIterable list(String resourceGroupName, String environmentName, Context context) { - PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); - } - - private ManagedEnvironmentUsagesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsClientImpl.java deleted file mode 100644 index 39ba476664d5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsClientImpl.java +++ /dev/null @@ -1,1776 +0,0 @@ -// Copyright (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.Post; -import com.azure.core.annotation.Put; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.management.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.ManagedEnvironmentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.EnvironmentAuthTokenInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsCollection; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesCollection; -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 ManagedEnvironmentsClient. - */ -public final class ManagedEnvironmentsClientImpl implements ManagedEnvironmentsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ManagedEnvironmentsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ManagedEnvironmentsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedEnvironmentsClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(ManagedEnvironmentsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientManagedEnvironments to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ManagedEnvironmentsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/managedEnvironments") - @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/managedEnvironments") - @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/managedEnvironments/{environmentName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getByResourceGroup(@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" }) - @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}") - @ExpectedResponses({ 200, 201 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ManagedEnvironmentInner environmentEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}") - @ExpectedResponses({ 200, 202, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> delete(@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" }) - @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}") - @ExpectedResponses({ 200, 202 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> update(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ManagedEnvironmentInner environmentEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/getAuthtoken") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getAuthToken(@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}/workloadProfileStates") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listWorkloadProfileStates(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, - @PathParam("environmentName") String environmentName, @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); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listWorkloadProfileStatesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get all Environments for a subscription. - * - * Get all Managed Environments for a 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 all Managed Environments for a 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 all Environments for a subscription. - * - * Get all Managed Environments for a 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 all Managed Environments for a 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 all Environments for a subscription. - * - * Get all Managed Environments for a 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 all Managed Environments for a subscription as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), - nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); - } - - /** - * Get all Environments for a subscription. - * - * Get all Managed Environments for a 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 all Managed Environments for a 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 all Environments for a subscription. - * - * Get all Managed Environments for a 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 all Managed Environments for a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Get all Environments for a subscription. - * - * Get all Managed Environments for a 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 all Managed Environments for a subscription as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get all the Environments in a resource group. - * - * Get all the Managed Environments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Managed Environments in a resource group 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 all the Environments in a resource group. - * - * Get all the Managed Environments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Managed Environments in a resource group 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 all the Environments in a resource group. - * - * Get all the Managed Environments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Managed Environments in a resource group as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), - nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); - } - - /** - * Get all the Environments in a resource group. - * - * Get all the Managed Environments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Managed Environments in a resource group 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 all the Environments in a resource group. - * - * Get all the Managed Environments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Managed Environments in a resource group as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByResourceGroup(String resourceGroupName) { - return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); - } - - /** - * Get all the Environments in a resource group. - * - * Get all the Managed Environments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Managed Environments in a resource group 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 Managed Environment. - * - * Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(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.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the properties of a Managed Environment. - * - * Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync(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.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, this.client.getApiVersion(), accept, context); - } - - /** - * Get the properties of a Managed Environment. - * - * Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync(String resourceGroupName, String environmentName) { - return getByResourceGroupWithResponseAsync(resourceGroupName, environmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the properties of a Managed Environment. - * - * Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse(String resourceGroupName, - String environmentName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, environmentName, context).block(); - } - - /** - * Get the properties of a Managed Environment. - * - * Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentInner getByResourceGroup(String resourceGroupName, String environmentName) { - return getByResourceGroupWithResponse(resourceGroupName, environmentName, Context.NONE).getValue(); - } - - /** - * Creates or updates a Managed Environment. - * - * Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, ManagedEnvironmentInner environmentEnvelope) { - 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 (environmentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentEnvelope is required and cannot be null.")); - } else { - environmentEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, this.client.getApiVersion(), environmentEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Creates or updates a Managed Environment. - * - * Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, ManagedEnvironmentInner environmentEnvelope, 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 (environmentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentEnvelope is required and cannot be null.")); - } else { - environmentEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, this.client.getApiVersion(), environmentEnvelope, accept, context); - } - - /** - * Creates or updates a Managed Environment. - * - * Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedEnvironmentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, environmentEnvelope); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedEnvironmentInner.class, ManagedEnvironmentInner.class, - this.client.getContext()); - } - - /** - * Creates or updates a Managed Environment. - * - * Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedEnvironmentInner> beginCreateOrUpdateAsync( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, environmentEnvelope, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedEnvironmentInner.class, ManagedEnvironmentInner.class, context); - } - - /** - * Creates or updates a Managed Environment. - * - * Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedEnvironmentInner> beginCreateOrUpdate( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - return this.beginCreateOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope).getSyncPoller(); - } - - /** - * Creates or updates a Managed Environment. - * - * Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedEnvironmentInner> beginCreateOrUpdate( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, - Context context) { - return this.beginCreateOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context) - .getSyncPoller(); - } - - /** - * Creates or updates a Managed Environment. - * - * Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, - ManagedEnvironmentInner environmentEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a Managed Environment. - * - * Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, - ManagedEnvironmentInner environmentEnvelope, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Creates or updates a Managed Environment. - * - * Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentInner createOrUpdate(String resourceGroupName, String environmentName, - ManagedEnvironmentInner environmentEnvelope) { - return createOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope).block(); - } - - /** - * Creates or updates a Managed Environment. - * - * Creates or updates a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentInner createOrUpdate(String resourceGroupName, String environmentName, - ManagedEnvironmentInner environmentEnvelope, Context context) { - return createOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context).block(); - } - - /** - * Delete a Managed Environment. - * - * Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete a Managed Environment. - * - * Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync(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.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete a Managed Environment. - * - * Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String environmentName) { - Mono>> mono = deleteWithResponseAsync(resourceGroupName, environmentName); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - this.client.getContext()); - } - - /** - * Delete a Managed Environment. - * - * Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String environmentName, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono = deleteWithResponseAsync(resourceGroupName, environmentName, context); - return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, - context); - } - - /** - * Delete a Managed Environment. - * - * Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName) { - return this.beginDeleteAsync(resourceGroupName, environmentName).getSyncPoller(); - } - - /** - * Delete a Managed Environment. - * - * Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName, - Context context) { - return this.beginDeleteAsync(resourceGroupName, environmentName, context).getSyncPoller(); - } - - /** - * Delete a Managed Environment. - * - * Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String environmentName) { - return beginDeleteAsync(resourceGroupName, environmentName).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Managed Environment. - * - * Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync(String resourceGroupName, String environmentName, Context context) { - return beginDeleteAsync(resourceGroupName, environmentName, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Delete a Managed Environment. - * - * Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String environmentName) { - deleteAsync(resourceGroupName, environmentName).block(); - } - - /** - * Delete a Managed Environment. - * - * Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String environmentName, Context context) { - deleteAsync(resourceGroupName, environmentName, context).block(); - } - - /** - * Update Managed Environment's properties. - * - * Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String environmentName, - ManagedEnvironmentInner environmentEnvelope) { - 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 (environmentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentEnvelope is required and cannot be null.")); - } else { - environmentEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, this.client.getApiVersion(), environmentEnvelope, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Update Managed Environment's properties. - * - * Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync(String resourceGroupName, String environmentName, - ManagedEnvironmentInner environmentEnvelope, 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 (environmentEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter environmentEnvelope is required and cannot be null.")); - } else { - environmentEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, this.client.getApiVersion(), environmentEnvelope, accept, context); - } - - /** - * Update Managed Environment's properties. - * - * Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedEnvironmentInner> beginUpdateAsync( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - Mono>> mono - = updateWithResponseAsync(resourceGroupName, environmentName, environmentEnvelope); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedEnvironmentInner.class, ManagedEnvironmentInner.class, - this.client.getContext()); - } - - /** - * Update Managed Environment's properties. - * - * Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedEnvironmentInner> beginUpdateAsync( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, - Context context) { - context = this.client.mergeContext(context); - Mono>> mono - = updateWithResponseAsync(resourceGroupName, environmentName, environmentEnvelope, context); - return this.client.getLroResult(mono, - this.client.getHttpPipeline(), ManagedEnvironmentInner.class, ManagedEnvironmentInner.class, context); - } - - /** - * Update Managed Environment's properties. - * - * Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedEnvironmentInner> - beginUpdate(String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - return this.beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope).getSyncPoller(); - } - - /** - * Update Managed Environment's properties. - * - * Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedEnvironmentInner> beginUpdate( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, - Context context) { - return this.beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context).getSyncPoller(); - } - - /** - * Update Managed Environment's properties. - * - * Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String environmentName, - ManagedEnvironmentInner environmentEnvelope) { - return beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update Managed Environment's properties. - * - * Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync(String resourceGroupName, String environmentName, - ManagedEnvironmentInner environmentEnvelope, Context context) { - return beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context).last() - .flatMap(this.client::getLroFinalResultOrError); - } - - /** - * Update Managed Environment's properties. - * - * Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentInner update(String resourceGroupName, String environmentName, - ManagedEnvironmentInner environmentEnvelope) { - return updateAsync(resourceGroupName, environmentName, environmentEnvelope).block(); - } - - /** - * Update Managed Environment's properties. - * - * Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an environment for hosting container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentInner update(String resourceGroupName, String environmentName, - ManagedEnvironmentInner environmentEnvelope, Context context) { - return updateAsync(resourceGroupName, environmentName, environmentEnvelope, context).block(); - } - - /** - * Get auth token for a managed environment - * - * Checks if resource name is available. - * - * @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 DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment Auth Token along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAuthTokenWithResponseAsync(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.getAuthToken(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get auth token for a managed environment - * - * Checks if resource name is available. - * - * @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 DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment Auth Token along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAuthTokenWithResponseAsync(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.getAuthToken(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, this.client.getApiVersion(), accept, context); - } - - /** - * Get auth token for a managed environment - * - * Checks if resource name is available. - * - * @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 DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment Auth Token on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAuthTokenAsync(String resourceGroupName, String environmentName) { - return getAuthTokenWithResponseAsync(resourceGroupName, environmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get auth token for a managed environment - * - * Checks if resource name is available. - * - * @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 DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment Auth Token along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAuthTokenWithResponse(String resourceGroupName, - String environmentName, Context context) { - return getAuthTokenWithResponseAsync(resourceGroupName, environmentName, context).block(); - } - - /** - * Get auth token for a managed environment - * - * Checks if resource name is available. - * - * @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 DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return environment Auth Token. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public EnvironmentAuthTokenInner getAuthToken(String resourceGroupName, String environmentName) { - return getAuthTokenWithResponse(resourceGroupName, environmentName, Context.NONE).getValue(); - } - - /** - * Get all workload Profile States for a Managed Environment.. - * - * Get all workload Profile States for a 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 DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all workload Profile States for a Managed Environment along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listWorkloadProfileStatesSinglePageAsync(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.listWorkloadProfileStates(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, this.client.getApiVersion(), environmentName, 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 all workload Profile States for a Managed Environment.. - * - * Get all workload Profile States for a 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 DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all workload Profile States for a Managed Environment along with {@link PagedResponse} on successful - * completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listWorkloadProfileStatesSinglePageAsync(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 - .listWorkloadProfileStates(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - this.client.getApiVersion(), environmentName, accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Get all workload Profile States for a Managed Environment.. - * - * Get all workload Profile States for a 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 DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all workload Profile States for a Managed Environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listWorkloadProfileStatesAsync(String resourceGroupName, - String environmentName) { - return new PagedFlux<>(() -> listWorkloadProfileStatesSinglePageAsync(resourceGroupName, environmentName), - nextLink -> listWorkloadProfileStatesNextSinglePageAsync(nextLink)); - } - - /** - * Get all workload Profile States for a Managed Environment.. - * - * Get all workload Profile States for a 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 DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all workload Profile States for a Managed Environment as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listWorkloadProfileStatesAsync(String resourceGroupName, - String environmentName, Context context) { - return new PagedFlux<>( - () -> listWorkloadProfileStatesSinglePageAsync(resourceGroupName, environmentName, context), - nextLink -> listWorkloadProfileStatesNextSinglePageAsync(nextLink, context)); - } - - /** - * Get all workload Profile States for a Managed Environment.. - * - * Get all workload Profile States for a 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 DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all workload Profile States for a Managed Environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listWorkloadProfileStates(String resourceGroupName, - String environmentName) { - return new PagedIterable<>(listWorkloadProfileStatesAsync(resourceGroupName, environmentName)); - } - - /** - * Get all workload Profile States for a Managed Environment.. - * - * Get all workload Profile States for a 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 DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all workload Profile States for a Managed Environment as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listWorkloadProfileStates(String resourceGroupName, - String environmentName, Context context) { - return new PagedIterable<>(listWorkloadProfileStatesAsync(resourceGroupName, environmentName, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of Environments 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. - * @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 collection of Environments 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. - * @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 collection of Environments 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. - * @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 collection of Environments 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)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of workloadProfileStates along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listWorkloadProfileStatesNextSinglePageAsync(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.listWorkloadProfileStatesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of workloadProfileStates along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> - listWorkloadProfileStatesNextSinglePageAsync(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.listWorkloadProfileStatesNext(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/ManagedEnvironmentsDiagnosticsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsClientImpl.java deleted file mode 100644 index deb3dae4382c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsClientImpl.java +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright (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.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.ManagedEnvironmentsDiagnosticsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; -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 ManagedEnvironmentsDiagnosticsClient. - */ -public final class ManagedEnvironmentsDiagnosticsClientImpl implements ManagedEnvironmentsDiagnosticsClient { - /** - * The proxy service used to perform REST calls. - */ - private final ManagedEnvironmentsDiagnosticsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ManagedEnvironmentsDiagnosticsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedEnvironmentsDiagnosticsClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(ManagedEnvironmentsDiagnosticsService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientManagedEnvironmentsDiagnostics to be used by - * the proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ManagedEnvironmentsDiagnosticsService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectorProperties/rootApi/") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getRoot(@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); - } - - /** - * Get the properties of a Managed Environment. - * - * Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRootWithResponseAsync(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.getRoot(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the properties of a Managed Environment. - * - * Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRootWithResponseAsync(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.getRoot(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, this.client.getApiVersion(), accept, context); - } - - /** - * Get the properties of a Managed Environment. - * - * Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getRootAsync(String resourceGroupName, String environmentName) { - return getRootWithResponseAsync(resourceGroupName, environmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the properties of a Managed Environment. - * - * Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRootWithResponse(String resourceGroupName, String environmentName, - Context context) { - return getRootWithResponseAsync(resourceGroupName, environmentName, context).block(); - } - - /** - * Get the properties of a Managed Environment. - * - * Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentInner getRoot(String resourceGroupName, String environmentName) { - return getRootWithResponse(resourceGroupName, environmentName, Context.NONE).getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsImpl.java deleted file mode 100644 index 544062c66a9d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsImpl.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.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.ManagedEnvironmentsDiagnosticsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsDiagnostics; - -public final class ManagedEnvironmentsDiagnosticsImpl implements ManagedEnvironmentsDiagnostics { - private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentsDiagnosticsImpl.class); - - private final ManagedEnvironmentsDiagnosticsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ManagedEnvironmentsDiagnosticsImpl(ManagedEnvironmentsDiagnosticsClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response getRootWithResponse(String resourceGroupName, String environmentName, - Context context) { - Response inner - = this.serviceClient().getRootWithResponse(resourceGroupName, environmentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ManagedEnvironmentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ManagedEnvironment getRoot(String resourceGroupName, String environmentName) { - ManagedEnvironmentInner inner = this.serviceClient().getRoot(resourceGroupName, environmentName); - if (inner != null) { - return new ManagedEnvironmentImpl(inner, this.manager()); - } else { - return null; - } - } - - private ManagedEnvironmentsDiagnosticsClient 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/ManagedEnvironmentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsImpl.java deleted file mode 100644 index c140973da287..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsImpl.java +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (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.ManagedEnvironmentsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.EnvironmentAuthTokenInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; -import com.azure.resourcemanager.appcontainers.models.EnvironmentAuthToken; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironments; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStates; - -public final class ManagedEnvironmentsImpl implements ManagedEnvironments { - private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentsImpl.class); - - private final ManagedEnvironmentsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ManagedEnvironmentsImpl(ManagedEnvironmentsClient 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 ManagedEnvironmentImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedEnvironmentImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName) { - PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedEnvironmentImpl(inner1, this.manager())); - } - - public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner - = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedEnvironmentImpl(inner1, this.manager())); - } - - public Response getByResourceGroupWithResponse(String resourceGroupName, String environmentName, - Context context) { - Response inner - = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, environmentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ManagedEnvironmentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ManagedEnvironment getByResourceGroup(String resourceGroupName, String environmentName) { - ManagedEnvironmentInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, environmentName); - if (inner != null) { - return new ManagedEnvironmentImpl(inner, this.manager()); - } else { - return null; - } - } - - public void deleteByResourceGroup(String resourceGroupName, String environmentName) { - this.serviceClient().delete(resourceGroupName, environmentName); - } - - public void delete(String resourceGroupName, String environmentName, Context context) { - this.serviceClient().delete(resourceGroupName, environmentName, context); - } - - public Response getAuthTokenWithResponse(String resourceGroupName, String environmentName, - Context context) { - Response inner - = this.serviceClient().getAuthTokenWithResponse(resourceGroupName, environmentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new EnvironmentAuthTokenImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public EnvironmentAuthToken getAuthToken(String resourceGroupName, String environmentName) { - EnvironmentAuthTokenInner inner = this.serviceClient().getAuthToken(resourceGroupName, environmentName); - if (inner != null) { - return new EnvironmentAuthTokenImpl(inner, this.manager()); - } else { - return null; - } - } - - public PagedIterable listWorkloadProfileStates(String resourceGroupName, - String environmentName) { - PagedIterable inner - = this.serviceClient().listWorkloadProfileStates(resourceGroupName, environmentName); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadProfileStatesImpl(inner1, this.manager())); - } - - public PagedIterable listWorkloadProfileStates(String resourceGroupName, - String environmentName, Context context) { - PagedIterable inner - = this.serviceClient().listWorkloadProfileStates(resourceGroupName, environmentName, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadProfileStatesImpl(inner1, this.manager())); - } - - public ManagedEnvironment 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))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, environmentName, 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))); - } - return this.getByResourceGroupWithResponse(resourceGroupName, environmentName, 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))); - } - this.delete(resourceGroupName, environmentName, 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))); - } - this.delete(resourceGroupName, environmentName, context); - } - - private ManagedEnvironmentsClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public ManagedEnvironmentImpl define(String name) { - return new ManagedEnvironmentImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesClientImpl.java deleted file mode 100644 index 7507b73c6cb5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesClientImpl.java +++ /dev/null @@ -1,646 +0,0 @@ -// Copyright (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.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.ManagedEnvironmentsStoragesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner; -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 ManagedEnvironmentsStoragesClient. - */ -public final class ManagedEnvironmentsStoragesClientImpl implements ManagedEnvironmentsStoragesClient { - /** - * The proxy service used to perform REST calls. - */ - private final ManagedEnvironmentsStoragesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ManagedEnvironmentsStoragesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ManagedEnvironmentsStoragesClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(ManagedEnvironmentsStoragesService.class, client.getHttpPipeline(), - client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientManagedEnvironmentsStorages to be used by the - * proxy service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ManagedEnvironmentsStoragesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("storageName") String storageName, - @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}/storages/{storageName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("storageName") String storageName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ManagedEnvironmentStorageInner storageEnvelope, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}") - @ExpectedResponses({ 200, 204 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @PathParam("storageName") String storageName, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get all storages for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(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)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get all storages for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync(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); - } - - /** - * Get all storages for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync(String resourceGroupName, - String environmentName) { - return listWithResponseAsync(resourceGroupName, environmentName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get all storages for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse(String resourceGroupName, - String environmentName, Context context) { - return listWithResponseAsync(resourceGroupName, environmentName, context).block(); - } - - /** - * Get all storages for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentStoragesCollectionInner list(String resourceGroupName, String environmentName) { - return listWithResponse(resourceGroupName, environmentName, Context.NONE).getValue(); - } - - /** - * Get storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 storage for a managedEnvironment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String environmentName, String storageName) { - 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 (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName 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, storageName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 storage for a managedEnvironment along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync(String resourceGroupName, - String environmentName, String storageName, 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 (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName 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, storageName, this.client.getApiVersion(), accept, context); - } - - /** - * Get storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 storage for a managedEnvironment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync(String resourceGroupName, String environmentName, - String storageName) { - return getWithResponseAsync(resourceGroupName, environmentName, storageName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 storage for a managedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String resourceGroupName, String environmentName, - String storageName, Context context) { - return getWithResponseAsync(resourceGroupName, environmentName, storageName, context).block(); - } - - /** - * Get storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 storage for a managedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentStorageInner get(String resourceGroupName, String environmentName, String storageName) { - return getWithResponse(resourceGroupName, environmentName, storageName, Context.NONE).getValue(); - } - - /** - * Create or update storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @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 storage resource for managedEnvironment along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String storageName, ManagedEnvironmentStorageInner storageEnvelope) { - 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 (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); - } - if (storageEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter storageEnvelope is required and cannot be null.")); - } else { - storageEnvelope.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, storageName, this.client.getApiVersion(), storageEnvelope, accept, - context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Create or update storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @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 storage resource for managedEnvironment along with {@link Response} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, - String environmentName, String storageName, ManagedEnvironmentStorageInner storageEnvelope, 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 (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); - } - if (storageEnvelope == null) { - return Mono - .error(new IllegalArgumentException("Parameter storageEnvelope is required and cannot be null.")); - } else { - storageEnvelope.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - environmentName, storageName, this.client.getApiVersion(), storageEnvelope, accept, context); - } - - /** - * Create or update storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @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 storage resource for managedEnvironment on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, - String storageName, ManagedEnvironmentStorageInner storageEnvelope) { - return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, storageName, storageEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Create or update storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @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 storage resource for managedEnvironment along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse(String resourceGroupName, - String environmentName, String storageName, ManagedEnvironmentStorageInner storageEnvelope, Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, storageName, storageEnvelope, - context).block(); - } - - /** - * Create or update storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @param storageEnvelope Configuration details of storage. - * @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 storage resource for managedEnvironment. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentStorageInner createOrUpdate(String resourceGroupName, String environmentName, - String storageName, ManagedEnvironmentStorageInner storageEnvelope) { - return createOrUpdateWithResponse(resourceGroupName, environmentName, storageName, storageEnvelope, - Context.NONE).getValue(); - } - - /** - * Delete storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 environmentName, - String storageName) { - 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 (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName 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, storageName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Delete storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 environmentName, - String storageName, 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 (storageName == null) { - return Mono.error(new IllegalArgumentException("Parameter storageName 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, storageName, this.client.getApiVersion(), accept, context); - } - - /** - * Delete storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 environmentName, String storageName) { - return deleteWithResponseAsync(resourceGroupName, environmentName, storageName) - .flatMap(ignored -> Mono.empty()); - } - - /** - * Delete storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @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}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String environmentName, String storageName, - Context context) { - return deleteWithResponseAsync(resourceGroupName, environmentName, storageName, context).block(); - } - - /** - * Delete storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 environmentName, String storageName) { - deleteWithResponse(resourceGroupName, environmentName, storageName, Context.NONE); - } -} 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 deleted file mode 100644 index 0912a5938a1b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesImpl.java +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright (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.ManagedEnvironmentsStoragesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner; -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); - - private final ManagedEnvironmentsStoragesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ManagedEnvironmentsStoragesImpl(ManagedEnvironmentsStoragesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response listWithResponse(String resourceGroupName, - String environmentName, Context context) { - Response inner - = this.serviceClient().listWithResponse(resourceGroupName, environmentName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ManagedEnvironmentStoragesCollectionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ManagedEnvironmentStoragesCollection list(String resourceGroupName, String environmentName) { - ManagedEnvironmentStoragesCollectionInner inner = this.serviceClient().list(resourceGroupName, environmentName); - if (inner != null) { - return new ManagedEnvironmentStoragesCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getWithResponse(String resourceGroupName, String environmentName, - String storageName, Context context) { - Response inner - = this.serviceClient().getWithResponse(resourceGroupName, environmentName, storageName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new ManagedEnvironmentStorageImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public ManagedEnvironmentStorage get(String resourceGroupName, String environmentName, String storageName) { - ManagedEnvironmentStorageInner inner - = this.serviceClient().get(resourceGroupName, environmentName, storageName); - if (inner != null) { - return new ManagedEnvironmentStorageImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response deleteWithResponse(String resourceGroupName, String environmentName, String storageName, - Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, storageName, context); - } - - public void delete(String resourceGroupName, String environmentName, String storageName) { - this.serviceClient().delete(resourceGroupName, environmentName, storageName); - } - - public ManagedEnvironmentStorage 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 storageName = ResourceManagerUtils.getValueFromIdByName(id, "storages"); - if (storageName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, storageName, 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 storageName = ResourceManagerUtils.getValueFromIdByName(id, "storages"); - if (storageName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, storageName, 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 storageName = ResourceManagerUtils.getValueFromIdByName(id, "storages"); - if (storageName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); - } - this.deleteWithResponse(resourceGroupName, environmentName, storageName, Context.NONE); - } - - public Response 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 storageName = ResourceManagerUtils.getValueFromIdByName(id, "storages"); - if (storageName == null) { - throw LOGGER.logExceptionAsError(new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); - } - return this.deleteWithResponse(resourceGroupName, environmentName, storageName, context); - } - - private ManagedEnvironmentsStoragesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - public ManagedEnvironmentStorageImpl define(String name) { - return new ManagedEnvironmentStorageImpl(name, this.manager()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesClientImpl.java deleted file mode 100644 index 404efd5e2957..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesClientImpl.java +++ /dev/null @@ -1,227 +0,0 @@ -// Copyright (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.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.NamespacesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -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 NamespacesClient. - */ -public final class NamespacesClientImpl implements NamespacesClient { - /** - * The proxy service used to perform REST calls. - */ - private final NamespacesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of NamespacesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - NamespacesClientImpl(ContainerAppsApiClientImpl client) { - this.service - = RestProxy.create(NamespacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientNamespaces to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface NamespacesService { - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/checkNameAvailability") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> checkNameAvailability(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CheckNameAvailabilityRequest checkNameAvailabilityRequest, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Checks the resource name availability. - * - * Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check name availability request. - * @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 check availability result along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - 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 (checkNameAvailabilityRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter checkNameAvailabilityRequest is required and cannot be null.")); - } else { - checkNameAvailabilityRequest.validate(); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), - this.client.getSubscriptionId(), resourceGroupName, environmentName, this.client.getApiVersion(), - checkNameAvailabilityRequest, accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Checks the resource name availability. - * - * Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check name availability request. - * @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 check availability result along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> checkNameAvailabilityWithResponseAsync( - String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest, - 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 (checkNameAvailabilityRequest == null) { - return Mono.error( - new IllegalArgumentException("Parameter checkNameAvailabilityRequest is required and cannot be null.")); - } else { - checkNameAvailabilityRequest.validate(); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.checkNameAvailability(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, environmentName, this.client.getApiVersion(), checkNameAvailabilityRequest, accept, - context); - } - - /** - * Checks the resource name availability. - * - * Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check name availability request. - * @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 check availability result on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkNameAvailabilityAsync(String resourceGroupName, - String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - return checkNameAvailabilityWithResponseAsync(resourceGroupName, environmentName, checkNameAvailabilityRequest) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Checks the resource name availability. - * - * Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check name availability request. - * @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 check availability result along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse(String resourceGroupName, - String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context) { - return checkNameAvailabilityWithResponseAsync(resourceGroupName, environmentName, checkNameAvailabilityRequest, - context).block(); - } - - /** - * Checks the resource name availability. - * - * Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check name availability request. - * @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 check availability result. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public CheckNameAvailabilityResponseInner checkNameAvailability(String resourceGroupName, String environmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - return checkNameAvailabilityWithResponse(resourceGroupName, environmentName, checkNameAvailabilityRequest, - Context.NONE).getValue(); - } -} 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 deleted file mode 100644 index 46629bb05737..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesImpl.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.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.NamespacesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityResponse; -import com.azure.resourcemanager.appcontainers.models.Namespaces; - -public final class NamespacesImpl implements Namespaces { - private static final ClientLogger LOGGER = new ClientLogger(NamespacesImpl.class); - - private final NamespacesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public NamespacesImpl(NamespacesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response checkNameAvailabilityWithResponse(String resourceGroupName, - String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context 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())); - } else { - return null; - } - } - - public CheckNameAvailabilityResponse checkNameAvailability(String resourceGroupName, String environmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - CheckNameAvailabilityResponseInner inner = this.serviceClient() - .checkNameAvailability(resourceGroupName, environmentName, checkNameAvailabilityRequest); - if (inner != null) { - return new CheckNameAvailabilityResponseImpl(inner, this.manager()); - } else { - return null; - } - } - - private NamespacesClient 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/OperationDetailImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationDetailImpl.java deleted file mode 100644 index cd2fca311b4b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationDetailImpl.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.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -import com.azure.resourcemanager.appcontainers.models.OperationDetail; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; - -public final class OperationDetailImpl implements OperationDetail { - private OperationDetailInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - OperationDetailImpl(OperationDetailInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String name() { - return this.innerModel().name(); - } - - public Boolean isDataAction() { - return this.innerModel().isDataAction(); - } - - public OperationDisplay display() { - return this.innerModel().display(); - } - - public String origin() { - return this.innerModel().origin(); - } - - public OperationDetailInner 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/OperationsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsClientImpl.java deleted file mode 100644 index c69363cc11e6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsClientImpl.java +++ /dev/null @@ -1,231 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.OperationsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -import com.azure.resourcemanager.appcontainers.models.AvailableOperations; -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 OperationsClient. - */ -public final class OperationsClientImpl implements OperationsClient { - /** - * The proxy service used to perform REST calls. - */ - private final OperationsService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of OperationsClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - OperationsClientImpl(ContainerAppsApiClientImpl client) { - this.service - = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientOperations to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface OperationsService { - @Headers({ "Content-Type: application/json" }) - @Get("/providers/Microsoft.App/operations") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Lists all of the available RP operations. - * - * @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 available operations of the service 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.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext( - context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Lists all of the available RP operations. - * - * @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 available operations of the service 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.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Lists all of the available RP operations. - * - * @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 available operations of the service as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync() { - return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Lists all of the available RP operations. - * - * @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 available operations of the service as paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Lists all of the available RP operations. - * - * @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 available operations of the service as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list() { - return new PagedIterable<>(listAsync()); - } - - /** - * Lists all of the available RP operations. - * - * @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 available operations of the service as paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(Context context) { - return new PagedIterable<>(listAsync(context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available operations of the service along with {@link PagedResponse} on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), - res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available operations of the service 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/OperationsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsImpl.java deleted file mode 100644 index 7cbc6577e929..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) 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.OperationsClient; -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -import com.azure.resourcemanager.appcontainers.models.OperationDetail; -import com.azure.resourcemanager.appcontainers.models.Operations; - -public final class OperationsImpl implements Operations { - private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); - - private final OperationsClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public OperationsImpl(OperationsClient 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 OperationDetailImpl(inner1, this.manager())); - } - - public PagedIterable list(Context context) { - PagedIterable inner = this.serviceClient().list(context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationDetailImpl(inner1, this.manager())); - } - - private OperationsClient 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/PrivateEndpointConnectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PrivateEndpointConnectionImpl.java deleted file mode 100644 index 0f307d007854..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PrivateEndpointConnectionImpl.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (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 deleted file mode 100644 index 29bb3c4ededb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/PrivateLinkResourceImpl.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.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/ReplicaCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaCollectionImpl.java deleted file mode 100644 index e9bba45d900e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaCollectionImpl.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.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import com.azure.resourcemanager.appcontainers.models.Replica; -import com.azure.resourcemanager.appcontainers.models.ReplicaCollection; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - -public final class ReplicaCollectionImpl implements ReplicaCollection { - private ReplicaCollectionInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - ReplicaCollectionImpl(ReplicaCollectionInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList( - inner.stream().map(inner1 -> new ReplicaImpl(inner1, this.manager())).collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - - public ReplicaCollectionInner 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/ReplicaImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaImpl.java deleted file mode 100644 index 927df01ea0d9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (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.ReplicaInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppReplicaRunningState; -import com.azure.resourcemanager.appcontainers.models.Replica; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.time.OffsetDateTime; -import java.util.Collections; -import java.util.List; - -public final class ReplicaImpl implements Replica { - private ReplicaInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - ReplicaImpl(ReplicaInner 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 OffsetDateTime createdTime() { - return this.innerModel().createdTime(); - } - - public ContainerAppReplicaRunningState runningState() { - return this.innerModel().runningState(); - } - - public String runningStateDetails() { - return this.innerModel().runningStateDetails(); - } - - public List containers() { - List inner = this.innerModel().containers(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public List initContainers() { - List inner = this.innerModel().initContainers(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public ReplicaInner 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 deleted file mode 100644 index 0a2ed7b73eef..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceManagerUtils.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.implementation; - -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.util.CoreUtils; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.function.Function; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import reactor.core.publisher.Flux; - -final class ResourceManagerUtils { - private ResourceManagerUtils() { - } - - static String getValueFromIdByName(String id, String name) { - if (id == null) { - return null; - } - Iterator itr = Arrays.stream(id.split("/")).iterator(); - while (itr.hasNext()) { - String part = itr.next(); - if (part != null && !part.trim().isEmpty()) { - if (part.equalsIgnoreCase(name)) { - if (itr.hasNext()) { - return itr.next(); - } else { - return null; - } - } - } - } - return null; - } - - static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { - if (id == null || pathTemplate == null) { - return null; - } - String parameterNameParentheses = "{" + parameterName + "}"; - List idSegmentsReverted = Arrays.asList(id.split("/")); - List pathSegments = Arrays.asList(pathTemplate.split("/")); - Collections.reverse(idSegmentsReverted); - Iterator idItrReverted = idSegmentsReverted.iterator(); - int pathIndex = pathSegments.size(); - while (idItrReverted.hasNext() && pathIndex > 0) { - String idSegment = idItrReverted.next(); - String pathSegment = pathSegments.get(--pathIndex); - if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) { - if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) { - if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) { - List segments = new ArrayList<>(); - segments.add(idSegment); - idItrReverted.forEachRemaining(segments::add); - Collections.reverse(segments); - if (!segments.isEmpty() && segments.get(0).isEmpty()) { - segments.remove(0); - } - return String.join("/", segments); - } else { - return idSegment; - } - } - } - } - return null; - } - - static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl<>(pageIterable, mapper); - } - - private static final class PagedIterableImpl extends PagedIterable { - - private final PagedIterable pagedIterable; - private final Function mapper; - private final Function, PagedResponse> pageMapper; - - private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux - .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); - this.pagedIterable = pagedIterable; - this.mapper = mapper; - this.pageMapper = getPageMapper(mapper); - } - - private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), - null); - } - - @Override - public Stream stream() { - return pagedIterable.stream().map(mapper); - } - - @Override - public Stream> streamByPage() { - return pagedIterable.streamByPage().map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken) { - return pagedIterable.streamByPage(continuationToken).map(pageMapper); - } - - @Override - public Stream> streamByPage(int preferredPageSize) { - return pagedIterable.streamByPage(preferredPageSize).map(pageMapper); - } - - @Override - public Stream> streamByPage(String continuationToken, int preferredPageSize) { - return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper); - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(pagedIterable.iterator(), mapper); - } - - @Override - public Iterable> iterableByPage() { - return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); - } - - @Override - public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); - } - - @Override - public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); - } - } - - private static final class IteratorImpl implements Iterator { - - private final Iterator iterator; - private final Function mapper; - - private IteratorImpl(Iterator iterator, Function mapper) { - this.iterator = iterator; - this.mapper = mapper; - } - - @Override - public boolean hasNext() { - return iterator.hasNext(); - } - - @Override - public S next() { - return mapper.apply(iterator.next()); - } - - @Override - public void remove() { - iterator.remove(); - } - } - - private static final class IterableImpl implements Iterable { - - private final Iterable iterable; - private final Function mapper; - - private IterableImpl(Iterable iterable, Function mapper) { - this.iterable = iterable; - this.mapper = mapper; - } - - @Override - public Iterator iterator() { - return new IteratorImpl<>(iterable.iterator(), mapper); - } - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersClientImpl.java deleted file mode 100644 index 22debf25d272..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersClientImpl.java +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright (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.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.ResourceProvidersClient; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; -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 ResourceProvidersClient. - */ -public final class ResourceProvidersClientImpl implements ResourceProvidersClient { - /** - * The proxy service used to perform REST calls. - */ - private final ResourceProvidersService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of ResourceProvidersClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - ResourceProvidersClientImpl(ContainerAppsApiClientImpl client) { - this.service - = RestProxy.create(ResourceProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientResourceProviders to be used by the proxy - * service to perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface ResourceProvidersService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> jobExecution(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, - @PathParam("jobExecutionName") String jobExecutionName, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Post("/subscriptions/{subscriptionId}/providers/Microsoft.App/getCustomDomainVerificationId") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getCustomDomainVerificationId(@HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, Context context); - } - - /** - * Get details of a single job execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a single job execution along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> jobExecutionWithResponseAsync(String resourceGroupName, String jobName, - String jobExecutionName) { - 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (jobExecutionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter jobExecutionName is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.jobExecution(this.client.getEndpoint(), this.client.getSubscriptionId(), - resourceGroupName, jobName, jobExecutionName, this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get details of a single job execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a single job execution along with {@link Response} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> jobExecutionWithResponseAsync(String resourceGroupName, String jobName, - String jobExecutionName, 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 (jobName == null) { - return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); - } - if (jobExecutionName == null) { - return Mono - .error(new IllegalArgumentException("Parameter jobExecutionName is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.jobExecution(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, - jobName, jobExecutionName, this.client.getApiVersion(), accept, context); - } - - /** - * Get details of a single job execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a single job execution on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono jobExecutionAsync(String resourceGroupName, String jobName, - String jobExecutionName) { - return jobExecutionWithResponseAsync(resourceGroupName, jobName, jobExecutionName) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get details of a single job execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a single job execution along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response jobExecutionWithResponse(String resourceGroupName, String jobName, - String jobExecutionName, Context context) { - return jobExecutionWithResponseAsync(resourceGroupName, jobName, jobExecutionName, context).block(); - } - - /** - * Get details of a single job execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a single job execution. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public JobExecutionInner jobExecution(String resourceGroupName, String jobName, String jobExecutionName) { - return jobExecutionWithResponse(resourceGroupName, jobName, jobExecutionName, Context.NONE).getValue(); - } - - /** - * Get the verification id of a subscription used for verifying custom domains. - * - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the verification id of a subscription used for verifying custom domains along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getCustomDomainVerificationIdWithResponseAsync() { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getCustomDomainVerificationId(this.client.getEndpoint(), - this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the verification id of a subscription used for verifying custom domains. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the verification id of a subscription used for verifying custom domains along with {@link Response} on - * successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getCustomDomainVerificationIdWithResponseAsync(Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.getCustomDomainVerificationId(this.client.getEndpoint(), this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context); - } - - /** - * Get the verification id of a subscription used for verifying custom domains. - * - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the verification id of a subscription used for verifying custom domains on successful completion of - * {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getCustomDomainVerificationIdAsync() { - return getCustomDomainVerificationIdWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); - } - - /** - * Get the verification id of a subscription used for verifying custom domains. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the verification id of a subscription used for verifying custom domains along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response getCustomDomainVerificationIdWithResponse(Context context) { - return getCustomDomainVerificationIdWithResponseAsync(context).block(); - } - - /** - * Get the verification id of a subscription used for verifying custom domains. - * - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the verification id of a subscription used for verifying custom domains. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public String getCustomDomainVerificationId() { - return getCustomDomainVerificationIdWithResponse(Context.NONE).getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersImpl.java deleted file mode 100644 index cacbfd455506..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersImpl.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.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.ResourceProvidersClient; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; -import com.azure.resourcemanager.appcontainers.models.JobExecution; -import com.azure.resourcemanager.appcontainers.models.ResourceProviders; - -public final class ResourceProvidersImpl implements ResourceProviders { - private static final ClientLogger LOGGER = new ClientLogger(ResourceProvidersImpl.class); - - private final ResourceProvidersClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public ResourceProvidersImpl(ResourceProvidersClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public Response jobExecutionWithResponse(String resourceGroupName, String jobName, - String jobExecutionName, Context context) { - Response inner - = this.serviceClient().jobExecutionWithResponse(resourceGroupName, jobName, jobExecutionName, context); - if (inner != null) { - return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new JobExecutionImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public JobExecution jobExecution(String resourceGroupName, String jobName, String jobExecutionName) { - JobExecutionInner inner = this.serviceClient().jobExecution(resourceGroupName, jobName, jobExecutionName); - if (inner != null) { - return new JobExecutionImpl(inner, this.manager()); - } else { - return null; - } - } - - public Response getCustomDomainVerificationIdWithResponse(Context context) { - return this.serviceClient().getCustomDomainVerificationIdWithResponse(context); - } - - public String getCustomDomainVerificationId() { - return this.serviceClient().getCustomDomainVerificationId(); - } - - private ResourceProvidersClient 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/RevisionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.java deleted file mode 100644 index 93deebbb0d1b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import com.azure.resourcemanager.appcontainers.models.Revision; -import com.azure.resourcemanager.appcontainers.models.RevisionHealthState; -import com.azure.resourcemanager.appcontainers.models.RevisionProvisioningState; -import com.azure.resourcemanager.appcontainers.models.RevisionRunningState; -import com.azure.resourcemanager.appcontainers.models.Template; -import java.time.OffsetDateTime; - -public final class RevisionImpl implements Revision { - private RevisionInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - RevisionImpl(RevisionInner 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 OffsetDateTime createdTime() { - return this.innerModel().createdTime(); - } - - public OffsetDateTime lastActiveTime() { - return this.innerModel().lastActiveTime(); - } - - public String fqdn() { - return this.innerModel().fqdn(); - } - - public Template template() { - return this.innerModel().template(); - } - - public Boolean active() { - return this.innerModel().active(); - } - - public Integer replicas() { - return this.innerModel().replicas(); - } - - public Integer trafficWeight() { - return this.innerModel().trafficWeight(); - } - - public String provisioningError() { - return this.innerModel().provisioningError(); - } - - public RevisionHealthState healthState() { - return this.innerModel().healthState(); - } - - public RevisionProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public RevisionRunningState runningState() { - return this.innerModel().runningState(); - } - - public RevisionInner 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/SecretsCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SecretsCollectionImpl.java deleted file mode 100644 index e08baebd76bd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SecretsCollectionImpl.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.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppSecret; -import com.azure.resourcemanager.appcontainers.models.SecretsCollection; -import java.util.Collections; -import java.util.List; - -public final class SecretsCollectionImpl implements SecretsCollection { - private SecretsCollectionInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - SecretsCollectionImpl(SecretsCollectionInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public List value() { - List inner = this.innerModel().value(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } - } - - public SecretsCollectionInner 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/SessionPoolImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SessionPoolImpl.java deleted file mode 100644 index a37b9bcc471e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SessionPoolImpl.java +++ /dev/null @@ -1,285 +0,0 @@ -// Copyright (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.SessionNetworkConfiguration; -import com.azure.resourcemanager.appcontainers.models.SessionPool; -import com.azure.resourcemanager.appcontainers.models.SessionPoolProvisioningState; -import com.azure.resourcemanager.appcontainers.models.SessionPoolSecret; -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 deleted file mode 100644 index 8c464a3cb284..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SourceControlImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright (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.SourceControlInner; -import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; -import com.azure.resourcemanager.appcontainers.models.SourceControl; -import com.azure.resourcemanager.appcontainers.models.SourceControlOperationState; - -public final class SourceControlImpl implements SourceControl, SourceControl.Definition, SourceControl.Update { - private SourceControlInner 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 SourceControlOperationState operationState() { - return this.innerModel().operationState(); - } - - public String repoUrl() { - return this.innerModel().repoUrl(); - } - - public String branch() { - return this.innerModel().branch(); - } - - public GithubActionConfiguration githubActionConfiguration() { - return this.innerModel().githubActionConfiguration(); - } - - public String resourceGroupName() { - return resourceGroupName; - } - - public SourceControlInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } - - private String resourceGroupName; - - private String containerAppName; - - private String sourceControlName; - - private String createXMsGithubAuxiliary; - - private String updateXMsGithubAuxiliary; - - public SourceControlImpl withExistingContainerApp(String resourceGroupName, String containerAppName) { - this.resourceGroupName = resourceGroupName; - this.containerAppName = containerAppName; - return this; - } - - public SourceControl create() { - this.innerObject = serviceManager.serviceClient() - .getContainerAppsSourceControls() - .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), - createXMsGithubAuxiliary, Context.NONE); - return this; - } - - public SourceControl create(Context context) { - this.innerObject = serviceManager.serviceClient() - .getContainerAppsSourceControls() - .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), - createXMsGithubAuxiliary, context); - return this; - } - - SourceControlImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = new SourceControlInner(); - this.serviceManager = serviceManager; - this.sourceControlName = name; - this.createXMsGithubAuxiliary = null; - } - - public SourceControlImpl update() { - this.updateXMsGithubAuxiliary = null; - return this; - } - - public SourceControl apply() { - this.innerObject = serviceManager.serviceClient() - .getContainerAppsSourceControls() - .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), - updateXMsGithubAuxiliary, Context.NONE); - return this; - } - - public SourceControl apply(Context context) { - this.innerObject = serviceManager.serviceClient() - .getContainerAppsSourceControls() - .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), - updateXMsGithubAuxiliary, context); - return this; - } - - SourceControlImpl(SourceControlInner innerObject, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.containerAppName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "containerApps"); - this.sourceControlName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "sourcecontrols"); - } - - public SourceControl refresh() { - 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(); - return this; - } - - public SourceControlImpl withRepoUrl(String repoUrl) { - this.innerModel().withRepoUrl(repoUrl); - return this; - } - - public SourceControlImpl withBranch(String branch) { - this.innerModel().withBranch(branch); - return this; - } - - public SourceControlImpl withGithubActionConfiguration(GithubActionConfiguration githubActionConfiguration) { - this.innerModel().withGithubActionConfiguration(githubActionConfiguration); - return this; - } - - public SourceControlImpl withXMsGithubAuxiliary(String xMsGithubAuxiliary) { - if (isInCreateMode()) { - this.createXMsGithubAuxiliary = xMsGithubAuxiliary; - return this; - } else { - this.updateXMsGithubAuxiliary = xMsGithubAuxiliary; - 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/UsageImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsageImpl.java deleted file mode 100644 index 9d768b691cd4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsageImpl.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.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; -import com.azure.resourcemanager.appcontainers.models.Usage; -import com.azure.resourcemanager.appcontainers.models.UsageName; - -public final class UsageImpl implements Usage { - private UsageInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - UsageImpl(UsageInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public String unit() { - return this.innerModel().unit(); - } - - public float currentValue() { - return this.innerModel().currentValue(); - } - - public float limit() { - return this.innerModel().limit(); - } - - public UsageName name() { - return this.innerModel().name(); - } - - public UsageInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesClientImpl.java deleted file mode 100644 index 29f150947f51..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesClientImpl.java +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.implementation; - -import com.azure.core.annotation.ExpectedResponses; -import com.azure.core.annotation.Get; -import com.azure.core.annotation.HeaderParam; -import com.azure.core.annotation.Headers; -import com.azure.core.annotation.Host; -import com.azure.core.annotation.HostParam; -import com.azure.core.annotation.PathParam; -import com.azure.core.annotation.QueryParam; -import com.azure.core.annotation.ReturnType; -import com.azure.core.annotation.ServiceInterface; -import com.azure.core.annotation.ServiceMethod; -import com.azure.core.annotation.UnexpectedResponseExceptionType; -import com.azure.core.http.rest.PagedFlux; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.PagedResponse; -import com.azure.core.http.rest.PagedResponseBase; -import com.azure.core.http.rest.Response; -import com.azure.core.http.rest.RestProxy; -import com.azure.core.util.Context; -import com.azure.core.util.FluxUtil; -import com.azure.resourcemanager.appcontainers.fluent.UsagesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; -import com.azure.resourcemanager.appcontainers.models.ListUsagesResult; -import reactor.core.publisher.Mono; - -/** - * An instance of this class provides access to all the operations defined in UsagesClient. - */ -public final class UsagesClientImpl implements UsagesClient { - /** - * The proxy service used to perform REST calls. - */ - private final UsagesService service; - - /** - * The service client containing this operation class. - */ - private final ContainerAppsApiClientImpl client; - - /** - * Initializes an instance of UsagesClientImpl. - * - * @param client the instance of the service client containing this operation class. - */ - UsagesClientImpl(ContainerAppsApiClientImpl client) { - this.service = RestProxy.create(UsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); - this.client = client; - } - - /** - * The interface defining all the services for ContainerAppsApiClientUsages to be used by the proxy service to - * perform REST calls. - */ - @Host("{$host}") - @ServiceInterface(name = "ContainerAppsApiClie") - public interface UsagesService { - @Headers({ "Content-Type: application/json" }) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/usages") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list(@HostParam("$host") String endpoint, - @PathParam("location") String location, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - - @Headers({ "Content-Type: application/json" }) - @Get("{nextLink}") - @ExpectedResponses({ 200 }) - @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); - } - - /** - * Gets, for the specified location, the current resource usage information as well as the limits under the - * subscription. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.list(this.client.getEndpoint(), location, this.client.getSubscriptionId(), - this.client.getApiVersion(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Gets, for the specified location, the current resource usage information as well as the limits under the - * subscription. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync(String location, Context context) { - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - if (location == null) { - return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); - } - if (this.client.getSubscriptionId() == null) { - return Mono.error(new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), location, this.client.getSubscriptionId(), this.client.getApiVersion(), - accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } - - /** - * Gets, for the specified location, the current resource usage information as well as the limits under the - * subscription. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location) { - return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); - } - - /** - * Gets, for the specified location, the current resource usage information as well as the limits under the - * subscription. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedFlux}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync(String location, Context context) { - return new PagedFlux<>(() -> listSinglePageAsync(location, context), - nextLink -> listNextSinglePageAsync(nextLink, context)); - } - - /** - * Gets, for the specified location, the current resource usage information as well as the limits under the - * subscription. - * - * @param location The location for which resource usage is queried. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location) { - return new PagedIterable<>(listAsync(location)); - } - - /** - * Gets, for the specified location, the current resource usage information as well as the limits under the - * subscription. - * - * @param location The location for which resource usage is queried. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the paginated response with {@link PagedIterable}. - */ - @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list(String location, Context context) { - return new PagedIterable<>(listAsync(location, context)); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), - res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) - .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); - } - - /** - * Get the next page of items. - * - * @param nextLink The URL to get the next list of items. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listNextSinglePageAsync(String nextLink, Context context) { - if (nextLink == null) { - return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); - } - if (this.client.getEndpoint() == null) { - return Mono.error( - new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); - } - final String accept = "application/json"; - context = this.client.mergeContext(context); - return service.listNext(nextLink, this.client.getEndpoint(), accept, context) - .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), - res.getValue().value(), res.getValue().nextLink(), null)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesImpl.java deleted file mode 100644 index 9606e538e86b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesImpl.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.implementation; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.fluent.UsagesClient; -import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; -import com.azure.resourcemanager.appcontainers.models.Usage; -import com.azure.resourcemanager.appcontainers.models.Usages; - -public final class UsagesImpl implements Usages { - private static final ClientLogger LOGGER = new ClientLogger(UsagesImpl.class); - - private final UsagesClient innerClient; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - public UsagesImpl(UsagesClient innerClient, - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { - this.innerClient = innerClient; - this.serviceManager = serviceManager; - } - - public PagedIterable list(String location) { - PagedIterable inner = this.serviceClient().list(location); - return ResourceManagerUtils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); - } - - public PagedIterable list(String location, Context context) { - PagedIterable inner = this.serviceClient().list(location, context); - return ResourceManagerUtils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); - } - - private UsagesClient serviceClient() { - return this.innerClient; - } - - private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkflowEnvelopeImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkflowEnvelopeImpl.java deleted file mode 100644 index 2da06b74375d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkflowEnvelopeImpl.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.implementation; - -import com.azure.resourcemanager.appcontainers.fluent.models.WorkflowEnvelopeInner; -import com.azure.resourcemanager.appcontainers.models.WorkflowEnvelope; -import com.azure.resourcemanager.appcontainers.models.WorkflowEnvelopeProperties; - -public final class WorkflowEnvelopeImpl implements WorkflowEnvelope { - private WorkflowEnvelopeInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - WorkflowEnvelopeImpl(WorkflowEnvelopeInner 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 String kind() { - return this.innerModel().kind(); - } - - public String location() { - return this.innerModel().location(); - } - - public WorkflowEnvelopeProperties properties() { - return this.innerModel().properties(); - } - - public WorkflowEnvelopeInner 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/WorkloadProfileStatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkloadProfileStatesImpl.java deleted file mode 100644 index 6bf062081f2c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkloadProfileStatesImpl.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.implementation; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStates; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; - -public final class WorkloadProfileStatesImpl implements WorkloadProfileStates { - private WorkloadProfileStatesInner innerObject; - - private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - - WorkloadProfileStatesImpl(WorkloadProfileStatesInner 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 WorkloadProfileStatesProperties properties() { - return this.innerModel().properties(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public WorkloadProfileStatesInner 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/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java deleted file mode 100644 index d5c81f00f20c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -/** - * Package containing the implementations for ContainerAppsApiClient. - * 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/AccessMode.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AccessMode.java deleted file mode 100644 index 8a43d1bcc430..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AccessMode.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Access mode for storage. - */ -public final class AccessMode extends ExpandableStringEnum { - /** - * Static value ReadOnly for AccessMode. - */ - public static final AccessMode READ_ONLY = fromString("ReadOnly"); - - /** - * Static value ReadWrite for AccessMode. - */ - public static final AccessMode READ_WRITE = fromString("ReadWrite"); - - /** - * Creates a new instance of AccessMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AccessMode() { - } - - /** - * Creates or finds a AccessMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding AccessMode. - */ - public static AccessMode fromString(String name) { - return fromString(name, AccessMode.class); - } - - /** - * Gets known AccessMode values. - * - * @return known AccessMode values. - */ - public static Collection values() { - return values(AccessMode.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Action.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Action.java deleted file mode 100644 index 283d4c572536..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Action.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny. - */ -public final class Action extends ExpandableStringEnum { - /** - * Static value Allow for Action. - */ - public static final Action ALLOW = fromString("Allow"); - - /** - * Static value Deny for Action. - */ - public static final Action DENY = fromString("Deny"); - - /** - * Creates a new instance of Action value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Action() { - } - - /** - * Creates or finds a Action from its string representation. - * - * @param name a name to look for. - * @return the corresponding Action. - */ - public static Action fromString(String name) { - return fromString(name, Action.class); - } - - /** - * Gets known Action values. - * - * @return known Action values. - */ - public static Collection values() { - return values(Action.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ActiveRevisionsMode.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ActiveRevisionsMode.java deleted file mode 100644 index f0ca43bde5e2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ActiveRevisionsMode.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * 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>. - */ -public final class ActiveRevisionsMode extends ExpandableStringEnum { - /** - * Static value Multiple for ActiveRevisionsMode. - */ - public static final ActiveRevisionsMode MULTIPLE = fromString("Multiple"); - - /** - * Static value Single for ActiveRevisionsMode. - */ - public static final ActiveRevisionsMode SINGLE = fromString("Single"); - - /** - * Creates a new instance of ActiveRevisionsMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ActiveRevisionsMode() { - } - - /** - * Creates or finds a ActiveRevisionsMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding ActiveRevisionsMode. - */ - public static ActiveRevisionsMode fromString(String name) { - return fromString(name, ActiveRevisionsMode.class); - } - - /** - * Gets known ActiveRevisionsMode values. - * - * @return known ActiveRevisionsMode values. - */ - public static Collection values() { - return values(ActiveRevisionsMode.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Affinity.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Affinity.java deleted file mode 100644 index 795068245527..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Affinity.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Sticky Session Affinity. - */ -public final class Affinity extends ExpandableStringEnum { - /** - * Static value sticky for Affinity. - */ - public static final Affinity STICKY = fromString("sticky"); - - /** - * Static value none for Affinity. - */ - public static final Affinity NONE = fromString("none"); - - /** - * Creates a new instance of Affinity value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Affinity() { - } - - /** - * Creates or finds a Affinity from its string representation. - * - * @param name a name to look for. - * @return the corresponding Affinity. - */ - public static Affinity fromString(String name) { - return fromString(name, Affinity.class); - } - - /** - * Gets known Affinity values. - * - * @return known Affinity values. - */ - public static Collection values() { - return values(Affinity.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedAudiencesValidation.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedAudiencesValidation.java deleted file mode 100644 index a62eb3cfbcc7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedAudiencesValidation.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The configuration settings of the Allowed Audiences validation flow. - */ -@Fluent -public final class AllowedAudiencesValidation implements JsonSerializable { - /* - * The configuration settings of the allowed list of audiences from which to validate the JWT token. - */ - private List allowedAudiences; - - /** - * Creates an instance of AllowedAudiencesValidation class. - */ - public AllowedAudiencesValidation() { - } - - /** - * Get the allowedAudiences property: The configuration settings of the allowed list of audiences from which to - * validate the JWT token. - * - * @return the allowedAudiences value. - */ - public List allowedAudiences() { - return this.allowedAudiences; - } - - /** - * Set the allowedAudiences property: The configuration settings of the allowed list of audiences from which to - * validate the JWT token. - * - * @param allowedAudiences the allowedAudiences value to set. - * @return the AllowedAudiencesValidation object itself. - */ - public AllowedAudiencesValidation withAllowedAudiences(List allowedAudiences) { - this.allowedAudiences = allowedAudiences; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("allowedAudiences", this.allowedAudiences, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AllowedAudiencesValidation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AllowedAudiencesValidation if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AllowedAudiencesValidation. - */ - public static AllowedAudiencesValidation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AllowedAudiencesValidation deserializedAllowedAudiencesValidation = new AllowedAudiencesValidation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("allowedAudiences".equals(fieldName)) { - List allowedAudiences = reader.readArray(reader1 -> reader1.getString()); - deserializedAllowedAudiencesValidation.allowedAudiences = allowedAudiences; - } else { - reader.skipChildren(); - } - } - - return deserializedAllowedAudiencesValidation; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedPrincipals.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedPrincipals.java deleted file mode 100644 index a035f5409891..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedPrincipals.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The configuration settings of the Azure Active Directory allowed principals. - */ -@Fluent -public final class AllowedPrincipals implements JsonSerializable { - /* - * The list of the allowed groups. - */ - private List groups; - - /* - * The list of the allowed identities. - */ - private List identities; - - /** - * Creates an instance of AllowedPrincipals class. - */ - public AllowedPrincipals() { - } - - /** - * Get the groups property: The list of the allowed groups. - * - * @return the groups value. - */ - public List groups() { - return this.groups; - } - - /** - * Set the groups property: The list of the allowed groups. - * - * @param groups the groups value to set. - * @return the AllowedPrincipals object itself. - */ - public AllowedPrincipals withGroups(List groups) { - this.groups = groups; - return this; - } - - /** - * Get the identities property: The list of the allowed identities. - * - * @return the identities value. - */ - public List identities() { - return this.identities; - } - - /** - * Set the identities property: The list of the allowed identities. - * - * @param identities the identities value to set. - * @return the AllowedPrincipals object itself. - */ - public AllowedPrincipals withIdentities(List identities) { - this.identities = identities; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("groups", this.groups, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("identities", this.identities, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AllowedPrincipals from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AllowedPrincipals if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AllowedPrincipals. - */ - public static AllowedPrincipals fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AllowedPrincipals deserializedAllowedPrincipals = new AllowedPrincipals(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("groups".equals(fieldName)) { - List groups = reader.readArray(reader1 -> reader1.getString()); - deserializedAllowedPrincipals.groups = groups; - } else if ("identities".equals(fieldName)) { - List identities = reader.readArray(reader1 -> reader1.getString()); - deserializedAllowedPrincipals.identities = identities; - } else { - reader.skipChildren(); - } - } - - return deserializedAllowedPrincipals; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppInsightsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppInsightsConfiguration.java deleted file mode 100644 index a3d7435c59a8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppInsightsConfiguration.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Configuration of Application Insights. - */ -@Fluent -public final class AppInsightsConfiguration implements JsonSerializable { - /* - * Application Insights connection string - */ - private String connectionString; - - /** - * Creates an instance of AppInsightsConfiguration class. - */ - public AppInsightsConfiguration() { - } - - /** - * Get the connectionString property: Application Insights connection string. - * - * @return the connectionString value. - */ - public String connectionString() { - return this.connectionString; - } - - /** - * Set the connectionString property: Application Insights connection string. - * - * @param connectionString the connectionString value to set. - * @return the AppInsightsConfiguration object itself. - */ - public AppInsightsConfiguration withConnectionString(String connectionString) { - this.connectionString = connectionString; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("connectionString", this.connectionString); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AppInsightsConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AppInsightsConfiguration if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AppInsightsConfiguration. - */ - public static AppInsightsConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AppInsightsConfiguration deserializedAppInsightsConfiguration = new AppInsightsConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("connectionString".equals(fieldName)) { - deserializedAppInsightsConfiguration.connectionString = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAppInsightsConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppLogsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppLogsConfiguration.java deleted file mode 100644 index be296d6dc3b2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppLogsConfiguration.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Configuration of application logs. - */ -@Fluent -public final class AppLogsConfiguration implements JsonSerializable { - /* - * Logs destination, can be 'log-analytics', 'azure-monitor' or 'none' - */ - private String destination; - - /* - * Log Analytics configuration, must only be provided when destination is configured as 'log-analytics' - */ - private LogAnalyticsConfiguration logAnalyticsConfiguration; - - /** - * Creates an instance of AppLogsConfiguration class. - */ - public AppLogsConfiguration() { - } - - /** - * Get the destination property: Logs destination, can be 'log-analytics', 'azure-monitor' or 'none'. - * - * @return the destination value. - */ - public String destination() { - return this.destination; - } - - /** - * Set the destination property: Logs destination, can be 'log-analytics', 'azure-monitor' or 'none'. - * - * @param destination the destination value to set. - * @return the AppLogsConfiguration object itself. - */ - public AppLogsConfiguration withDestination(String destination) { - this.destination = destination; - return this; - } - - /** - * Get the logAnalyticsConfiguration property: Log Analytics configuration, must only be provided when destination - * is configured as 'log-analytics'. - * - * @return the logAnalyticsConfiguration value. - */ - public LogAnalyticsConfiguration logAnalyticsConfiguration() { - return this.logAnalyticsConfiguration; - } - - /** - * Set the logAnalyticsConfiguration property: Log Analytics configuration, must only be provided when destination - * is configured as 'log-analytics'. - * - * @param logAnalyticsConfiguration the logAnalyticsConfiguration value to set. - * @return the AppLogsConfiguration object itself. - */ - public AppLogsConfiguration withLogAnalyticsConfiguration(LogAnalyticsConfiguration logAnalyticsConfiguration) { - this.logAnalyticsConfiguration = logAnalyticsConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (logAnalyticsConfiguration() != null) { - logAnalyticsConfiguration().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("destination", this.destination); - jsonWriter.writeJsonField("logAnalyticsConfiguration", this.logAnalyticsConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AppLogsConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AppLogsConfiguration if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the AppLogsConfiguration. - */ - public static AppLogsConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AppLogsConfiguration deserializedAppLogsConfiguration = new AppLogsConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("destination".equals(fieldName)) { - deserializedAppLogsConfiguration.destination = reader.getString(); - } else if ("logAnalyticsConfiguration".equals(fieldName)) { - deserializedAppLogsConfiguration.logAnalyticsConfiguration - = LogAnalyticsConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAppLogsConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppProtocol.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppProtocol.java deleted file mode 100644 index a6a614a5d9cd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppProtocol.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Tells Dapr which protocol your application is using. Valid options are http and grpc. Default is http. - */ -public final class AppProtocol extends ExpandableStringEnum { - /** - * Static value http for AppProtocol. - */ - public static final AppProtocol HTTP = fromString("http"); - - /** - * Static value grpc for AppProtocol. - */ - public static final AppProtocol GRPC = fromString("grpc"); - - /** - * Creates a new instance of AppProtocol value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public AppProtocol() { - } - - /** - * Creates or finds a AppProtocol from its string representation. - * - * @param name a name to look for. - * @return the corresponding AppProtocol. - */ - public static AppProtocol fromString(String name) { - return fromString(name, AppProtocol.class); - } - - /** - * Gets known AppProtocol values. - * - * @return known AppProtocol values. - */ - public static Collection values() { - return values(AppProtocol.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppRegistration.java deleted file mode 100644 index dfa87e62fb68..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppRegistration.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the app registration for providers that have app ids and app secrets. - */ -@Fluent -public final class AppRegistration implements JsonSerializable { - /* - * The App ID of the app used for login. - */ - private String appId; - - /* - * The app setting name that contains the app secret. - */ - private String appSecretSettingName; - - /** - * Creates an instance of AppRegistration class. - */ - public AppRegistration() { - } - - /** - * Get the appId property: The App ID of the app used for login. - * - * @return the appId value. - */ - public String appId() { - return this.appId; - } - - /** - * Set the appId property: The App ID of the app used for login. - * - * @param appId the appId value to set. - * @return the AppRegistration object itself. - */ - public AppRegistration withAppId(String appId) { - this.appId = appId; - return this; - } - - /** - * Get the appSecretSettingName property: The app setting name that contains the app secret. - * - * @return the appSecretSettingName value. - */ - public String appSecretSettingName() { - return this.appSecretSettingName; - } - - /** - * Set the appSecretSettingName property: The app setting name that contains the app secret. - * - * @param appSecretSettingName the appSecretSettingName value to set. - * @return the AppRegistration object itself. - */ - public AppRegistration withAppSecretSettingName(String appSecretSettingName) { - this.appSecretSettingName = appSecretSettingName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("appId", this.appId); - jsonWriter.writeStringField("appSecretSettingName", this.appSecretSettingName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AppRegistration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AppRegistration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AppRegistration. - */ - public static AppRegistration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AppRegistration deserializedAppRegistration = new AppRegistration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("appId".equals(fieldName)) { - deserializedAppRegistration.appId = reader.getString(); - } else if ("appSecretSettingName".equals(fieldName)) { - deserializedAppRegistration.appSecretSettingName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAppRegistration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencies.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencies.java deleted file mode 100644 index 06fb0d166368..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencies.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (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 AppResiliencies. - */ -public interface AppResiliencies { - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @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 Response}. - */ - Response deleteWithResponse(String resourceGroupName, String appName, String name, Context context); - - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @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 appName, String name); - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @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 resiliency policy along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String appName, String name, Context context); - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @param name Name of the resiliency policy. - * @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 resiliency policy. - */ - AppResiliency get(String resourceGroupName, String appName, String name); - - /** - * List an application's resiliency policies. - * - * List container app resiliency policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @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 collection of AppResiliency policies as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String appName); - - /** - * List an application's resiliency policies. - * - * List container app resiliency policies. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @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 collection of AppResiliency policies as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String appName, Context context); - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @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 container app resiliency policy along with {@link Response}. - */ - AppResiliency getById(String id); - - /** - * Get an application's resiliency policy. - * - * Get container app resiliency policy. - * - * @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 container app resiliency policy along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @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 an application's resiliency policy. - * - * Delete container app resiliency policy. - * - * @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 {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new AppResiliency resource. - * - * @param name resource name. - * @return the first stage of the new AppResiliency definition. - */ - AppResiliency.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliency.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliency.java deleted file mode 100644 index 2ddc37d1845c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliency.java +++ /dev/null @@ -1,358 +0,0 @@ -// Copyright (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.AppResiliencyInner; - -/** - * An immutable client-side representation of AppResiliency. - */ -public interface AppResiliency { - /** - * 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 timeoutPolicy property: Policy to set request timeouts. - * - * @return the timeoutPolicy value. - */ - TimeoutPolicy timeoutPolicy(); - - /** - * Gets the httpRetryPolicy property: Policy that defines http request retry conditions. - * - * @return the httpRetryPolicy value. - */ - HttpRetryPolicy httpRetryPolicy(); - - /** - * Gets the tcpRetryPolicy property: Policy that defines tcp request retry conditions. - * - * @return the tcpRetryPolicy value. - */ - TcpRetryPolicy tcpRetryPolicy(); - - /** - * Gets the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. - * - * @return the circuitBreakerPolicy value. - */ - CircuitBreakerPolicy circuitBreakerPolicy(); - - /** - * Gets the httpConnectionPool property: Defines parameters for http connection pooling. - * - * @return the httpConnectionPool value. - */ - HttpConnectionPool httpConnectionPool(); - - /** - * Gets the tcpConnectionPool property: Defines parameters for tcp connection pooling. - * - * @return the tcpConnectionPool value. - */ - TcpConnectionPool tcpConnectionPool(); - - /** - * 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.AppResiliencyInner object. - * - * @return the inner object. - */ - AppResiliencyInner innerModel(); - - /** - * The entirety of the AppResiliency definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The AppResiliency definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the AppResiliency definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the AppResiliency definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, appName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param appName Name of the Container App. - * @return the next definition stage. - */ - WithCreate withExistingContainerApp(String resourceGroupName, String appName); - } - - /** - * The stage of the AppResiliency 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.WithTimeoutPolicy, DefinitionStages.WithHttpRetryPolicy, - DefinitionStages.WithTcpRetryPolicy, DefinitionStages.WithCircuitBreakerPolicy, - DefinitionStages.WithHttpConnectionPool, DefinitionStages.WithTcpConnectionPool { - /** - * Executes the create request. - * - * @return the created resource. - */ - AppResiliency create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - AppResiliency create(Context context); - } - - /** - * The stage of the AppResiliency definition allowing to specify timeoutPolicy. - */ - interface WithTimeoutPolicy { - /** - * Specifies the timeoutPolicy property: Policy to set request timeouts. - * - * @param timeoutPolicy Policy to set request timeouts. - * @return the next definition stage. - */ - WithCreate withTimeoutPolicy(TimeoutPolicy timeoutPolicy); - } - - /** - * The stage of the AppResiliency definition allowing to specify httpRetryPolicy. - */ - interface WithHttpRetryPolicy { - /** - * Specifies the httpRetryPolicy property: Policy that defines http request retry conditions. - * - * @param httpRetryPolicy Policy that defines http request retry conditions. - * @return the next definition stage. - */ - WithCreate withHttpRetryPolicy(HttpRetryPolicy httpRetryPolicy); - } - - /** - * The stage of the AppResiliency definition allowing to specify tcpRetryPolicy. - */ - interface WithTcpRetryPolicy { - /** - * Specifies the tcpRetryPolicy property: Policy that defines tcp request retry conditions. - * - * @param tcpRetryPolicy Policy that defines tcp request retry conditions. - * @return the next definition stage. - */ - WithCreate withTcpRetryPolicy(TcpRetryPolicy tcpRetryPolicy); - } - - /** - * The stage of the AppResiliency definition allowing to specify circuitBreakerPolicy. - */ - interface WithCircuitBreakerPolicy { - /** - * Specifies the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. - * - * @param circuitBreakerPolicy Policy that defines circuit breaker conditions. - * @return the next definition stage. - */ - WithCreate withCircuitBreakerPolicy(CircuitBreakerPolicy circuitBreakerPolicy); - } - - /** - * The stage of the AppResiliency definition allowing to specify httpConnectionPool. - */ - interface WithHttpConnectionPool { - /** - * Specifies the httpConnectionPool property: Defines parameters for http connection pooling. - * - * @param httpConnectionPool Defines parameters for http connection pooling. - * @return the next definition stage. - */ - WithCreate withHttpConnectionPool(HttpConnectionPool httpConnectionPool); - } - - /** - * The stage of the AppResiliency definition allowing to specify tcpConnectionPool. - */ - interface WithTcpConnectionPool { - /** - * Specifies the tcpConnectionPool property: Defines parameters for tcp connection pooling. - * - * @param tcpConnectionPool Defines parameters for tcp connection pooling. - * @return the next definition stage. - */ - WithCreate withTcpConnectionPool(TcpConnectionPool tcpConnectionPool); - } - } - - /** - * Begins update for the AppResiliency resource. - * - * @return the stage of resource update. - */ - AppResiliency.Update update(); - - /** - * The template for AppResiliency update. - */ - interface Update - extends UpdateStages.WithTimeoutPolicy, UpdateStages.WithHttpRetryPolicy, UpdateStages.WithTcpRetryPolicy, - UpdateStages.WithCircuitBreakerPolicy, UpdateStages.WithHttpConnectionPool, UpdateStages.WithTcpConnectionPool { - /** - * Executes the update request. - * - * @return the updated resource. - */ - AppResiliency apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - AppResiliency apply(Context context); - } - - /** - * The AppResiliency update stages. - */ - interface UpdateStages { - /** - * The stage of the AppResiliency update allowing to specify timeoutPolicy. - */ - interface WithTimeoutPolicy { - /** - * Specifies the timeoutPolicy property: Policy to set request timeouts. - * - * @param timeoutPolicy Policy to set request timeouts. - * @return the next definition stage. - */ - Update withTimeoutPolicy(TimeoutPolicy timeoutPolicy); - } - - /** - * The stage of the AppResiliency update allowing to specify httpRetryPolicy. - */ - interface WithHttpRetryPolicy { - /** - * Specifies the httpRetryPolicy property: Policy that defines http request retry conditions. - * - * @param httpRetryPolicy Policy that defines http request retry conditions. - * @return the next definition stage. - */ - Update withHttpRetryPolicy(HttpRetryPolicy httpRetryPolicy); - } - - /** - * The stage of the AppResiliency update allowing to specify tcpRetryPolicy. - */ - interface WithTcpRetryPolicy { - /** - * Specifies the tcpRetryPolicy property: Policy that defines tcp request retry conditions. - * - * @param tcpRetryPolicy Policy that defines tcp request retry conditions. - * @return the next definition stage. - */ - Update withTcpRetryPolicy(TcpRetryPolicy tcpRetryPolicy); - } - - /** - * The stage of the AppResiliency update allowing to specify circuitBreakerPolicy. - */ - interface WithCircuitBreakerPolicy { - /** - * Specifies the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. - * - * @param circuitBreakerPolicy Policy that defines circuit breaker conditions. - * @return the next definition stage. - */ - Update withCircuitBreakerPolicy(CircuitBreakerPolicy circuitBreakerPolicy); - } - - /** - * The stage of the AppResiliency update allowing to specify httpConnectionPool. - */ - interface WithHttpConnectionPool { - /** - * Specifies the httpConnectionPool property: Defines parameters for http connection pooling. - * - * @param httpConnectionPool Defines parameters for http connection pooling. - * @return the next definition stage. - */ - Update withHttpConnectionPool(HttpConnectionPool httpConnectionPool); - } - - /** - * The stage of the AppResiliency update allowing to specify tcpConnectionPool. - */ - interface WithTcpConnectionPool { - /** - * Specifies the tcpConnectionPool property: Defines parameters for tcp connection pooling. - * - * @param tcpConnectionPool Defines parameters for tcp connection pooling. - * @return the next definition stage. - */ - Update withTcpConnectionPool(TcpConnectionPool tcpConnectionPool); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - AppResiliency refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - AppResiliency refresh(Context context); -} 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 deleted file mode 100644 index 66078d3846bd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencyCollection.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.AppResiliencyInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of AppResiliency policies. - */ -@Fluent -public final class AppResiliencyCollection implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of AppResiliencyCollection class. - */ - public AppResiliencyCollection() { - } - - /** - * 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 AppResiliencyCollection object itself. - */ - public AppResiliencyCollection 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 AppResiliencyCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AppResiliencyCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AppResiliencyCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AppResiliencyCollection if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AppResiliencyCollection. - */ - public static AppResiliencyCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AppResiliencyCollection deserializedAppResiliencyCollection = new AppResiliencyCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> AppResiliencyInner.fromJson(reader1)); - deserializedAppResiliencyCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedAppResiliencyCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAppResiliencyCollection; - }); - } -} 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 deleted file mode 100644 index b9068954f4ac..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Apple.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the Apple provider. - */ -@Fluent -public final class Apple implements JsonSerializable { - /* - * false if the Apple provider should not be enabled despite the set registration; otherwise, - * true. - */ - private Boolean enabled; - - /* - * The configuration settings of the Apple registration. - */ - private AppleRegistration registration; - - /* - * The configuration settings of the login flow. - */ - private LoginScopes login; - - /** - * Creates an instance of Apple class. - */ - public Apple() { - } - - /** - * Get the enabled property: <code>false</code> if the Apple provider should not be enabled despite the - * set registration; otherwise, <code>true</code>. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: <code>false</code> if the Apple provider should not be enabled despite the - * set registration; otherwise, <code>true</code>. - * - * @param enabled the enabled value to set. - * @return the Apple object itself. - */ - public Apple withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the registration property: The configuration settings of the Apple registration. - * - * @return the registration value. - */ - public AppleRegistration registration() { - return this.registration; - } - - /** - * Set the registration property: The configuration settings of the Apple registration. - * - * @param registration the registration value to set. - * @return the Apple object itself. - */ - public Apple withRegistration(AppleRegistration registration) { - this.registration = registration; - return this; - } - - /** - * Get the login property: The configuration settings of the login flow. - * - * @return the login value. - */ - public LoginScopes login() { - return this.login; - } - - /** - * Set the login property: The configuration settings of the login flow. - * - * @param login the login value to set. - * @return the Apple object itself. - */ - public Apple withLogin(LoginScopes login) { - this.login = login; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (registration() != null) { - registration().validate(); - } - if (login() != null) { - login().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeJsonField("registration", this.registration); - jsonWriter.writeJsonField("login", this.login); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Apple from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Apple if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Apple. - */ - public static Apple fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Apple deserializedApple = new Apple(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedApple.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("registration".equals(fieldName)) { - deserializedApple.registration = AppleRegistration.fromJson(reader); - } else if ("login".equals(fieldName)) { - deserializedApple.login = LoginScopes.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedApple; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppleRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppleRegistration.java deleted file mode 100644 index b4a6a7f603bc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppleRegistration.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the registration for the Apple provider. - */ -@Fluent -public final class AppleRegistration implements JsonSerializable { - /* - * The Client ID of the app used for login. - */ - private String clientId; - - /* - * The app setting name that contains the client secret. - */ - private String clientSecretSettingName; - - /** - * Creates an instance of AppleRegistration class. - */ - public AppleRegistration() { - } - - /** - * Get the clientId property: The Client ID of the app used for login. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: The Client ID of the app used for login. - * - * @param clientId the clientId value to set. - * @return the AppleRegistration object itself. - */ - public AppleRegistration withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the clientSecretSettingName property: The app setting name that contains the client secret. - * - * @return the clientSecretSettingName value. - */ - public String clientSecretSettingName() { - return this.clientSecretSettingName; - } - - /** - * Set the clientSecretSettingName property: The app setting name that contains the client secret. - * - * @param clientSecretSettingName the clientSecretSettingName value to set. - * @return the AppleRegistration object itself. - */ - public AppleRegistration withClientSecretSettingName(String clientSecretSettingName) { - this.clientSecretSettingName = clientSecretSettingName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("clientId", this.clientId); - jsonWriter.writeStringField("clientSecretSettingName", this.clientSecretSettingName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AppleRegistration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AppleRegistration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AppleRegistration. - */ - public static AppleRegistration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AppleRegistration deserializedAppleRegistration = new AppleRegistration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("clientId".equals(fieldName)) { - deserializedAppleRegistration.clientId = reader.getString(); - } else if ("clientSecretSettingName".equals(fieldName)) { - deserializedAppleRegistration.clientSecretSettingName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAppleRegistration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Applicability.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Applicability.java deleted file mode 100644 index 6079b7a34e5d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Applicability.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * indicates whether the profile is default for the location. - */ -public final class Applicability extends ExpandableStringEnum { - /** - * Static value LocationDefault for Applicability. - */ - public static final Applicability LOCATION_DEFAULT = fromString("LocationDefault"); - - /** - * Static value Custom for Applicability. - */ - public static final Applicability CUSTOM = fromString("Custom"); - - /** - * Creates a new instance of Applicability value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Applicability() { - } - - /** - * Creates or finds a Applicability from its string representation. - * - * @param name a name to look for. - * @return the corresponding Applicability. - */ - public static Applicability fromString(String name) { - return fromString(name, Applicability.class); - } - - /** - * Gets known Applicability values. - * - * @return known Applicability values. - */ - public static Collection values() { - return values(Applicability.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfig.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfig.java deleted file mode 100644 index 0c8e2faee1f9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfig.java +++ /dev/null @@ -1,388 +0,0 @@ -// Copyright (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.AuthConfigInner; - -/** - * An immutable client-side representation of AuthConfig. - */ -public interface AuthConfig { - /** - * 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 platform property: The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization. - * - * @return the platform value. - */ - AuthPlatform platform(); - - /** - * Gets the globalValidation property: The configuration settings that determines the validation flow of users using - * Service Authentication/Authorization. - * - * @return the globalValidation value. - */ - GlobalValidation globalValidation(); - - /** - * Gets the identityProviders property: The configuration settings of each of the identity providers used to - * configure ContainerApp Service Authentication/Authorization. - * - * @return the identityProviders value. - */ - IdentityProviders identityProviders(); - - /** - * Gets the login property: The configuration settings of the login flow of users using ContainerApp Service - * Authentication/Authorization. - * - * @return the login value. - */ - Login login(); - - /** - * Gets the httpSettings property: The configuration settings of the HTTP requests for authentication and - * authorization requests made against ContainerApp Service Authentication/Authorization. - * - * @return the httpSettings value. - */ - HttpSettings httpSettings(); - - /** - * Gets the encryptionSettings property: The configuration settings of the secrets references of encryption key and - * signing key for ContainerApp Service Authentication/Authorization. - * - * @return the encryptionSettings value. - */ - EncryptionSettings encryptionSettings(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner object. - * - * @return the inner object. - */ - AuthConfigInner innerModel(); - - /** - * The entirety of the AuthConfig definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The AuthConfig definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the AuthConfig definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the AuthConfig definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, containerAppName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @return the next definition stage. - */ - WithCreate withExistingContainerApp(String resourceGroupName, String containerAppName); - } - - /** - * The stage of the AuthConfig 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.WithPlatform, DefinitionStages.WithGlobalValidation, - DefinitionStages.WithIdentityProviders, DefinitionStages.WithLogin, DefinitionStages.WithHttpSettings, - DefinitionStages.WithEncryptionSettings { - /** - * Executes the create request. - * - * @return the created resource. - */ - AuthConfig create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - AuthConfig create(Context context); - } - - /** - * The stage of the AuthConfig definition allowing to specify platform. - */ - interface WithPlatform { - /** - * Specifies the platform property: The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization.. - * - * @param platform The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization. - * @return the next definition stage. - */ - WithCreate withPlatform(AuthPlatform platform); - } - - /** - * The stage of the AuthConfig definition allowing to specify globalValidation. - */ - interface WithGlobalValidation { - /** - * Specifies the globalValidation property: The configuration settings that determines the validation flow - * of users using Service Authentication/Authorization.. - * - * @param globalValidation The configuration settings that determines the validation flow of users using - * Service Authentication/Authorization. - * @return the next definition stage. - */ - WithCreate withGlobalValidation(GlobalValidation globalValidation); - } - - /** - * The stage of the AuthConfig definition allowing to specify identityProviders. - */ - interface WithIdentityProviders { - /** - * Specifies the identityProviders property: The configuration settings of each of the identity providers - * used to configure ContainerApp Service Authentication/Authorization.. - * - * @param identityProviders The configuration settings of each of the identity providers used to configure - * ContainerApp Service Authentication/Authorization. - * @return the next definition stage. - */ - WithCreate withIdentityProviders(IdentityProviders identityProviders); - } - - /** - * The stage of the AuthConfig definition allowing to specify login. - */ - interface WithLogin { - /** - * Specifies the login property: The configuration settings of the login flow of users using ContainerApp - * Service Authentication/Authorization.. - * - * @param login The configuration settings of the login flow of users using ContainerApp Service - * Authentication/Authorization. - * @return the next definition stage. - */ - WithCreate withLogin(Login login); - } - - /** - * The stage of the AuthConfig definition allowing to specify httpSettings. - */ - interface WithHttpSettings { - /** - * Specifies the httpSettings property: The configuration settings of the HTTP requests for authentication - * and authorization requests made against ContainerApp Service Authentication/Authorization.. - * - * @param httpSettings The configuration settings of the HTTP requests for authentication and authorization - * requests made against ContainerApp Service Authentication/Authorization. - * @return the next definition stage. - */ - WithCreate withHttpSettings(HttpSettings httpSettings); - } - - /** - * The stage of the AuthConfig definition allowing to specify encryptionSettings. - */ - interface WithEncryptionSettings { - /** - * Specifies the encryptionSettings property: The configuration settings of the secrets references of - * encryption key and signing key for ContainerApp Service Authentication/Authorization.. - * - * @param encryptionSettings The configuration settings of the secrets references of encryption key and - * signing key for ContainerApp Service Authentication/Authorization. - * @return the next definition stage. - */ - WithCreate withEncryptionSettings(EncryptionSettings encryptionSettings); - } - } - - /** - * Begins update for the AuthConfig resource. - * - * @return the stage of resource update. - */ - AuthConfig.Update update(); - - /** - * The template for AuthConfig update. - */ - interface Update - extends UpdateStages.WithPlatform, UpdateStages.WithGlobalValidation, UpdateStages.WithIdentityProviders, - UpdateStages.WithLogin, UpdateStages.WithHttpSettings, UpdateStages.WithEncryptionSettings { - /** - * Executes the update request. - * - * @return the updated resource. - */ - AuthConfig apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - AuthConfig apply(Context context); - } - - /** - * The AuthConfig update stages. - */ - interface UpdateStages { - /** - * The stage of the AuthConfig update allowing to specify platform. - */ - interface WithPlatform { - /** - * Specifies the platform property: The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization.. - * - * @param platform The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization. - * @return the next definition stage. - */ - Update withPlatform(AuthPlatform platform); - } - - /** - * The stage of the AuthConfig update allowing to specify globalValidation. - */ - interface WithGlobalValidation { - /** - * Specifies the globalValidation property: The configuration settings that determines the validation flow - * of users using Service Authentication/Authorization.. - * - * @param globalValidation The configuration settings that determines the validation flow of users using - * Service Authentication/Authorization. - * @return the next definition stage. - */ - Update withGlobalValidation(GlobalValidation globalValidation); - } - - /** - * The stage of the AuthConfig update allowing to specify identityProviders. - */ - interface WithIdentityProviders { - /** - * Specifies the identityProviders property: The configuration settings of each of the identity providers - * used to configure ContainerApp Service Authentication/Authorization.. - * - * @param identityProviders The configuration settings of each of the identity providers used to configure - * ContainerApp Service Authentication/Authorization. - * @return the next definition stage. - */ - Update withIdentityProviders(IdentityProviders identityProviders); - } - - /** - * The stage of the AuthConfig update allowing to specify login. - */ - interface WithLogin { - /** - * Specifies the login property: The configuration settings of the login flow of users using ContainerApp - * Service Authentication/Authorization.. - * - * @param login The configuration settings of the login flow of users using ContainerApp Service - * Authentication/Authorization. - * @return the next definition stage. - */ - Update withLogin(Login login); - } - - /** - * The stage of the AuthConfig update allowing to specify httpSettings. - */ - interface WithHttpSettings { - /** - * Specifies the httpSettings property: The configuration settings of the HTTP requests for authentication - * and authorization requests made against ContainerApp Service Authentication/Authorization.. - * - * @param httpSettings The configuration settings of the HTTP requests for authentication and authorization - * requests made against ContainerApp Service Authentication/Authorization. - * @return the next definition stage. - */ - Update withHttpSettings(HttpSettings httpSettings); - } - - /** - * The stage of the AuthConfig update allowing to specify encryptionSettings. - */ - interface WithEncryptionSettings { - /** - * Specifies the encryptionSettings property: The configuration settings of the secrets references of - * encryption key and signing key for ContainerApp Service Authentication/Authorization.. - * - * @param encryptionSettings The configuration settings of the secrets references of encryption key and - * signing key for ContainerApp Service Authentication/Authorization. - * @return the next definition stage. - */ - Update withEncryptionSettings(EncryptionSettings encryptionSettings); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - AuthConfig refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - AuthConfig refresh(Context context); -} 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 deleted file mode 100644 index 9de58bc2a77d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfigCollection.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; -import java.io.IOException; -import java.util.List; - -/** - * AuthConfig collection ARM resource. - */ -@Fluent -public final class AuthConfigCollection implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of AuthConfigCollection class. - */ - public AuthConfigCollection() { - } - - /** - * 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 AuthConfigCollection object itself. - */ - public AuthConfigCollection 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 AuthConfigCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AuthConfigCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AuthConfigCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AuthConfigCollection if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AuthConfigCollection. - */ - public static AuthConfigCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AuthConfigCollection deserializedAuthConfigCollection = new AuthConfigCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> AuthConfigInner.fromJson(reader1)); - deserializedAuthConfigCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedAuthConfigCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAuthConfigCollection; - }); - } -} 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 deleted file mode 100644 index f4dcd11cb443..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthPlatform.java +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the platform of ContainerApp Service Authentication/Authorization. - */ -@Fluent -public final class AuthPlatform implements JsonSerializable { - /* - * true if the Authentication / Authorization feature is enabled for the current app; otherwise, - * false. - */ - 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. - */ - private String runtimeVersion; - - /** - * Creates an instance of AuthPlatform class. - */ - public AuthPlatform() { - } - - /** - * Get the enabled property: <code>true</code> if the Authentication / Authorization feature is enabled - * for the current app; otherwise, <code>false</code>. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: <code>true</code> if the Authentication / Authorization feature is enabled - * for the current app; otherwise, <code>false</code>. - * - * @param enabled the enabled value to set. - * @return the AuthPlatform object itself. - */ - public AuthPlatform withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the runtimeVersion property: 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. - * - * @return the runtimeVersion value. - */ - public String runtimeVersion() { - return this.runtimeVersion; - } - - /** - * Set the runtimeVersion property: 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. - * - * @param runtimeVersion the runtimeVersion value to set. - * @return the AuthPlatform object itself. - */ - public AuthPlatform withRuntimeVersion(String runtimeVersion) { - this.runtimeVersion = runtimeVersion; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeStringField("runtimeVersion", this.runtimeVersion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AuthPlatform from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AuthPlatform if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AuthPlatform. - */ - public static AuthPlatform fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AuthPlatform deserializedAuthPlatform = new AuthPlatform(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedAuthPlatform.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("runtimeVersion".equals(fieldName)) { - deserializedAuthPlatform.runtimeVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAuthPlatform; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableOperations.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableOperations.java deleted file mode 100644 index 6eb3b999e571..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableOperations.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -import java.io.IOException; -import java.util.List; - -/** - * Available operations of the service. - */ -@Fluent -public final class AvailableOperations implements JsonSerializable { - /* - * Collection of available operation details - */ - private List value; - - /* - * URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - */ - private String nextLink; - - /** - * Creates an instance of AvailableOperations class. - */ - public AvailableOperations() { - } - - /** - * Get the value property: Collection of available operation details. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of available operation details. - * - * @param value the value value to set. - * @return the AvailableOperations object itself. - */ - public AvailableOperations withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: URL client should use to fetch the next page (per server side paging). - * It's null for now, added for future use. - * - * @param nextLink the nextLink value to set. - * @return the AvailableOperations object itself. - */ - public AvailableOperations withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AvailableOperations from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AvailableOperations if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AvailableOperations. - */ - public static AvailableOperations fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AvailableOperations deserializedAvailableOperations = new AvailableOperations(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> OperationDetailInner.fromJson(reader1)); - deserializedAvailableOperations.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedAvailableOperations.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAvailableOperations; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfile.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfile.java deleted file mode 100644 index 453036211ae0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfile.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.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; - -/** - * An immutable client-side representation of AvailableWorkloadProfile. - */ -public interface AvailableWorkloadProfile { - /** - * 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: Region of the workload profile. - * - * @return the location value. - */ - String location(); - - /** - * Gets the properties property: Revision resource specific properties. - * - * @return the properties value. - */ - AvailableWorkloadProfileProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner object. - * - * @return the inner object. - */ - AvailableWorkloadProfileInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfileProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfileProperties.java deleted file mode 100644 index 74b6db89dc2a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfileProperties.java +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Revision resource specific properties. - */ -@Fluent -public final class AvailableWorkloadProfileProperties implements JsonSerializable { - /* - * Used to categorize workload profiles. - */ - private String category; - - /* - * indicates whether the profile is default for the location. - */ - private Applicability applicability; - - /* - * Number of cores in CPU. - */ - private Integer cores; - - /* - * Memory in GiB. - */ - private Integer memoryGiB; - - /* - * Number of GPUs. - */ - private Integer gpus; - - /* - * The everyday name of the workload profile. - */ - private String displayName; - - /** - * Creates an instance of AvailableWorkloadProfileProperties class. - */ - public AvailableWorkloadProfileProperties() { - } - - /** - * Get the category property: Used to categorize workload profiles. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: Used to categorize workload profiles. - * - * @param category the category value to set. - * @return the AvailableWorkloadProfileProperties object itself. - */ - public AvailableWorkloadProfileProperties withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the applicability property: indicates whether the profile is default for the location. - * - * @return the applicability value. - */ - public Applicability applicability() { - return this.applicability; - } - - /** - * Set the applicability property: indicates whether the profile is default for the location. - * - * @param applicability the applicability value to set. - * @return the AvailableWorkloadProfileProperties object itself. - */ - public AvailableWorkloadProfileProperties withApplicability(Applicability applicability) { - this.applicability = applicability; - return this; - } - - /** - * Get the cores property: Number of cores in CPU. - * - * @return the cores value. - */ - public Integer cores() { - return this.cores; - } - - /** - * Set the cores property: Number of cores in CPU. - * - * @param cores the cores value to set. - * @return the AvailableWorkloadProfileProperties object itself. - */ - public AvailableWorkloadProfileProperties withCores(Integer cores) { - this.cores = cores; - return this; - } - - /** - * Get the memoryGiB property: Memory in GiB. - * - * @return the memoryGiB value. - */ - public Integer memoryGiB() { - return this.memoryGiB; - } - - /** - * Set the memoryGiB property: Memory in GiB. - * - * @param memoryGiB the memoryGiB value to set. - * @return the AvailableWorkloadProfileProperties object itself. - */ - public AvailableWorkloadProfileProperties withMemoryGiB(Integer memoryGiB) { - this.memoryGiB = memoryGiB; - return this; - } - - /** - * Get the gpus property: Number of GPUs. - * - * @return the gpus value. - */ - public Integer gpus() { - return this.gpus; - } - - /** - * Set the gpus property: Number of GPUs. - * - * @param gpus the gpus value to set. - * @return the AvailableWorkloadProfileProperties object itself. - */ - public AvailableWorkloadProfileProperties withGpus(Integer gpus) { - this.gpus = gpus; - return this; - } - - /** - * Get the displayName property: The everyday name of the workload profile. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The everyday name of the workload profile. - * - * @param displayName the displayName value to set. - * @return the AvailableWorkloadProfileProperties object itself. - */ - public AvailableWorkloadProfileProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", this.category); - jsonWriter.writeStringField("applicability", this.applicability == null ? null : this.applicability.toString()); - jsonWriter.writeNumberField("cores", this.cores); - jsonWriter.writeNumberField("memoryGiB", this.memoryGiB); - jsonWriter.writeNumberField("gpus", this.gpus); - jsonWriter.writeStringField("displayName", this.displayName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AvailableWorkloadProfileProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AvailableWorkloadProfileProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AvailableWorkloadProfileProperties. - */ - public static AvailableWorkloadProfileProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AvailableWorkloadProfileProperties deserializedAvailableWorkloadProfileProperties - = new AvailableWorkloadProfileProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedAvailableWorkloadProfileProperties.category = reader.getString(); - } else if ("applicability".equals(fieldName)) { - deserializedAvailableWorkloadProfileProperties.applicability - = Applicability.fromString(reader.getString()); - } else if ("cores".equals(fieldName)) { - deserializedAvailableWorkloadProfileProperties.cores = reader.getNullable(JsonReader::getInt); - } else if ("memoryGiB".equals(fieldName)) { - deserializedAvailableWorkloadProfileProperties.memoryGiB = reader.getNullable(JsonReader::getInt); - } else if ("gpus".equals(fieldName)) { - deserializedAvailableWorkloadProfileProperties.gpus = reader.getNullable(JsonReader::getInt); - } else if ("displayName".equals(fieldName)) { - deserializedAvailableWorkloadProfileProperties.displayName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAvailableWorkloadProfileProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfiles.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfiles.java deleted file mode 100644 index e31a39b02d69..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfiles.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.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of AvailableWorkloadProfiles. - */ -public interface AvailableWorkloadProfiles { - /** - * Get available workload profiles by location. - * - * Get all available workload profiles for a location. - * - * @param location The name of Azure region. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all available workload profiles for a location as paginated response with {@link PagedIterable}. - */ - PagedIterable get(String location); - - /** - * Get available workload profiles by location. - * - * Get all available workload profiles for a location. - * - * @param location The name of Azure region. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all available workload profiles for a location as paginated response with {@link PagedIterable}. - */ - PagedIterable get(String location, Context context); -} 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 deleted file mode 100644 index 8a7ad74d96ef..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfilesCollection.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of available workload profiles in the location. - */ -@Fluent -public final class AvailableWorkloadProfilesCollection - implements JsonSerializable { - /* - * Collection of workload profiles. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of AvailableWorkloadProfilesCollection class. - */ - public AvailableWorkloadProfilesCollection() { - } - - /** - * Get the value property: Collection of workload profiles. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: Collection of workload profiles. - * - * @param value the value value to set. - * @return the AvailableWorkloadProfilesCollection object itself. - */ - public AvailableWorkloadProfilesCollection 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 AvailableWorkloadProfilesCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(AvailableWorkloadProfilesCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AvailableWorkloadProfilesCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AvailableWorkloadProfilesCollection if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the AvailableWorkloadProfilesCollection. - */ - public static AvailableWorkloadProfilesCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AvailableWorkloadProfilesCollection deserializedAvailableWorkloadProfilesCollection - = new AvailableWorkloadProfilesCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> AvailableWorkloadProfileInner.fromJson(reader1)); - deserializedAvailableWorkloadProfilesCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedAvailableWorkloadProfilesCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAvailableWorkloadProfilesCollection; - }); - } -} 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 deleted file mode 100644 index f25df813cf99..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectory.java +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the Azure Active directory provider. - */ -@Fluent -public final class AzureActiveDirectory implements JsonSerializable { - /* - * false if the Azure Active Directory provider should not be enabled despite the set registration; - * otherwise, true. - */ - private Boolean enabled; - - /* - * The configuration settings of the Azure Active Directory app registration. - */ - private AzureActiveDirectoryRegistration registration; - - /* - * The configuration settings of the Azure Active Directory login flow. - */ - private AzureActiveDirectoryLogin login; - - /* - * The configuration settings of the Azure Active Directory token validation flow. - */ - private AzureActiveDirectoryValidation validation; - - /* - * Gets a value indicating whether the Azure AD configuration was auto-provisioned using 1st party tooling. - * This is an internal flag primarily intended to support the Azure Management Portal. Users should not - * read or write to this property. - */ - private Boolean isAutoProvisioned; - - /** - * Creates an instance of AzureActiveDirectory class. - */ - public AzureActiveDirectory() { - } - - /** - * Get the enabled property: <code>false</code> if the Azure Active Directory provider should not be - * enabled despite the set registration; otherwise, <code>true</code>. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: <code>false</code> if the Azure Active Directory provider should not be - * enabled despite the set registration; otherwise, <code>true</code>. - * - * @param enabled the enabled value to set. - * @return the AzureActiveDirectory object itself. - */ - public AzureActiveDirectory withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the registration property: The configuration settings of the Azure Active Directory app registration. - * - * @return the registration value. - */ - public AzureActiveDirectoryRegistration registration() { - return this.registration; - } - - /** - * Set the registration property: The configuration settings of the Azure Active Directory app registration. - * - * @param registration the registration value to set. - * @return the AzureActiveDirectory object itself. - */ - public AzureActiveDirectory withRegistration(AzureActiveDirectoryRegistration registration) { - this.registration = registration; - return this; - } - - /** - * Get the login property: The configuration settings of the Azure Active Directory login flow. - * - * @return the login value. - */ - public AzureActiveDirectoryLogin login() { - return this.login; - } - - /** - * Set the login property: The configuration settings of the Azure Active Directory login flow. - * - * @param login the login value to set. - * @return the AzureActiveDirectory object itself. - */ - public AzureActiveDirectory withLogin(AzureActiveDirectoryLogin login) { - this.login = login; - return this; - } - - /** - * Get the validation property: The configuration settings of the Azure Active Directory token validation flow. - * - * @return the validation value. - */ - public AzureActiveDirectoryValidation validation() { - return this.validation; - } - - /** - * Set the validation property: The configuration settings of the Azure Active Directory token validation flow. - * - * @param validation the validation value to set. - * @return the AzureActiveDirectory object itself. - */ - public AzureActiveDirectory withValidation(AzureActiveDirectoryValidation validation) { - this.validation = validation; - return this; - } - - /** - * Get the isAutoProvisioned property: Gets a value indicating whether the Azure AD configuration was - * auto-provisioned using 1st party tooling. - * This is an internal flag primarily intended to support the Azure Management Portal. Users should not - * read or write to this property. - * - * @return the isAutoProvisioned value. - */ - public Boolean isAutoProvisioned() { - return this.isAutoProvisioned; - } - - /** - * Set the isAutoProvisioned property: Gets a value indicating whether the Azure AD configuration was - * auto-provisioned using 1st party tooling. - * This is an internal flag primarily intended to support the Azure Management Portal. Users should not - * read or write to this property. - * - * @param isAutoProvisioned the isAutoProvisioned value to set. - * @return the AzureActiveDirectory object itself. - */ - public AzureActiveDirectory withIsAutoProvisioned(Boolean isAutoProvisioned) { - this.isAutoProvisioned = isAutoProvisioned; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (registration() != null) { - registration().validate(); - } - if (login() != null) { - login().validate(); - } - if (validation() != null) { - validation().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeJsonField("registration", this.registration); - jsonWriter.writeJsonField("login", this.login); - jsonWriter.writeJsonField("validation", this.validation); - jsonWriter.writeBooleanField("isAutoProvisioned", this.isAutoProvisioned); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureActiveDirectory from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureActiveDirectory if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the AzureActiveDirectory. - */ - public static AzureActiveDirectory fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureActiveDirectory deserializedAzureActiveDirectory = new AzureActiveDirectory(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedAzureActiveDirectory.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("registration".equals(fieldName)) { - deserializedAzureActiveDirectory.registration = AzureActiveDirectoryRegistration.fromJson(reader); - } else if ("login".equals(fieldName)) { - deserializedAzureActiveDirectory.login = AzureActiveDirectoryLogin.fromJson(reader); - } else if ("validation".equals(fieldName)) { - deserializedAzureActiveDirectory.validation = AzureActiveDirectoryValidation.fromJson(reader); - } else if ("isAutoProvisioned".equals(fieldName)) { - deserializedAzureActiveDirectory.isAutoProvisioned = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureActiveDirectory; - }); - } -} 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 deleted file mode 100644 index 1e1ba1db43d4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryLogin.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The configuration settings of the Azure Active Directory login flow. - */ -@Fluent -public final class AzureActiveDirectoryLogin implements JsonSerializable { - /* - * Login parameters to send to the OpenID Connect authorization endpoint when - * a user logs in. Each parameter must be in the form "key=value". - */ - private List loginParameters; - - /* - * true if the www-authenticate provider should be omitted from the request; otherwise, - * false. - */ - private Boolean disableWwwAuthenticate; - - /** - * Creates an instance of AzureActiveDirectoryLogin class. - */ - public AzureActiveDirectoryLogin() { - } - - /** - * Get the loginParameters property: Login parameters to send to the OpenID Connect authorization endpoint when - * a user logs in. Each parameter must be in the form "key=value". - * - * @return the loginParameters value. - */ - public List loginParameters() { - return this.loginParameters; - } - - /** - * Set the loginParameters property: Login parameters to send to the OpenID Connect authorization endpoint when - * a user logs in. Each parameter must be in the form "key=value". - * - * @param loginParameters the loginParameters value to set. - * @return the AzureActiveDirectoryLogin object itself. - */ - public AzureActiveDirectoryLogin withLoginParameters(List loginParameters) { - this.loginParameters = loginParameters; - return this; - } - - /** - * 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. - */ - public Boolean disableWwwAuthenticate() { - return this.disableWwwAuthenticate; - } - - /** - * 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. - */ - public AzureActiveDirectoryLogin withDisableWwwAuthenticate(Boolean disableWwwAuthenticate) { - this.disableWwwAuthenticate = disableWwwAuthenticate; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("loginParameters", this.loginParameters, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeBooleanField("disableWWWAuthenticate", this.disableWwwAuthenticate); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureActiveDirectoryLogin from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureActiveDirectoryLogin if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AzureActiveDirectoryLogin. - */ - public static AzureActiveDirectoryLogin fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureActiveDirectoryLogin deserializedAzureActiveDirectoryLogin = new AzureActiveDirectoryLogin(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("loginParameters".equals(fieldName)) { - List loginParameters = reader.readArray(reader1 -> reader1.getString()); - deserializedAzureActiveDirectoryLogin.loginParameters = loginParameters; - } else if ("disableWWWAuthenticate".equals(fieldName)) { - deserializedAzureActiveDirectoryLogin.disableWwwAuthenticate - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureActiveDirectoryLogin; - }); - } -} 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 deleted file mode 100644 index 22e06521cfb9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryRegistration.java +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the Azure Active Directory app registration. - */ -@Fluent -public final class AzureActiveDirectoryRegistration implements JsonSerializable { - /* - * 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}/. - * 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 - */ - private String openIdIssuer; - - /* - * 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 - * other 3rd party OpenID Connect providers. - * More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html - */ - private String clientId; - - /* - * The app setting name that contains the client secret of the relying party application. - */ - private String clientSecretSettingName; - - /* - * 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. - */ - 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 - * a replacement for the Client Secret Certificate Thumbprint. It is also optional. - */ - 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 - * a replacement for the Client Secret Certificate Thumbprint. It is also optional. - */ - private String clientSecretCertificateIssuer; - - /** - * Creates an instance of AzureActiveDirectoryRegistration class. - */ - public AzureActiveDirectoryRegistration() { - } - - /** - * Get the openIdIssuer property: 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}/. - * 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. - * - * @return the openIdIssuer value. - */ - public String openIdIssuer() { - return this.openIdIssuer; - } - - /** - * Set the openIdIssuer property: 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}/. - * 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. - * - * @param openIdIssuer the openIdIssuer value to set. - * @return the AzureActiveDirectoryRegistration object itself. - */ - public AzureActiveDirectoryRegistration withOpenIdIssuer(String openIdIssuer) { - this.openIdIssuer = openIdIssuer; - return this; - } - - /** - * Get the clientId property: 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 - * other 3rd party OpenID Connect providers. - * More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: 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 - * other 3rd party OpenID Connect providers. - * More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html. - * - * @param clientId the clientId value to set. - * @return the AzureActiveDirectoryRegistration object itself. - */ - public AzureActiveDirectoryRegistration withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the clientSecretSettingName property: The app setting name that contains the client secret of the relying - * party application. - * - * @return the clientSecretSettingName value. - */ - public String clientSecretSettingName() { - return this.clientSecretSettingName; - } - - /** - * Set the clientSecretSettingName property: The app setting name that contains the client secret of the relying - * party application. - * - * @param clientSecretSettingName the clientSecretSettingName value to set. - * @return the AzureActiveDirectoryRegistration object itself. - */ - public AzureActiveDirectoryRegistration withClientSecretSettingName(String clientSecretSettingName) { - this.clientSecretSettingName = clientSecretSettingName; - return this; - } - - /** - * Get the clientSecretCertificateThumbprint property: 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. - * - * @return the clientSecretCertificateThumbprint value. - */ - public String clientSecretCertificateThumbprint() { - return this.clientSecretCertificateThumbprint; - } - - /** - * Set the clientSecretCertificateThumbprint property: 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. - * - * @param clientSecretCertificateThumbprint the clientSecretCertificateThumbprint value to set. - * @return the AzureActiveDirectoryRegistration object itself. - */ - public AzureActiveDirectoryRegistration - withClientSecretCertificateThumbprint(String clientSecretCertificateThumbprint) { - this.clientSecretCertificateThumbprint = clientSecretCertificateThumbprint; - return this; - } - - /** - * Get the clientSecretCertificateSubjectAlternativeName property: 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. - * - * @return the clientSecretCertificateSubjectAlternativeName value. - */ - public String clientSecretCertificateSubjectAlternativeName() { - return this.clientSecretCertificateSubjectAlternativeName; - } - - /** - * Set the clientSecretCertificateSubjectAlternativeName property: 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. - * - * @param clientSecretCertificateSubjectAlternativeName the clientSecretCertificateSubjectAlternativeName value to - * set. - * @return the AzureActiveDirectoryRegistration object itself. - */ - public AzureActiveDirectoryRegistration - withClientSecretCertificateSubjectAlternativeName(String clientSecretCertificateSubjectAlternativeName) { - this.clientSecretCertificateSubjectAlternativeName = clientSecretCertificateSubjectAlternativeName; - return this; - } - - /** - * Get the clientSecretCertificateIssuer property: 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. - * - * @return the clientSecretCertificateIssuer value. - */ - public String clientSecretCertificateIssuer() { - return this.clientSecretCertificateIssuer; - } - - /** - * Set the clientSecretCertificateIssuer property: 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. - * - * @param clientSecretCertificateIssuer the clientSecretCertificateIssuer value to set. - * @return the AzureActiveDirectoryRegistration object itself. - */ - public AzureActiveDirectoryRegistration withClientSecretCertificateIssuer(String clientSecretCertificateIssuer) { - this.clientSecretCertificateIssuer = clientSecretCertificateIssuer; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("openIdIssuer", this.openIdIssuer); - jsonWriter.writeStringField("clientId", this.clientId); - jsonWriter.writeStringField("clientSecretSettingName", this.clientSecretSettingName); - jsonWriter.writeStringField("clientSecretCertificateThumbprint", this.clientSecretCertificateThumbprint); - jsonWriter.writeStringField("clientSecretCertificateSubjectAlternativeName", - this.clientSecretCertificateSubjectAlternativeName); - jsonWriter.writeStringField("clientSecretCertificateIssuer", this.clientSecretCertificateIssuer); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureActiveDirectoryRegistration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureActiveDirectoryRegistration if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AzureActiveDirectoryRegistration. - */ - public static AzureActiveDirectoryRegistration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureActiveDirectoryRegistration deserializedAzureActiveDirectoryRegistration - = new AzureActiveDirectoryRegistration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("openIdIssuer".equals(fieldName)) { - deserializedAzureActiveDirectoryRegistration.openIdIssuer = reader.getString(); - } else if ("clientId".equals(fieldName)) { - deserializedAzureActiveDirectoryRegistration.clientId = reader.getString(); - } else if ("clientSecretSettingName".equals(fieldName)) { - deserializedAzureActiveDirectoryRegistration.clientSecretSettingName = reader.getString(); - } else if ("clientSecretCertificateThumbprint".equals(fieldName)) { - deserializedAzureActiveDirectoryRegistration.clientSecretCertificateThumbprint = reader.getString(); - } else if ("clientSecretCertificateSubjectAlternativeName".equals(fieldName)) { - deserializedAzureActiveDirectoryRegistration.clientSecretCertificateSubjectAlternativeName - = reader.getString(); - } else if ("clientSecretCertificateIssuer".equals(fieldName)) { - deserializedAzureActiveDirectoryRegistration.clientSecretCertificateIssuer = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureActiveDirectoryRegistration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryValidation.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryValidation.java deleted file mode 100644 index 1bc671179aeb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryValidation.java +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The configuration settings of the Azure Active Directory token validation flow. - */ -@Fluent -public final class AzureActiveDirectoryValidation implements JsonSerializable { - /* - * The configuration settings of the checks that should be made while validating the JWT Claims. - */ - private JwtClaimChecks jwtClaimChecks; - - /* - * The list of audiences that can make successful authentication/authorization requests. - */ - private List allowedAudiences; - - /* - * The configuration settings of the default authorization policy. - */ - private DefaultAuthorizationPolicy defaultAuthorizationPolicy; - - /** - * Creates an instance of AzureActiveDirectoryValidation class. - */ - public AzureActiveDirectoryValidation() { - } - - /** - * Get the jwtClaimChecks property: The configuration settings of the checks that should be made while validating - * the JWT Claims. - * - * @return the jwtClaimChecks value. - */ - public JwtClaimChecks jwtClaimChecks() { - return this.jwtClaimChecks; - } - - /** - * Set the jwtClaimChecks property: The configuration settings of the checks that should be made while validating - * the JWT Claims. - * - * @param jwtClaimChecks the jwtClaimChecks value to set. - * @return the AzureActiveDirectoryValidation object itself. - */ - public AzureActiveDirectoryValidation withJwtClaimChecks(JwtClaimChecks jwtClaimChecks) { - this.jwtClaimChecks = jwtClaimChecks; - return this; - } - - /** - * Get the allowedAudiences property: The list of audiences that can make successful authentication/authorization - * requests. - * - * @return the allowedAudiences value. - */ - public List allowedAudiences() { - return this.allowedAudiences; - } - - /** - * Set the allowedAudiences property: The list of audiences that can make successful authentication/authorization - * requests. - * - * @param allowedAudiences the allowedAudiences value to set. - * @return the AzureActiveDirectoryValidation object itself. - */ - public AzureActiveDirectoryValidation withAllowedAudiences(List allowedAudiences) { - this.allowedAudiences = allowedAudiences; - return this; - } - - /** - * Get the defaultAuthorizationPolicy property: The configuration settings of the default authorization policy. - * - * @return the defaultAuthorizationPolicy value. - */ - public DefaultAuthorizationPolicy defaultAuthorizationPolicy() { - return this.defaultAuthorizationPolicy; - } - - /** - * Set the defaultAuthorizationPolicy property: The configuration settings of the default authorization policy. - * - * @param defaultAuthorizationPolicy the defaultAuthorizationPolicy value to set. - * @return the AzureActiveDirectoryValidation object itself. - */ - public AzureActiveDirectoryValidation - withDefaultAuthorizationPolicy(DefaultAuthorizationPolicy defaultAuthorizationPolicy) { - this.defaultAuthorizationPolicy = defaultAuthorizationPolicy; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (jwtClaimChecks() != null) { - jwtClaimChecks().validate(); - } - if (defaultAuthorizationPolicy() != null) { - defaultAuthorizationPolicy().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("jwtClaimChecks", this.jwtClaimChecks); - jsonWriter.writeArrayField("allowedAudiences", this.allowedAudiences, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("defaultAuthorizationPolicy", this.defaultAuthorizationPolicy); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureActiveDirectoryValidation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureActiveDirectoryValidation if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AzureActiveDirectoryValidation. - */ - public static AzureActiveDirectoryValidation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureActiveDirectoryValidation deserializedAzureActiveDirectoryValidation - = new AzureActiveDirectoryValidation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("jwtClaimChecks".equals(fieldName)) { - deserializedAzureActiveDirectoryValidation.jwtClaimChecks = JwtClaimChecks.fromJson(reader); - } else if ("allowedAudiences".equals(fieldName)) { - List allowedAudiences = reader.readArray(reader1 -> reader1.getString()); - deserializedAzureActiveDirectoryValidation.allowedAudiences = allowedAudiences; - } else if ("defaultAuthorizationPolicy".equals(fieldName)) { - deserializedAzureActiveDirectoryValidation.defaultAuthorizationPolicy - = DefaultAuthorizationPolicy.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureActiveDirectoryValidation; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureCredentials.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureCredentials.java deleted file mode 100644 index 77df7e871075..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureCredentials.java +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container App credentials. - */ -@Fluent -public final class AzureCredentials implements JsonSerializable { - /* - * Client Id. - */ - private String clientId; - - /* - * Client Secret. - */ - private String clientSecret; - - /* - * Tenant Id. - */ - private String tenantId; - - /* - * Kind of auth github does for deploying the template - */ - private String kind; - - /* - * Subscription Id. - */ - private String subscriptionId; - - /** - * Creates an instance of AzureCredentials class. - */ - public AzureCredentials() { - } - - /** - * Get the clientId property: Client Id. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: Client Id. - * - * @param clientId the clientId value to set. - * @return the AzureCredentials object itself. - */ - public AzureCredentials withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the clientSecret property: Client Secret. - * - * @return the clientSecret value. - */ - public String clientSecret() { - return this.clientSecret; - } - - /** - * Set the clientSecret property: Client Secret. - * - * @param clientSecret the clientSecret value to set. - * @return the AzureCredentials object itself. - */ - public AzureCredentials withClientSecret(String clientSecret) { - this.clientSecret = clientSecret; - return this; - } - - /** - * Get the tenantId property: Tenant Id. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: Tenant Id. - * - * @param tenantId the tenantId value to set. - * @return the AzureCredentials object itself. - */ - public AzureCredentials withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the kind property: Kind of auth github does for deploying the template. - * - * @return the kind value. - */ - public String kind() { - return this.kind; - } - - /** - * Set the kind property: Kind of auth github does for deploying the template. - * - * @param kind the kind value to set. - * @return the AzureCredentials object itself. - */ - public AzureCredentials withKind(String kind) { - this.kind = kind; - return this; - } - - /** - * Get the subscriptionId property: Subscription Id. - * - * @return the subscriptionId value. - */ - public String subscriptionId() { - return this.subscriptionId; - } - - /** - * Set the subscriptionId property: Subscription Id. - * - * @param subscriptionId the subscriptionId value to set. - * @return the AzureCredentials object itself. - */ - public AzureCredentials withSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("clientId", this.clientId); - jsonWriter.writeStringField("clientSecret", this.clientSecret); - jsonWriter.writeStringField("tenantId", this.tenantId); - jsonWriter.writeStringField("kind", this.kind); - jsonWriter.writeStringField("subscriptionId", this.subscriptionId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureCredentials from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureCredentials if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AzureCredentials. - */ - public static AzureCredentials fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureCredentials deserializedAzureCredentials = new AzureCredentials(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("clientId".equals(fieldName)) { - deserializedAzureCredentials.clientId = reader.getString(); - } else if ("clientSecret".equals(fieldName)) { - deserializedAzureCredentials.clientSecret = reader.getString(); - } else if ("tenantId".equals(fieldName)) { - deserializedAzureCredentials.tenantId = reader.getString(); - } else if ("kind".equals(fieldName)) { - deserializedAzureCredentials.kind = reader.getString(); - } else if ("subscriptionId".equals(fieldName)) { - deserializedAzureCredentials.subscriptionId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureCredentials; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureFileProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureFileProperties.java deleted file mode 100644 index 0686a9939013..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureFileProperties.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Azure File Properties. - */ -@Fluent -public final class AzureFileProperties implements JsonSerializable { - /* - * Storage account name for azure file. - */ - private String accountName; - - /* - * Storage account key for azure file. - */ - private String accountKey; - - /* - * Access mode for storage - */ - private AccessMode accessMode; - - /* - * Azure file share name. - */ - private String shareName; - - /** - * Creates an instance of AzureFileProperties class. - */ - public AzureFileProperties() { - } - - /** - * Get the accountName property: Storage account name for azure file. - * - * @return the accountName value. - */ - public String accountName() { - return this.accountName; - } - - /** - * Set the accountName property: Storage account name for azure file. - * - * @param accountName the accountName value to set. - * @return the AzureFileProperties object itself. - */ - public AzureFileProperties withAccountName(String accountName) { - this.accountName = accountName; - return this; - } - - /** - * Get the accountKey property: Storage account key for azure file. - * - * @return the accountKey value. - */ - public String accountKey() { - return this.accountKey; - } - - /** - * Set the accountKey property: Storage account key for azure file. - * - * @param accountKey the accountKey value to set. - * @return the AzureFileProperties object itself. - */ - public AzureFileProperties withAccountKey(String accountKey) { - this.accountKey = accountKey; - return this; - } - - /** - * Get the accessMode property: Access mode for storage. - * - * @return the accessMode value. - */ - public AccessMode accessMode() { - return this.accessMode; - } - - /** - * Set the accessMode property: Access mode for storage. - * - * @param accessMode the accessMode value to set. - * @return the AzureFileProperties object itself. - */ - public AzureFileProperties withAccessMode(AccessMode accessMode) { - this.accessMode = accessMode; - return this; - } - - /** - * Get the shareName property: Azure file share name. - * - * @return the shareName value. - */ - public String shareName() { - return this.shareName; - } - - /** - * Set the shareName property: Azure file share name. - * - * @param shareName the shareName value to set. - * @return the AzureFileProperties object itself. - */ - public AzureFileProperties withShareName(String shareName) { - this.shareName = shareName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("accountName", this.accountName); - jsonWriter.writeStringField("accountKey", this.accountKey); - jsonWriter.writeStringField("accessMode", this.accessMode == null ? null : this.accessMode.toString()); - jsonWriter.writeStringField("shareName", this.shareName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureFileProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureFileProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AzureFileProperties. - */ - public static AzureFileProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureFileProperties deserializedAzureFileProperties = new AzureFileProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("accountName".equals(fieldName)) { - deserializedAzureFileProperties.accountName = reader.getString(); - } else if ("accountKey".equals(fieldName)) { - deserializedAzureFileProperties.accountKey = reader.getString(); - } else if ("accessMode".equals(fieldName)) { - deserializedAzureFileProperties.accessMode = AccessMode.fromString(reader.getString()); - } else if ("shareName".equals(fieldName)) { - deserializedAzureFileProperties.shareName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureFileProperties; - }); - } -} 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 deleted file mode 100644 index eab53181b19d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebApps.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the Azure Static Web Apps provider. - */ -@Fluent -public final class AzureStaticWebApps implements JsonSerializable { - /* - * false if the Azure Static Web Apps provider should not be enabled despite the set registration; - * otherwise, true. - */ - private Boolean enabled; - - /* - * The configuration settings of the Azure Static Web Apps registration. - */ - private AzureStaticWebAppsRegistration registration; - - /** - * Creates an instance of AzureStaticWebApps class. - */ - public AzureStaticWebApps() { - } - - /** - * Get the enabled property: <code>false</code> if the Azure Static Web Apps provider should not be - * enabled despite the set registration; otherwise, <code>true</code>. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: <code>false</code> if the Azure Static Web Apps provider should not be - * enabled despite the set registration; otherwise, <code>true</code>. - * - * @param enabled the enabled value to set. - * @return the AzureStaticWebApps object itself. - */ - public AzureStaticWebApps withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the registration property: The configuration settings of the Azure Static Web Apps registration. - * - * @return the registration value. - */ - public AzureStaticWebAppsRegistration registration() { - return this.registration; - } - - /** - * Set the registration property: The configuration settings of the Azure Static Web Apps registration. - * - * @param registration the registration value to set. - * @return the AzureStaticWebApps object itself. - */ - public AzureStaticWebApps withRegistration(AzureStaticWebAppsRegistration registration) { - this.registration = registration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (registration() != null) { - registration().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeJsonField("registration", this.registration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureStaticWebApps from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureStaticWebApps if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the AzureStaticWebApps. - */ - public static AzureStaticWebApps fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureStaticWebApps deserializedAzureStaticWebApps = new AzureStaticWebApps(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedAzureStaticWebApps.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("registration".equals(fieldName)) { - deserializedAzureStaticWebApps.registration = AzureStaticWebAppsRegistration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureStaticWebApps; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebAppsRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebAppsRegistration.java deleted file mode 100644 index b73438252fbd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebAppsRegistration.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the registration for the Azure Static Web Apps provider. - */ -@Fluent -public final class AzureStaticWebAppsRegistration implements JsonSerializable { - /* - * The Client ID of the app used for login. - */ - private String clientId; - - /** - * Creates an instance of AzureStaticWebAppsRegistration class. - */ - public AzureStaticWebAppsRegistration() { - } - - /** - * Get the clientId property: The Client ID of the app used for login. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: The Client ID of the app used for login. - * - * @param clientId the clientId value to set. - * @return the AzureStaticWebAppsRegistration object itself. - */ - public AzureStaticWebAppsRegistration withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("clientId", this.clientId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of AzureStaticWebAppsRegistration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of AzureStaticWebAppsRegistration if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the AzureStaticWebAppsRegistration. - */ - public static AzureStaticWebAppsRegistration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - AzureStaticWebAppsRegistration deserializedAzureStaticWebAppsRegistration - = new AzureStaticWebAppsRegistration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("clientId".equals(fieldName)) { - deserializedAzureStaticWebAppsRegistration.clientId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedAzureStaticWebAppsRegistration; - }); - } -} 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 deleted file mode 100644 index 01e7df04856b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java +++ /dev/null @@ -1,306 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Container App base container definition. - */ -@Fluent -public class BaseContainer implements JsonSerializable { - /* - * Container image tag. - */ - 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. - */ - private ImageType imageType; - - /* - * Custom container name. - */ - private String name; - - /* - * Container start command. - */ - private List command; - - /* - * Container start command arguments. - */ - private List args; - - /* - * Container environment variables. - */ - private List env; - - /* - * Container resource requirements. - */ - private ContainerResources resources; - - /* - * Container volume mounts. - */ - private List volumeMounts; - - /** - * Creates an instance of BaseContainer class. - */ - public BaseContainer() { - } - - /** - * 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 BaseContainer object itself. - */ - public BaseContainer withImage(String image) { - this.image = 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. - * - * @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 BaseContainer object itself. - */ - public BaseContainer 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 BaseContainer object itself. - */ - public BaseContainer 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 BaseContainer object itself. - */ - public BaseContainer 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 BaseContainer object itself. - */ - public BaseContainer withEnv(List env) { - this.env = env; - return this; - } - - /** - * Get the resources property: Container resource requirements. - * - * @return the resources value. - */ - public ContainerResources resources() { - return this.resources; - } - - /** - * Set the resources property: Container resource requirements. - * - * @param resources the resources value to set. - * @return the BaseContainer object itself. - */ - public BaseContainer withResources(ContainerResources resources) { - this.resources = resources; - return this; - } - - /** - * Get the volumeMounts property: Container volume mounts. - * - * @return the volumeMounts value. - */ - public List volumeMounts() { - return this.volumeMounts; - } - - /** - * Set the volumeMounts property: Container volume mounts. - * - * @param volumeMounts the volumeMounts value to set. - * @return the BaseContainer object itself. - */ - public BaseContainer withVolumeMounts(List volumeMounts) { - this.volumeMounts = volumeMounts; - 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(); - } - if (volumeMounts() != null) { - volumeMounts().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("image", this.image); - jsonWriter.writeStringField("imageType", this.imageType == null ? null : this.imageType.toString()); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeArrayField("command", this.command, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("args", this.args, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("env", this.env, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("resources", this.resources); - jsonWriter.writeArrayField("volumeMounts", this.volumeMounts, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BaseContainer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BaseContainer if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the BaseContainer. - */ - public static BaseContainer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BaseContainer deserializedBaseContainer = new BaseContainer(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("image".equals(fieldName)) { - deserializedBaseContainer.image = reader.getString(); - } else if ("imageType".equals(fieldName)) { - deserializedBaseContainer.imageType = ImageType.fromString(reader.getString()); - } else if ("name".equals(fieldName)) { - deserializedBaseContainer.name = reader.getString(); - } else if ("command".equals(fieldName)) { - List command = reader.readArray(reader1 -> reader1.getString()); - deserializedBaseContainer.command = command; - } else if ("args".equals(fieldName)) { - List args = reader.readArray(reader1 -> reader1.getString()); - deserializedBaseContainer.args = args; - } else if ("env".equals(fieldName)) { - List env = reader.readArray(reader1 -> EnvironmentVar.fromJson(reader1)); - deserializedBaseContainer.env = env; - } else if ("resources".equals(fieldName)) { - deserializedBaseContainer.resources = ContainerResources.fromJson(reader); - } else if ("volumeMounts".equals(fieldName)) { - List volumeMounts = reader.readArray(reader1 -> VolumeMount.fromJson(reader1)); - deserializedBaseContainer.volumeMounts = volumeMounts; - } else { - reader.skipChildren(); - } - } - - return deserializedBaseContainer; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.java deleted file mode 100644 index 6168b12be5d2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.java +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (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.management.SystemData; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Billing meter. - */ -@Fluent -public final class BillingMeter implements JsonSerializable { - /* - * Fully qualified resource ID for the resource. Ex - - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{ - * resourceType}/{resourceName} - */ - private String id; - - /* - * The name of the resource - */ - private String name; - - /* - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" - */ - private String type; - - /* - * Azure Resource Manager metadata containing createdBy and modifiedBy information. - */ - private SystemData systemData; - - /* - * Region for the billing meter. - */ - private String location; - - /* - * Revision resource specific properties - */ - private BillingMeterProperties properties; - - /** - * Creates an instance of BillingMeter class. - */ - public BillingMeter() { - } - - /** - * Get the id property: Fully qualified resource ID for the resource. Ex - - * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: The name of the resource. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the type property: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or - * "Microsoft.Storage/storageAccounts". - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * 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 location property: Region for the billing meter. - * - * @return the location value. - */ - public String location() { - return this.location; - } - - /** - * Set the location property: Region for the billing meter. - * - * @param location the location value to set. - * @return the BillingMeter object itself. - */ - public BillingMeter withLocation(String location) { - this.location = location; - return this; - } - - /** - * Get the properties property: Revision resource specific properties. - * - * @return the properties value. - */ - public BillingMeterProperties properties() { - return this.properties; - } - - /** - * Set the properties property: Revision resource specific properties. - * - * @param properties the properties value to set. - * @return the BillingMeter object itself. - */ - public BillingMeter withProperties(BillingMeterProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("location", this.location); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BillingMeter from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BillingMeter if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the BillingMeter. - */ - public static BillingMeter fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BillingMeter deserializedBillingMeter = new BillingMeter(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedBillingMeter.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedBillingMeter.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedBillingMeter.type = reader.getString(); - } else if ("systemData".equals(fieldName)) { - deserializedBillingMeter.systemData = SystemData.fromJson(reader); - } else if ("location".equals(fieldName)) { - deserializedBillingMeter.location = reader.getString(); - } else if ("properties".equals(fieldName)) { - deserializedBillingMeter.properties = BillingMeterProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBillingMeter; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterCollection.java deleted file mode 100644 index 7a5c5cf99169..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterCollection.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.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; -import java.util.List; - -/** - * An immutable client-side representation of BillingMeterCollection. - */ -public interface BillingMeterCollection { - /** - * Gets the value property: Collection of billing meters. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner object. - * - * @return the inner object. - */ - BillingMeterCollectionInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterProperties.java deleted file mode 100644 index 054d2c687414..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterProperties.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Revision resource specific properties. - */ -@Fluent -public final class BillingMeterProperties implements JsonSerializable { - /* - * Used to categorize billing meters. - */ - private String category; - - /* - * Billing meter type. - */ - private String meterType; - - /* - * The everyday name of the billing meter. - */ - private String displayName; - - /** - * Creates an instance of BillingMeterProperties class. - */ - public BillingMeterProperties() { - } - - /** - * Get the category property: Used to categorize billing meters. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Set the category property: Used to categorize billing meters. - * - * @param category the category value to set. - * @return the BillingMeterProperties object itself. - */ - public BillingMeterProperties withCategory(String category) { - this.category = category; - return this; - } - - /** - * Get the meterType property: Billing meter type. - * - * @return the meterType value. - */ - public String meterType() { - return this.meterType; - } - - /** - * Set the meterType property: Billing meter type. - * - * @param meterType the meterType value to set. - * @return the BillingMeterProperties object itself. - */ - public BillingMeterProperties withMeterType(String meterType) { - this.meterType = meterType; - return this; - } - - /** - * Get the displayName property: The everyday name of the billing meter. - * - * @return the displayName value. - */ - public String displayName() { - return this.displayName; - } - - /** - * Set the displayName property: The everyday name of the billing meter. - * - * @param displayName the displayName value to set. - * @return the BillingMeterProperties object itself. - */ - public BillingMeterProperties withDisplayName(String displayName) { - this.displayName = displayName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("category", this.category); - jsonWriter.writeStringField("meterType", this.meterType); - jsonWriter.writeStringField("displayName", this.displayName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BillingMeterProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BillingMeterProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the BillingMeterProperties. - */ - public static BillingMeterProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BillingMeterProperties deserializedBillingMeterProperties = new BillingMeterProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("category".equals(fieldName)) { - deserializedBillingMeterProperties.category = reader.getString(); - } else if ("meterType".equals(fieldName)) { - deserializedBillingMeterProperties.meterType = reader.getString(); - } else if ("displayName".equals(fieldName)) { - deserializedBillingMeterProperties.displayName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBillingMeterProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeters.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeters.java deleted file mode 100644 index a993eeac3855..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeters.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.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of BillingMeters. - */ -public interface BillingMeters { - /** - * Get billing meters by location. - * - * Get all billingMeters for a location. - * - * @param location The name of Azure region. - * @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 all billingMeters for a location along with {@link Response}. - */ - Response getWithResponse(String location, Context context); - - /** - * Get billing meters by location. - * - * Get all billingMeters for a location. - * - * @param location The name of Azure region. - * @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 all billingMeters for a location. - */ - BillingMeterCollection get(String location); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BindingType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BindingType.java deleted file mode 100644 index 242450df7347..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BindingType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Custom Domain binding type. - */ -public final class BindingType extends ExpandableStringEnum { - /** - * Static value Disabled for BindingType. - */ - public static final BindingType DISABLED = fromString("Disabled"); - - /** - * Static value SniEnabled for BindingType. - */ - public static final BindingType SNI_ENABLED = fromString("SniEnabled"); - - /** - * Creates a new instance of BindingType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BindingType() { - } - - /** - * Creates or finds a BindingType from its string representation. - * - * @param name a name to look for. - * @return the corresponding BindingType. - */ - public static BindingType fromString(String name) { - return fromString(name, BindingType.class); - } - - /** - * Gets known BindingType values. - * - * @return known BindingType values. - */ - public static Collection values() { - return values(BindingType.class); - } -} 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 deleted file mode 100644 index 9f0c27bd913c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BlobStorageTokenStore.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the storage of the tokens if blob storage is used. - */ -@Fluent -public final class BlobStorageTokenStore implements JsonSerializable { - /* - * The name of the app secrets containing the SAS URL of the blob storage containing the tokens. - */ - private String sasUrlSettingName; - - /** - * Creates an instance of BlobStorageTokenStore class. - */ - public BlobStorageTokenStore() { - } - - /** - * Get the sasUrlSettingName property: The name of the app secrets containing the SAS URL of the blob storage - * containing the tokens. - * - * @return the sasUrlSettingName value. - */ - public String sasUrlSettingName() { - return this.sasUrlSettingName; - } - - /** - * Set the sasUrlSettingName property: The name of the app secrets containing the SAS URL of the blob storage - * containing the tokens. - * - * @param sasUrlSettingName the sasUrlSettingName value to set. - * @return the BlobStorageTokenStore object itself. - */ - public BlobStorageTokenStore withSasUrlSettingName(String sasUrlSettingName) { - this.sasUrlSettingName = sasUrlSettingName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (sasUrlSettingName() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property sasUrlSettingName in model BlobStorageTokenStore")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BlobStorageTokenStore.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("sasUrlSettingName", this.sasUrlSettingName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BlobStorageTokenStore from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BlobStorageTokenStore if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BlobStorageTokenStore. - */ - public static BlobStorageTokenStore fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BlobStorageTokenStore deserializedBlobStorageTokenStore = new BlobStorageTokenStore(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("sasUrlSettingName".equals(fieldName)) { - deserializedBlobStorageTokenStore.sasUrlSettingName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBlobStorageTokenStore; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildAuthTokens.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildAuthTokens.java deleted file mode 100644 index ac5dd37d1d4b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildAuthTokens.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.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of BuildAuthTokens. - */ -public interface BuildAuthTokens { - /** - * Gets the token used to connect to the endpoint where source code can be uploaded for a build. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the token used to connect to the endpoint where source code can be uploaded for a build along with - * {@link Response}. - */ - Response listWithResponse(String resourceGroupName, String builderName, String buildName, - Context context); - - /** - * Gets the token used to connect to the endpoint where source code can be uploaded for a build. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the token used to connect to the endpoint where source code can be uploaded for a build. - */ - BuildToken list(String resourceGroupName, String builderName, String buildName); -} 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 deleted file mode 100644 index b0267e90fff9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildCollection.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a BuildResource list operation. - */ -@Fluent -public final class BuildCollection implements JsonSerializable { - /* - * The BuildResource items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of BuildCollection class. - */ - public BuildCollection() { - } - - /** - * Get the value property: The BuildResource items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The BuildResource items on this page. - * - * @param value the value value to set. - * @return the BuildCollection object itself. - */ - public BuildCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the BuildCollection object itself. - */ - public BuildCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model BuildCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BuildCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BuildCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuildCollection if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BuildCollection. - */ - public static BuildCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuildCollection deserializedBuildCollection = new BuildCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> BuildResourceInner.fromJson(reader1)); - deserializedBuildCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedBuildCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBuildCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildConfiguration.java deleted file mode 100644 index bc194ad4c4f9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildConfiguration.java +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Configuration of the build. - */ -@Fluent -public final class BuildConfiguration implements JsonSerializable { - /* - * Base OS used to build and run the app. - */ - private String baseOs; - - /* - * Platform to be used to build and run the app. - */ - private String platform; - - /* - * Platform version to be used to build and run the app. - */ - private String platformVersion; - - /* - * List of environment variables to be passed to the build, secrets should not be used in environment variable. - */ - private List environmentVariables; - - /* - * List of steps to perform before the build. - */ - private List preBuildSteps; - - /** - * Creates an instance of BuildConfiguration class. - */ - public BuildConfiguration() { - } - - /** - * Get the baseOs property: Base OS used to build and run the app. - * - * @return the baseOs value. - */ - public String baseOs() { - return this.baseOs; - } - - /** - * Set the baseOs property: Base OS used to build and run the app. - * - * @param baseOs the baseOs value to set. - * @return the BuildConfiguration object itself. - */ - public BuildConfiguration withBaseOs(String baseOs) { - this.baseOs = baseOs; - return this; - } - - /** - * Get the platform property: Platform to be used to build and run the app. - * - * @return the platform value. - */ - public String platform() { - return this.platform; - } - - /** - * Set the platform property: Platform to be used to build and run the app. - * - * @param platform the platform value to set. - * @return the BuildConfiguration object itself. - */ - public BuildConfiguration withPlatform(String platform) { - this.platform = platform; - return this; - } - - /** - * Get the platformVersion property: Platform version to be used to build and run the app. - * - * @return the platformVersion value. - */ - public String platformVersion() { - return this.platformVersion; - } - - /** - * Set the platformVersion property: Platform version to be used to build and run the app. - * - * @param platformVersion the platformVersion value to set. - * @return the BuildConfiguration object itself. - */ - public BuildConfiguration withPlatformVersion(String platformVersion) { - this.platformVersion = platformVersion; - return this; - } - - /** - * Get the environmentVariables property: List of environment variables to be passed to the build, secrets should - * not be used in environment variable. - * - * @return the environmentVariables value. - */ - public List environmentVariables() { - return this.environmentVariables; - } - - /** - * Set the environmentVariables property: List of environment variables to be passed to the build, secrets should - * not be used in environment variable. - * - * @param environmentVariables the environmentVariables value to set. - * @return the BuildConfiguration object itself. - */ - public BuildConfiguration withEnvironmentVariables(List environmentVariables) { - this.environmentVariables = environmentVariables; - return this; - } - - /** - * Get the preBuildSteps property: List of steps to perform before the build. - * - * @return the preBuildSteps value. - */ - public List preBuildSteps() { - return this.preBuildSteps; - } - - /** - * Set the preBuildSteps property: List of steps to perform before the build. - * - * @param preBuildSteps the preBuildSteps value to set. - * @return the BuildConfiguration object itself. - */ - public BuildConfiguration withPreBuildSteps(List preBuildSteps) { - this.preBuildSteps = preBuildSteps; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (environmentVariables() != null) { - environmentVariables().forEach(e -> e.validate()); - } - if (preBuildSteps() != null) { - preBuildSteps().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("baseOs", this.baseOs); - jsonWriter.writeStringField("platform", this.platform); - jsonWriter.writeStringField("platformVersion", this.platformVersion); - jsonWriter.writeArrayField("environmentVariables", this.environmentVariables, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("preBuildSteps", this.preBuildSteps, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BuildConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuildConfiguration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the BuildConfiguration. - */ - public static BuildConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuildConfiguration deserializedBuildConfiguration = new BuildConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("baseOs".equals(fieldName)) { - deserializedBuildConfiguration.baseOs = reader.getString(); - } else if ("platform".equals(fieldName)) { - deserializedBuildConfiguration.platform = reader.getString(); - } else if ("platformVersion".equals(fieldName)) { - deserializedBuildConfiguration.platformVersion = reader.getString(); - } else if ("environmentVariables".equals(fieldName)) { - List environmentVariables - = reader.readArray(reader1 -> EnvironmentVariable.fromJson(reader1)); - deserializedBuildConfiguration.environmentVariables = environmentVariables; - } else if ("preBuildSteps".equals(fieldName)) { - List preBuildSteps = reader.readArray(reader1 -> PreBuildStep.fromJson(reader1)); - deserializedBuildConfiguration.preBuildSteps = preBuildSteps; - } else { - reader.skipChildren(); - } - } - - return deserializedBuildConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildProvisioningState.java deleted file mode 100644 index 5922fd28a4fd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildProvisioningState.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Resource instance provisioning state. - */ -public final class BuildProvisioningState extends ExpandableStringEnum { - /** - * Static value Succeeded for BuildProvisioningState. - */ - public static final BuildProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for BuildProvisioningState. - */ - public static final BuildProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for BuildProvisioningState. - */ - public static final BuildProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Creating for BuildProvisioningState. - */ - public static final BuildProvisioningState CREATING = fromString("Creating"); - - /** - * Static value Updating for BuildProvisioningState. - */ - public static final BuildProvisioningState UPDATING = fromString("Updating"); - - /** - * Static value Deleting for BuildProvisioningState. - */ - public static final BuildProvisioningState DELETING = fromString("Deleting"); - - /** - * Creates a new instance of BuildProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BuildProvisioningState() { - } - - /** - * Creates or finds a BuildProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding BuildProvisioningState. - */ - public static BuildProvisioningState fromString(String name) { - return fromString(name, BuildProvisioningState.class); - } - - /** - * Gets known BuildProvisioningState values. - * - * @return known BuildProvisioningState values. - */ - public static Collection values() { - return values(BuildProvisioningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildResource.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildResource.java deleted file mode 100644 index 2917c702fa3f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildResource.java +++ /dev/null @@ -1,261 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; - -/** - * An immutable client-side representation of BuildResource. - */ -public interface BuildResource { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the provisioningState property: Build provisioning state. - * - * @return the provisioningState value. - */ - BuildProvisioningState provisioningState(); - - /** - * Gets the buildStatus property: Status of the build once it has been provisioned. - * - * @return the buildStatus value. - */ - BuildStatus buildStatus(); - - /** - * Gets the destinationContainerRegistry property: Container registry that the final image will be uploaded to. - * - * @return the destinationContainerRegistry value. - */ - ContainerRegistryWithCustomImage destinationContainerRegistry(); - - /** - * Gets the configuration property: Configuration of the build. - * - * @return the configuration value. - */ - BuildConfiguration configuration(); - - /** - * Gets the uploadEndpoint property: Endpoint to which the source code should be uploaded. - * - * @return the uploadEndpoint value. - */ - String uploadEndpoint(); - - /** - * Gets the logStreamEndpoint property: Endpoint from which the build logs can be streamed. - * - * @return the logStreamEndpoint value. - */ - String logStreamEndpoint(); - - /** - * Gets the tokenEndpoint property: Endpoint to use to retrieve an authentication token for log streaming and - * uploading source code. - * - * @return the tokenEndpoint value. - */ - String tokenEndpoint(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner object. - * - * @return the inner object. - */ - BuildResourceInner innerModel(); - - /** - * The entirety of the BuildResource definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The BuildResource definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the BuildResource definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the BuildResource definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, builderName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @return the next definition stage. - */ - WithCreate withExistingBuilder(String resourceGroupName, String builderName); - } - - /** - * The stage of the BuildResource definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate - extends DefinitionStages.WithDestinationContainerRegistry, DefinitionStages.WithConfiguration { - /** - * Executes the create request. - * - * @return the created resource. - */ - BuildResource create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - BuildResource create(Context context); - } - - /** - * The stage of the BuildResource definition allowing to specify destinationContainerRegistry. - */ - interface WithDestinationContainerRegistry { - /** - * Specifies the destinationContainerRegistry property: Container registry that the final image will be - * uploaded to.. - * - * @param destinationContainerRegistry Container registry that the final image will be uploaded to. - * @return the next definition stage. - */ - WithCreate withDestinationContainerRegistry(ContainerRegistryWithCustomImage destinationContainerRegistry); - } - - /** - * The stage of the BuildResource definition allowing to specify configuration. - */ - interface WithConfiguration { - /** - * Specifies the configuration property: Configuration of the build.. - * - * @param configuration Configuration of the build. - * @return the next definition stage. - */ - WithCreate withConfiguration(BuildConfiguration configuration); - } - } - - /** - * Begins update for the BuildResource resource. - * - * @return the stage of resource update. - */ - BuildResource.Update update(); - - /** - * The template for BuildResource update. - */ - interface Update extends UpdateStages.WithDestinationContainerRegistry, UpdateStages.WithConfiguration { - /** - * Executes the update request. - * - * @return the updated resource. - */ - BuildResource apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - BuildResource apply(Context context); - } - - /** - * The BuildResource update stages. - */ - interface UpdateStages { - /** - * The stage of the BuildResource update allowing to specify destinationContainerRegistry. - */ - interface WithDestinationContainerRegistry { - /** - * Specifies the destinationContainerRegistry property: Container registry that the final image will be - * uploaded to.. - * - * @param destinationContainerRegistry Container registry that the final image will be uploaded to. - * @return the next definition stage. - */ - Update withDestinationContainerRegistry(ContainerRegistryWithCustomImage destinationContainerRegistry); - } - - /** - * The stage of the BuildResource update allowing to specify configuration. - */ - interface WithConfiguration { - /** - * Specifies the configuration property: Configuration of the build.. - * - * @param configuration Configuration of the build. - * @return the next definition stage. - */ - Update withConfiguration(BuildConfiguration configuration); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - BuildResource refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - BuildResource refresh(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildStatus.java deleted file mode 100644 index ddd4dde5e8e7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildStatus.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Status of the build once it has been provisioned. - */ -public final class BuildStatus extends ExpandableStringEnum { - /** - * Static value NotStarted for BuildStatus. - */ - public static final BuildStatus NOT_STARTED = fromString("NotStarted"); - - /** - * Static value InProgress for BuildStatus. - */ - public static final BuildStatus IN_PROGRESS = fromString("InProgress"); - - /** - * Static value Succeeded for BuildStatus. - */ - public static final BuildStatus SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Canceled for BuildStatus. - */ - public static final BuildStatus CANCELED = fromString("Canceled"); - - /** - * Static value Failed for BuildStatus. - */ - public static final BuildStatus FAILED = fromString("Failed"); - - /** - * Creates a new instance of BuildStatus value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BuildStatus() { - } - - /** - * Creates or finds a BuildStatus from its string representation. - * - * @param name a name to look for. - * @return the corresponding BuildStatus. - */ - public static BuildStatus fromString(String name) { - return fromString(name, BuildStatus.class); - } - - /** - * Gets known BuildStatus values. - * - * @return known BuildStatus values. - */ - public static Collection values() { - return values(BuildStatus.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildToken.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildToken.java deleted file mode 100644 index 31786178e9d9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildToken.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.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.BuildTokenInner; -import java.time.OffsetDateTime; - -/** - * An immutable client-side representation of BuildToken. - */ -public interface BuildToken { - /** - * Gets the token property: Authentication token. - * - * @return the token value. - */ - String token(); - - /** - * Gets the expires property: Token expiration date. - * - * @return the expires value. - */ - OffsetDateTime expires(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.BuildTokenInner object. - * - * @return the inner object. - */ - BuildTokenInner innerModel(); -} 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 deleted file mode 100644 index d48b541cf328..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderCollection.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a BuilderResource list operation. - */ -@Fluent -public final class BuilderCollection implements JsonSerializable { - /* - * The BuilderResource items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - private String nextLink; - - /** - * Creates an instance of BuilderCollection class. - */ - public BuilderCollection() { - } - - /** - * Get the value property: The BuilderResource items on this page. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The BuilderResource items on this page. - * - * @param value the value value to set. - * @return the BuilderCollection object itself. - */ - public BuilderCollection withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The link to the next page of items. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The link to the next page of items. - * - * @param nextLink the nextLink value to set. - * @return the BuilderCollection object itself. - */ - public BuilderCollection withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model BuilderCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(BuilderCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BuilderCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuilderCollection if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the BuilderCollection. - */ - public static BuilderCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuilderCollection deserializedBuilderCollection = new BuilderCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> BuilderResourceInner.fromJson(reader1)); - deserializedBuilderCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedBuilderCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedBuilderCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderProvisioningState.java deleted file mode 100644 index 7f99e5aa4f2b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderProvisioningState.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Resource instance provisioning state. - */ -public final class BuilderProvisioningState extends ExpandableStringEnum { - /** - * Static value Succeeded for BuilderProvisioningState. - */ - public static final BuilderProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for BuilderProvisioningState. - */ - public static final BuilderProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for BuilderProvisioningState. - */ - public static final BuilderProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Creating for BuilderProvisioningState. - */ - public static final BuilderProvisioningState CREATING = fromString("Creating"); - - /** - * Static value Updating for BuilderProvisioningState. - */ - public static final BuilderProvisioningState UPDATING = fromString("Updating"); - - /** - * Static value Deleting for BuilderProvisioningState. - */ - public static final BuilderProvisioningState DELETING = fromString("Deleting"); - - /** - * Creates a new instance of BuilderProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public BuilderProvisioningState() { - } - - /** - * Creates or finds a BuilderProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding BuilderProvisioningState. - */ - public static BuilderProvisioningState fromString(String name) { - return fromString(name, BuilderProvisioningState.class); - } - - /** - * Gets known BuilderProvisioningState values. - * - * @return known BuilderProvisioningState values. - */ - public static Collection values() { - return values(BuilderProvisioningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResource.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResource.java deleted file mode 100644 index 1d81dcc8f511..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResource.java +++ /dev/null @@ -1,333 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; -import java.util.List; -import java.util.Map; - -/** - * An immutable client-side representation of BuilderResource. - */ -public interface BuilderResource { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the provisioningState property: Provisioning state of a builder resource. - * - * @return the provisioningState value. - */ - BuilderProvisioningState provisioningState(); - - /** - * Gets the environmentId property: Resource ID of the container apps environment that the builder is associated - * with. - * - * @return the environmentId value. - */ - String environmentId(); - - /** - * Gets the containerRegistries property: List of mappings of container registries and the managed identity used to - * connect to it. - * - * @return the containerRegistries value. - */ - List containerRegistries(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner object. - * - * @return the inner object. - */ - BuilderResourceInner innerModel(); - - /** - * The entirety of the BuilderResource definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The BuilderResource definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the BuilderResource definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the BuilderResource definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithResourceGroup withRegion(String location); - } - - /** - * The stage of the BuilderResource definition allowing to specify parent resource. - */ - interface WithResourceGroup { - /** - * Specifies resourceGroupName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @return the next definition stage. - */ - WithCreate withExistingResourceGroup(String resourceGroupName); - } - - /** - * The stage of the BuilderResource definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, - DefinitionStages.WithEnvironmentId, DefinitionStages.WithContainerRegistries { - /** - * Executes the create request. - * - * @return the created resource. - */ - BuilderResource create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - BuilderResource create(Context context); - } - - /** - * The stage of the BuilderResource definition allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - WithCreate withTags(Map tags); - } - - /** - * The stage of the BuilderResource definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The managed service identities assigned to this resource.. - * - * @param identity The managed service identities assigned to this resource. - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the BuilderResource definition allowing to specify environmentId. - */ - interface WithEnvironmentId { - /** - * Specifies the environmentId property: Resource ID of the container apps environment that the builder is - * associated with.. - * - * @param environmentId Resource ID of the container apps environment that the builder is associated with. - * @return the next definition stage. - */ - WithCreate withEnvironmentId(String environmentId); - } - - /** - * The stage of the BuilderResource definition allowing to specify containerRegistries. - */ - interface WithContainerRegistries { - /** - * Specifies the containerRegistries property: List of mappings of container registries and the managed - * identity used to connect to it.. - * - * @param containerRegistries List of mappings of container registries and the managed identity used to - * connect to it. - * @return the next definition stage. - */ - WithCreate withContainerRegistries(List containerRegistries); - } - } - - /** - * Begins update for the BuilderResource resource. - * - * @return the stage of resource update. - */ - BuilderResource.Update update(); - - /** - * The template for BuilderResource update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithEnvironmentId { - /** - * Executes the update request. - * - * @return the updated resource. - */ - BuilderResource apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - BuilderResource apply(Context context); - } - - /** - * The BuilderResource update stages. - */ - interface UpdateStages { - /** - * The stage of the BuilderResource update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the BuilderResource update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: The managed service identities assigned to this resource.. - * - * @param identity The managed service identities assigned to this resource. - * @return the next definition stage. - */ - Update withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the BuilderResource update allowing to specify environmentId. - */ - interface WithEnvironmentId { - /** - * Specifies the environmentId property: Resource ID of the container apps environment that the builder is - * associated with.. - * - * @param environmentId Resource ID of the container apps environment that the builder is associated with. - * @return the next definition stage. - */ - Update withEnvironmentId(String environmentId); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - BuilderResource refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - BuilderResource refresh(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResourceUpdate.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResourceUpdate.java deleted file mode 100644 index 90256ebdca5e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResourceUpdate.java +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceUpdateProperties; -import java.io.IOException; -import java.util.Map; - -/** - * The type used for update operations of the BuilderResource. - */ -@Fluent -public final class BuilderResourceUpdate implements JsonSerializable { - /* - * The managed service identities assigned to this resource. - */ - private ManagedServiceIdentity identity; - - /* - * Resource tags. - */ - private Map tags; - - /* - * The updatable properties of the BuilderResource. - */ - private BuilderResourceUpdateProperties innerProperties; - - /** - * Creates an instance of BuilderResourceUpdate class. - */ - public BuilderResourceUpdate() { - } - - /** - * Get the identity property: The managed service identities assigned to this resource. - * - * @return the identity value. - */ - public ManagedServiceIdentity identity() { - return this.identity; - } - - /** - * Set the identity property: The managed service identities assigned to this resource. - * - * @param identity the identity value to set. - * @return the BuilderResourceUpdate object itself. - */ - public BuilderResourceUpdate withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the BuilderResourceUpdate object itself. - */ - public BuilderResourceUpdate withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the innerProperties property: The updatable properties of the BuilderResource. - * - * @return the innerProperties value. - */ - private BuilderResourceUpdateProperties innerProperties() { - return this.innerProperties; - } - - /** - * Get the environmentId property: Resource ID of the container apps environment that the builder is associated - * with. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.innerProperties() == null ? null : this.innerProperties().environmentId(); - } - - /** - * Set the environmentId property: Resource ID of the container apps environment that the builder is associated - * with. - * - * @param environmentId the environmentId value to set. - * @return the BuilderResourceUpdate object itself. - */ - public BuilderResourceUpdate withEnvironmentId(String environmentId) { - if (this.innerProperties() == null) { - this.innerProperties = new BuilderResourceUpdateProperties(); - } - this.innerProperties().withEnvironmentId(environmentId); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (identity() != null) { - identity().validate(); - } - if (innerProperties() != null) { - innerProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of BuilderResourceUpdate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of BuilderResourceUpdate if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the BuilderResourceUpdate. - */ - public static BuilderResourceUpdate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - BuilderResourceUpdate deserializedBuilderResourceUpdate = new BuilderResourceUpdate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("identity".equals(fieldName)) { - deserializedBuilderResourceUpdate.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedBuilderResourceUpdate.tags = tags; - } else if ("properties".equals(fieldName)) { - deserializedBuilderResourceUpdate.innerProperties - = BuilderResourceUpdateProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedBuilderResourceUpdate; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builders.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builders.java deleted file mode 100644 index d91007741556..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builders.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Builders. - */ -public interface Builders { - /** - * List BuilderResource resources by subscription ID. - * - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * List BuilderResource resources by subscription ID. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * List BuilderResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * List BuilderResource resources by resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 BuilderResource along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String builderName, - Context context); - - /** - * Get a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 BuilderResource. - */ - BuilderResource getByResourceGroup(String resourceGroupName, String builderName); - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String builderName); - - /** - * Delete a BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 builderName, Context context); - - /** - * Get a BuilderResource. - * - * @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 BuilderResource along with {@link Response}. - */ - BuilderResource getById(String id); - - /** - * Get a BuilderResource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 BuilderResource along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a BuilderResource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 BuilderResource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 BuilderResource resource. - * - * @param name resource name. - * @return the first stage of the new BuilderResource definition. - */ - BuilderResource.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builds.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builds.java deleted file mode 100644 index e00e51a76b57..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builds.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (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 Builds. - */ -public interface Builds { - /** - * Get a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 BuildResource along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String builderName, String buildName, - Context context); - - /** - * Get a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 BuildResource. - */ - BuildResource get(String resourceGroupName, String builderName, String buildName); - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 builderName, String buildName); - - /** - * Delete a BuildResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param buildName The name of a build. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 builderName, String buildName, Context context); - - /** - * Get a BuildResource. - * - * @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 BuildResource along with {@link Response}. - */ - BuildResource getById(String id); - - /** - * Get a BuildResource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 BuildResource along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a BuildResource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 BuildResource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 BuildResource resource. - * - * @param name resource name. - * @return the first stage of the new BuildResource definition. - */ - BuildResource.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildsByBuilderResources.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildsByBuilderResources.java deleted file mode 100644 index f0ff7e81d704..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildsByBuilderResources.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.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of BuildsByBuilderResources. - */ -public interface BuildsByBuilderResources { - /** - * List BuildResource resources by BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuildResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String builderName); - - /** - * List BuildResource resources by BuilderResource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param builderName The name of the builder. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the response of a BuildResource list operation as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String builderName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificate.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificate.java deleted file mode 100644 index 1407efe1b244..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificate.java +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright (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.CertificateInner; -import java.util.Map; - -/** - * An immutable client-side representation of Certificate. - */ -public interface Certificate { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the properties property: Certificate resource specific properties. - * - * @return the properties value. - */ - CertificateProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner object. - * - * @return the inner object. - */ - CertificateInner innerModel(); - - /** - * The entirety of the Certificate definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The Certificate definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Certificate definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the Certificate definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); - } - - /** - * The stage of the Certificate definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, connectedEnvironmentName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @return the next definition stage. - */ - WithCreate withExistingConnectedEnvironment(String resourceGroupName, String connectedEnvironmentName); - } - - /** - * The stage of the Certificate definition which contains all the minimum required properties for the resource - * to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - Certificate create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Certificate create(Context context); - } - - /** - * The stage of the Certificate 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 Certificate definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Certificate resource specific properties. - * - * @param properties Certificate resource specific properties. - * @return the next definition stage. - */ - WithCreate withProperties(CertificateProperties properties); - } - } - - /** - * Begins update for the Certificate resource. - * - * @return the stage of resource update. - */ - Certificate.Update update(); - - /** - * The template for Certificate update. - */ - interface Update extends UpdateStages.WithTags { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Certificate apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Certificate apply(Context context); - } - - /** - * The Certificate update stages. - */ - interface UpdateStages { - /** - * The stage of the Certificate update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Application-specific metadata in the form of key-value pairs.. - * - * @param tags Application-specific metadata in the form of key-value pairs. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Certificate refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Certificate refresh(Context context); -} 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 deleted file mode 100644 index 4829498672c0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateCollection.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of Certificates. - */ -@Fluent -public final class CertificateCollection implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of CertificateCollection class. - */ - public CertificateCollection() { - } - - /** - * 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 CertificateCollection object itself. - */ - public CertificateCollection 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 CertificateCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CertificateCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CertificateCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CertificateCollection if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CertificateCollection. - */ - public static CertificateCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CertificateCollection deserializedCertificateCollection = new CertificateCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> CertificateInner.fromJson(reader1)); - deserializedCertificateCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedCertificateCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCertificateCollection; - }); - } -} 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 deleted file mode 100644 index 2813e73fbf00..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateKeyVaultProperties.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Properties for a certificate stored in a Key Vault. - */ -@Fluent -public final class CertificateKeyVaultProperties implements JsonSerializable { - /* - * Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned - * identity. - */ - private String identity; - - /* - * URL pointing to the Azure Key Vault secret that holds the certificate. - */ - private String keyVaultUrl; - - /** - * Creates an instance of CertificateKeyVaultProperties class. - */ - public CertificateKeyVaultProperties() { - } - - /** - * Get the identity property: Resource ID of a managed identity to authenticate with Azure Key Vault, or System to - * use a system-assigned identity. - * - * @return the identity value. - */ - public String identity() { - return this.identity; - } - - /** - * Set the identity property: Resource ID of a managed identity to authenticate with Azure Key Vault, or System to - * use a system-assigned identity. - * - * @param identity the identity value to set. - * @return the CertificateKeyVaultProperties object itself. - */ - public CertificateKeyVaultProperties withIdentity(String identity) { - this.identity = identity; - return this; - } - - /** - * Get the keyVaultUrl property: URL pointing to the Azure Key Vault secret that holds the certificate. - * - * @return the keyVaultUrl value. - */ - public String keyVaultUrl() { - return this.keyVaultUrl; - } - - /** - * Set the keyVaultUrl property: URL pointing to the Azure Key Vault secret that holds the certificate. - * - * @param keyVaultUrl the keyVaultUrl value to set. - * @return the CertificateKeyVaultProperties object itself. - */ - public CertificateKeyVaultProperties withKeyVaultUrl(String keyVaultUrl) { - this.keyVaultUrl = keyVaultUrl; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("identity", this.identity); - jsonWriter.writeStringField("keyVaultUrl", this.keyVaultUrl); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CertificateKeyVaultProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CertificateKeyVaultProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CertificateKeyVaultProperties. - */ - public static CertificateKeyVaultProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CertificateKeyVaultProperties deserializedCertificateKeyVaultProperties - = new CertificateKeyVaultProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("identity".equals(fieldName)) { - deserializedCertificateKeyVaultProperties.identity = reader.getString(); - } else if ("keyVaultUrl".equals(fieldName)) { - deserializedCertificateKeyVaultProperties.keyVaultUrl = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCertificateKeyVaultProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificatePatch.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificatePatch.java deleted file mode 100644 index 6a105a10fed9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificatePatch.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * A certificate to update. - */ -@Fluent -public final class CertificatePatch implements JsonSerializable { - /* - * Application-specific metadata in the form of key-value pairs. - */ - private Map tags; - - /** - * Creates an instance of CertificatePatch class. - */ - public CertificatePatch() { - } - - /** - * Get the tags property: Application-specific metadata in the form of key-value pairs. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Application-specific metadata in the form of key-value pairs. - * - * @param tags the tags value to set. - * @return the CertificatePatch object itself. - */ - public CertificatePatch withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CertificatePatch from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CertificatePatch if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the CertificatePatch. - */ - public static CertificatePatch fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CertificatePatch deserializedCertificatePatch = new CertificatePatch(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedCertificatePatch.tags = tags; - } else { - reader.skipChildren(); - } - } - - return deserializedCertificatePatch; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java deleted file mode 100644 index 41c1f8b60392..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java +++ /dev/null @@ -1,336 +0,0 @@ -// Copyright (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.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Certificate resource specific properties. - */ -@Fluent -public final class CertificateProperties implements JsonSerializable { - /* - * Provisioning state of the certificate. - */ - private CertificateProvisioningState provisioningState; - - /* - * Properties for a certificate stored in a Key Vault. - */ - private CertificateKeyVaultProperties certificateKeyVaultProperties; - - /* - * Certificate password. - */ - private String password; - - /* - * Subject name of the certificate. - */ - private String subjectName; - - /* - * Subject alternative names the certificate applies to. - */ - private List subjectAlternativeNames; - - /* - * PFX or PEM blob - */ - private byte[] value; - - /* - * Certificate issuer. - */ - private String issuer; - - /* - * Certificate issue Date. - */ - private OffsetDateTime issueDate; - - /* - * Certificate expiration date. - */ - private OffsetDateTime expirationDate; - - /* - * Certificate thumbprint. - */ - private String thumbprint; - - /* - * Is the certificate valid?. - */ - private Boolean valid; - - /* - * Public key hash. - */ - private String publicKeyHash; - - /* - * The type of the certificate. Allowed values are `ServerSSLCertificate` and `ImagePullTrustedCA` - */ - private CertificateType certificateType; - - /** - * Creates an instance of CertificateProperties class. - */ - public CertificateProperties() { - } - - /** - * Get the provisioningState property: Provisioning state of the certificate. - * - * @return the provisioningState value. - */ - public CertificateProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the certificateKeyVaultProperties property: Properties for a certificate stored in a Key Vault. - * - * @return the certificateKeyVaultProperties value. - */ - public CertificateKeyVaultProperties certificateKeyVaultProperties() { - return this.certificateKeyVaultProperties; - } - - /** - * Set the certificateKeyVaultProperties property: Properties for a certificate stored in a Key Vault. - * - * @param certificateKeyVaultProperties the certificateKeyVaultProperties value to set. - * @return the CertificateProperties object itself. - */ - public CertificateProperties - withCertificateKeyVaultProperties(CertificateKeyVaultProperties certificateKeyVaultProperties) { - this.certificateKeyVaultProperties = certificateKeyVaultProperties; - return this; - } - - /** - * Get the password property: Certificate password. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: Certificate password. - * - * @param password the password value to set. - * @return the CertificateProperties object itself. - */ - public CertificateProperties withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the subjectName property: Subject name of the certificate. - * - * @return the subjectName value. - */ - public String subjectName() { - return this.subjectName; - } - - /** - * Get the subjectAlternativeNames property: Subject alternative names the certificate applies to. - * - * @return the subjectAlternativeNames value. - */ - public List subjectAlternativeNames() { - return this.subjectAlternativeNames; - } - - /** - * Get the value property: PFX or PEM blob. - * - * @return the value value. - */ - public byte[] value() { - return CoreUtils.clone(this.value); - } - - /** - * Set the value property: PFX or PEM blob. - * - * @param value the value value to set. - * @return the CertificateProperties object itself. - */ - public CertificateProperties withValue(byte[] value) { - this.value = CoreUtils.clone(value); - return this; - } - - /** - * Get the issuer property: Certificate issuer. - * - * @return the issuer value. - */ - public String issuer() { - return this.issuer; - } - - /** - * Get the issueDate property: Certificate issue Date. - * - * @return the issueDate value. - */ - public OffsetDateTime issueDate() { - return this.issueDate; - } - - /** - * Get the expirationDate property: Certificate expiration date. - * - * @return the expirationDate value. - */ - public OffsetDateTime expirationDate() { - return this.expirationDate; - } - - /** - * Get the thumbprint property: Certificate thumbprint. - * - * @return the thumbprint value. - */ - public String thumbprint() { - return this.thumbprint; - } - - /** - * Get the valid property: Is the certificate valid?. - * - * @return the valid value. - */ - public Boolean valid() { - return this.valid; - } - - /** - * Get the publicKeyHash property: Public key hash. - * - * @return the publicKeyHash value. - */ - public String publicKeyHash() { - return this.publicKeyHash; - } - - /** - * Get the certificateType property: The type of the certificate. Allowed values are `ServerSSLCertificate` and - * `ImagePullTrustedCA`. - * - * @return the certificateType value. - */ - public CertificateType certificateType() { - return this.certificateType; - } - - /** - * Set the certificateType property: The type of the certificate. Allowed values are `ServerSSLCertificate` and - * `ImagePullTrustedCA`. - * - * @param certificateType the certificateType value to set. - * @return the CertificateProperties object itself. - */ - public CertificateProperties withCertificateType(CertificateType certificateType) { - this.certificateType = certificateType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (certificateKeyVaultProperties() != null) { - certificateKeyVaultProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("certificateKeyVaultProperties", this.certificateKeyVaultProperties); - jsonWriter.writeStringField("password", this.password); - jsonWriter.writeBinaryField("value", this.value); - jsonWriter.writeStringField("certificateType", - this.certificateType == null ? null : this.certificateType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CertificateProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CertificateProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the CertificateProperties. - */ - public static CertificateProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CertificateProperties deserializedCertificateProperties = new CertificateProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedCertificateProperties.provisioningState - = CertificateProvisioningState.fromString(reader.getString()); - } else if ("certificateKeyVaultProperties".equals(fieldName)) { - deserializedCertificateProperties.certificateKeyVaultProperties - = CertificateKeyVaultProperties.fromJson(reader); - } else if ("password".equals(fieldName)) { - deserializedCertificateProperties.password = reader.getString(); - } else if ("subjectName".equals(fieldName)) { - deserializedCertificateProperties.subjectName = reader.getString(); - } else if ("subjectAlternativeNames".equals(fieldName)) { - List subjectAlternativeNames = reader.readArray(reader1 -> reader1.getString()); - deserializedCertificateProperties.subjectAlternativeNames = subjectAlternativeNames; - } else if ("value".equals(fieldName)) { - deserializedCertificateProperties.value = reader.getBinary(); - } else if ("issuer".equals(fieldName)) { - deserializedCertificateProperties.issuer = reader.getString(); - } else if ("issueDate".equals(fieldName)) { - deserializedCertificateProperties.issueDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("expirationDate".equals(fieldName)) { - deserializedCertificateProperties.expirationDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("thumbprint".equals(fieldName)) { - deserializedCertificateProperties.thumbprint = reader.getString(); - } else if ("valid".equals(fieldName)) { - deserializedCertificateProperties.valid = reader.getNullable(JsonReader::getBoolean); - } else if ("publicKeyHash".equals(fieldName)) { - deserializedCertificateProperties.publicKeyHash = reader.getString(); - } else if ("certificateType".equals(fieldName)) { - deserializedCertificateProperties.certificateType = CertificateType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedCertificateProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProvisioningState.java deleted file mode 100644 index 2ffca63da6c3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProvisioningState.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Provisioning state of the certificate. - */ -public final class CertificateProvisioningState extends ExpandableStringEnum { - /** - * Static value Succeeded for CertificateProvisioningState. - */ - public static final CertificateProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for CertificateProvisioningState. - */ - public static final CertificateProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for CertificateProvisioningState. - */ - public static final CertificateProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value DeleteFailed for CertificateProvisioningState. - */ - public static final CertificateProvisioningState DELETE_FAILED = fromString("DeleteFailed"); - - /** - * Static value Pending for CertificateProvisioningState. - */ - public static final CertificateProvisioningState PENDING = fromString("Pending"); - - /** - * Creates a new instance of CertificateProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CertificateProvisioningState() { - } - - /** - * Creates or finds a CertificateProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding CertificateProvisioningState. - */ - public static CertificateProvisioningState fromString(String name) { - return fromString(name, CertificateProvisioningState.class); - } - - /** - * Gets known CertificateProvisioningState values. - * - * @return known CertificateProvisioningState values. - */ - public static Collection values() { - return values(CertificateProvisioningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateType.java deleted file mode 100644 index c00cb182ef8f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of the certificate. Allowed values are `ServerSSLCertificate` and `ImagePullTrustedCA`. - */ -public final class CertificateType extends ExpandableStringEnum { - /** - * Static value ServerSSLCertificate for CertificateType. - */ - public static final CertificateType SERVER_SSLCERTIFICATE = fromString("ServerSSLCertificate"); - - /** - * Static value ImagePullTrustedCA for CertificateType. - */ - public static final CertificateType IMAGE_PULL_TRUSTED_CA = fromString("ImagePullTrustedCA"); - - /** - * Creates a new instance of CertificateType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CertificateType() { - } - - /** - * Creates or finds a CertificateType from its string representation. - * - * @param name a name to look for. - * @return the corresponding CertificateType. - */ - public static CertificateType fromString(String name) { - return fromString(name, CertificateType.class); - } - - /** - * Gets known CertificateType values. - * - * @return known CertificateType values. - */ - public static Collection values() { - return values(CertificateType.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificates.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificates.java deleted file mode 100644 index 8f33ff0d5d1c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificates.java +++ /dev/null @@ -1,171 +0,0 @@ -// Copyright (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; -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; - -/** - * Resource collection API of Certificates. - */ -public interface Certificates { - /** - * Get the Certificates in 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.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 Certificates in a given managed environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Get the Certificates in 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.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 Certificates in a given managed environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName, Context context); - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 specified Certificate along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String environmentName, String certificateName, - Context context); - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 specified Certificate. - */ - Certificate get(String resourceGroupName, String environmentName, String certificateName); - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Certificate to be created or updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with - * {@link Response}. - */ - Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, - String certificateName, CertificateInner certificateEnvelope, Context context); - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - Certificate createOrUpdate(String resourceGroupName, String environmentName, String certificateName); - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 Response}. - */ - Response deleteWithResponse(String resourceGroupName, String environmentName, String certificateName, - Context context); - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 environmentName, String certificateName); - - /** - * Update properties of a certificate - * - * Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with - * {@link Response}. - */ - Response updateWithResponse(String resourceGroupName, String environmentName, String certificateName, - CertificatePatch certificateEnvelope, Context context); - - /** - * Update properties of a certificate - * - * Patches a certificate. Currently only patching of tags is supported. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. - */ - Certificate update(String resourceGroupName, String environmentName, String certificateName, - CertificatePatch certificateEnvelope); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityReason.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityReason.java deleted file mode 100644 index 186892302726..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityReason.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The reason why the given name is not available. - */ -public final class CheckNameAvailabilityReason extends ExpandableStringEnum { - /** - * Static value Invalid for CheckNameAvailabilityReason. - */ - public static final CheckNameAvailabilityReason INVALID = fromString("Invalid"); - - /** - * Static value AlreadyExists for CheckNameAvailabilityReason. - */ - public static final CheckNameAvailabilityReason ALREADY_EXISTS = fromString("AlreadyExists"); - - /** - * Creates a new instance of CheckNameAvailabilityReason value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public CheckNameAvailabilityReason() { - } - - /** - * Creates or finds a CheckNameAvailabilityReason from its string representation. - * - * @param name a name to look for. - * @return the corresponding CheckNameAvailabilityReason. - */ - public static CheckNameAvailabilityReason fromString(String name) { - return fromString(name, CheckNameAvailabilityReason.class); - } - - /** - * Gets known CheckNameAvailabilityReason values. - * - * @return known CheckNameAvailabilityReason values. - */ - public static Collection values() { - return values(CheckNameAvailabilityReason.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityRequest.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityRequest.java deleted file mode 100644 index d964c0cf48f8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityRequest.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The check availability request body. - */ -@Fluent -public final class CheckNameAvailabilityRequest implements JsonSerializable { - /* - * The name of the resource for which availability needs to be checked. - */ - private String name; - - /* - * The resource type. - */ - private String type; - - /** - * Creates an instance of CheckNameAvailabilityRequest class. - */ - public CheckNameAvailabilityRequest() { - } - - /** - * Get the name property: The name of the resource for which availability needs to be checked. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the resource for which availability needs to be checked. - * - * @param name the name value to set. - * @return the CheckNameAvailabilityRequest object itself. - */ - public CheckNameAvailabilityRequest withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: The resource type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: The resource type. - * - * @param type the type value to set. - * @return the CheckNameAvailabilityRequest object itself. - */ - public CheckNameAvailabilityRequest withType(String type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CheckNameAvailabilityRequest from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CheckNameAvailabilityRequest if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CheckNameAvailabilityRequest. - */ - public static CheckNameAvailabilityRequest fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CheckNameAvailabilityRequest deserializedCheckNameAvailabilityRequest = new CheckNameAvailabilityRequest(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedCheckNameAvailabilityRequest.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedCheckNameAvailabilityRequest.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCheckNameAvailabilityRequest; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityResponse.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityResponse.java deleted file mode 100644 index 306acb1e1ff8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityResponse.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.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; - -/** - * An immutable client-side representation of CheckNameAvailabilityResponse. - */ -public interface CheckNameAvailabilityResponse { - /** - * Gets the nameAvailable property: Indicates if the resource name is available. - * - * @return the nameAvailable value. - */ - Boolean nameAvailable(); - - /** - * Gets the reason property: The reason why the given name is not available. - * - * @return the reason value. - */ - CheckNameAvailabilityReason reason(); - - /** - * Gets the message property: Detailed reason why the given name is available. - * - * @return the message value. - */ - String message(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner object. - * - * @return the inner object. - */ - CheckNameAvailabilityResponseInner innerModel(); -} 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 deleted file mode 100644 index 973c4c44a1bd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CircuitBreakerPolicy.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Policy that defines circuit breaker conditions. - */ -@Fluent -public final class CircuitBreakerPolicy implements JsonSerializable { - /* - * Number of consecutive errors before the circuit breaker opens - */ - 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. - */ - private Integer intervalInSeconds; - - /* - * Maximum percentage of hosts that will be ejected after failure threshold has been met - */ - private Integer maxEjectionPercent; - - /** - * Creates an instance of CircuitBreakerPolicy class. - */ - public CircuitBreakerPolicy() { - } - - /** - * Get the consecutiveErrors property: Number of consecutive errors before the circuit breaker opens. - * - * @return the consecutiveErrors value. - */ - public Integer consecutiveErrors() { - return this.consecutiveErrors; - } - - /** - * Set the consecutiveErrors property: Number of consecutive errors before the circuit breaker opens. - * - * @param consecutiveErrors the consecutiveErrors value to set. - * @return the CircuitBreakerPolicy object itself. - */ - public CircuitBreakerPolicy withConsecutiveErrors(Integer consecutiveErrors) { - this.consecutiveErrors = consecutiveErrors; - return this; - } - - /** - * Get the intervalInSeconds property: 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. - * - * @return the intervalInSeconds value. - */ - public Integer intervalInSeconds() { - return this.intervalInSeconds; - } - - /** - * Set the intervalInSeconds property: 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. - * - * @param intervalInSeconds the intervalInSeconds value to set. - * @return the CircuitBreakerPolicy object itself. - */ - public CircuitBreakerPolicy withIntervalInSeconds(Integer intervalInSeconds) { - this.intervalInSeconds = intervalInSeconds; - return this; - } - - /** - * Get the maxEjectionPercent property: Maximum percentage of hosts that will be ejected after failure threshold has - * been met. - * - * @return the maxEjectionPercent value. - */ - public Integer maxEjectionPercent() { - return this.maxEjectionPercent; - } - - /** - * 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. - */ - public CircuitBreakerPolicy withMaxEjectionPercent(Integer maxEjectionPercent) { - this.maxEjectionPercent = maxEjectionPercent; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("consecutiveErrors", this.consecutiveErrors); - jsonWriter.writeNumberField("intervalInSeconds", this.intervalInSeconds); - jsonWriter.writeNumberField("maxEjectionPercent", this.maxEjectionPercent); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CircuitBreakerPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CircuitBreakerPolicy if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the CircuitBreakerPolicy. - */ - public static CircuitBreakerPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CircuitBreakerPolicy deserializedCircuitBreakerPolicy = new CircuitBreakerPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("consecutiveErrors".equals(fieldName)) { - deserializedCircuitBreakerPolicy.consecutiveErrors = reader.getNullable(JsonReader::getInt); - } else if ("intervalInSeconds".equals(fieldName)) { - deserializedCircuitBreakerPolicy.intervalInSeconds = reader.getNullable(JsonReader::getInt); - } else if ("maxEjectionPercent".equals(fieldName)) { - deserializedCircuitBreakerPolicy.maxEjectionPercent = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedCircuitBreakerPolicy; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientCredentialMethod.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientCredentialMethod.java deleted file mode 100644 index 1bfcc8315252..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientCredentialMethod.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.models; - -/** - * The method that should be used to authenticate the user. - */ -public enum ClientCredentialMethod { - /** - * Enum value ClientSecretPost. - */ - CLIENT_SECRET_POST("ClientSecretPost"); - - /** - * The actual serialized value for a ClientCredentialMethod instance. - */ - private final String value; - - ClientCredentialMethod(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ClientCredentialMethod instance. - * - * @param value the serialized value to parse. - * @return the parsed ClientCredentialMethod object, or null if unable to parse. - */ - public static ClientCredentialMethod fromString(String value) { - if (value == null) { - return null; - } - ClientCredentialMethod[] items = ClientCredentialMethod.values(); - for (ClientCredentialMethod item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientRegistration.java deleted file mode 100644 index 67660d403a50..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientRegistration.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the app registration for providers that have client ids and client secrets. - */ -@Fluent -public final class ClientRegistration implements JsonSerializable { - /* - * The Client ID of the app used for login. - */ - private String clientId; - - /* - * The app setting name that contains the client secret. - */ - private String clientSecretSettingName; - - /** - * Creates an instance of ClientRegistration class. - */ - public ClientRegistration() { - } - - /** - * Get the clientId property: The Client ID of the app used for login. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: The Client ID of the app used for login. - * - * @param clientId the clientId value to set. - * @return the ClientRegistration object itself. - */ - public ClientRegistration withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the clientSecretSettingName property: The app setting name that contains the client secret. - * - * @return the clientSecretSettingName value. - */ - public String clientSecretSettingName() { - return this.clientSecretSettingName; - } - - /** - * Set the clientSecretSettingName property: The app setting name that contains the client secret. - * - * @param clientSecretSettingName the clientSecretSettingName value to set. - * @return the ClientRegistration object itself. - */ - public ClientRegistration withClientSecretSettingName(String clientSecretSettingName) { - this.clientSecretSettingName = clientSecretSettingName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("clientId", this.clientId); - jsonWriter.writeStringField("clientSecretSettingName", this.clientSecretSettingName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ClientRegistration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ClientRegistration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ClientRegistration. - */ - public static ClientRegistration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ClientRegistration deserializedClientRegistration = new ClientRegistration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("clientId".equals(fieldName)) { - deserializedClientRegistration.clientId = reader.getString(); - } else if ("clientSecretSettingName".equals(fieldName)) { - deserializedClientRegistration.clientSecretSettingName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedClientRegistration; - }); - } -} 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 deleted file mode 100644 index 06b863bd1e9a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Configuration.java +++ /dev/null @@ -1,361 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Non versioned Container App configuration properties that define the mutable settings of a Container app. - */ -@Fluent -public final class Configuration implements JsonSerializable { - /* - * Collection of secrets used by a Container app - */ - private List secrets; - - /* - * 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. - */ - private ActiveRevisionsMode activeRevisionsMode; - - /* - * Ingress configurations. - */ - private Ingress ingress; - - /* - * Collection of private container registry credentials for containers used by the Container app - */ - private List registries; - - /* - * Dapr configuration for the Container App. - */ - private Dapr dapr; - - /* - * App runtime configuration for the Container App. - */ - private Runtime runtime; - - /* - * Optional. Max inactive revisions a Container App can have. - */ - private Integer maxInactiveRevisions; - - /* - * Container App to be a dev Container App 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. - */ - private List identitySettings; - - /** - * Creates an instance of Configuration class. - */ - public Configuration() { - } - - /** - * Get the secrets property: Collection of secrets used by a Container app. - * - * @return the secrets value. - */ - public List secrets() { - return this.secrets; - } - - /** - * Set the secrets property: Collection of secrets used by a Container app. - * - * @param secrets the secrets value to set. - * @return the Configuration object itself. - */ - public Configuration withSecrets(List secrets) { - this.secrets = secrets; - return this; - } - - /** - * 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>. - * - * @return the activeRevisionsMode value. - */ - public ActiveRevisionsMode activeRevisionsMode() { - return this.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>. - * - * @param activeRevisionsMode the activeRevisionsMode value to set. - * @return the Configuration object itself. - */ - public Configuration withActiveRevisionsMode(ActiveRevisionsMode activeRevisionsMode) { - this.activeRevisionsMode = activeRevisionsMode; - return this; - } - - /** - * Get the ingress property: Ingress configurations. - * - * @return the ingress value. - */ - public Ingress ingress() { - return this.ingress; - } - - /** - * Set the ingress property: Ingress configurations. - * - * @param ingress the ingress value to set. - * @return the Configuration object itself. - */ - public Configuration withIngress(Ingress ingress) { - this.ingress = ingress; - return this; - } - - /** - * Get the registries property: Collection of private container registry credentials for containers used by the - * Container app. - * - * @return the registries value. - */ - public List registries() { - return this.registries; - } - - /** - * Set the registries property: Collection of private container registry credentials for containers used by the - * Container app. - * - * @param registries the registries value to set. - * @return the Configuration object itself. - */ - public Configuration withRegistries(List registries) { - this.registries = registries; - return this; - } - - /** - * Get the dapr property: Dapr configuration for the Container App. - * - * @return the dapr value. - */ - public Dapr dapr() { - return this.dapr; - } - - /** - * Set the dapr property: Dapr configuration for the Container App. - * - * @param dapr the dapr value to set. - * @return the Configuration object itself. - */ - public Configuration withDapr(Dapr dapr) { - this.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. - * - * @return the maxInactiveRevisions value. - */ - public Integer maxInactiveRevisions() { - return this.maxInactiveRevisions; - } - - /** - * Set the maxInactiveRevisions property: Optional. Max inactive revisions a Container App can have. - * - * @param maxInactiveRevisions the maxInactiveRevisions value to set. - * @return the Configuration object itself. - */ - public Configuration withMaxInactiveRevisions(Integer maxInactiveRevisions) { - this.maxInactiveRevisions = maxInactiveRevisions; - return this; - } - - /** - * Get the service property: Container App to be a dev Container App Service. - * - * @return the service value. - */ - public Service service() { - return this.service; - } - - /** - * Set the service property: Container App to be a dev Container App Service. - * - * @param service the service value to set. - * @return the Configuration object itself. - */ - public Configuration withService(Service service) { - this.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. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (secrets() != null) { - secrets().forEach(e -> e.validate()); - } - if (ingress() != null) { - ingress().validate(); - } - if (registries() != null) { - registries().forEach(e -> e.validate()); - } - if (dapr() != null) { - dapr().validate(); - } - if (runtime() != null) { - runtime().validate(); - } - if (service() != null) { - service().validate(); - } - if (identitySettings() != null) { - identitySettings().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("secrets", this.secrets, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("activeRevisionsMode", - this.activeRevisionsMode == null ? null : this.activeRevisionsMode.toString()); - jsonWriter.writeJsonField("ingress", this.ingress); - jsonWriter.writeArrayField("registries", this.registries, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("dapr", this.dapr); - jsonWriter.writeJsonField("runtime", this.runtime); - jsonWriter.writeNumberField("maxInactiveRevisions", this.maxInactiveRevisions); - jsonWriter.writeJsonField("service", this.service); - jsonWriter.writeArrayField("identitySettings", this.identitySettings, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Configuration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Configuration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the Configuration. - */ - public static Configuration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Configuration deserializedConfiguration = new Configuration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("secrets".equals(fieldName)) { - List secrets = reader.readArray(reader1 -> Secret.fromJson(reader1)); - deserializedConfiguration.secrets = secrets; - } else if ("activeRevisionsMode".equals(fieldName)) { - deserializedConfiguration.activeRevisionsMode = ActiveRevisionsMode.fromString(reader.getString()); - } else if ("ingress".equals(fieldName)) { - deserializedConfiguration.ingress = Ingress.fromJson(reader); - } else if ("registries".equals(fieldName)) { - List registries - = reader.readArray(reader1 -> RegistryCredentials.fromJson(reader1)); - deserializedConfiguration.registries = registries; - } else if ("dapr".equals(fieldName)) { - deserializedConfiguration.dapr = Dapr.fromJson(reader); - } else if ("runtime".equals(fieldName)) { - deserializedConfiguration.runtime = Runtime.fromJson(reader); - } else if ("maxInactiveRevisions".equals(fieldName)) { - deserializedConfiguration.maxInactiveRevisions = reader.getNullable(JsonReader::getInt); - } else if ("service".equals(fieldName)) { - deserializedConfiguration.service = Service.fromJson(reader); - } else if ("identitySettings".equals(fieldName)) { - List identitySettings - = reader.readArray(reader1 -> IdentitySettings.fromJson(reader1)); - deserializedConfiguration.identitySettings = identitySettings; - } else { - reader.skipChildren(); - } - } - - return deserializedConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironment.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironment.java deleted file mode 100644 index a389b68a3941..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironment.java +++ /dev/null @@ -1,424 +0,0 @@ -// Copyright (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.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; -import java.util.Map; - -/** - * An immutable client-side representation of ConnectedEnvironment. - */ -public interface ConnectedEnvironment { - /** - * 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 extendedLocation property: The complex type of the extended location. - * - * @return the extendedLocation value. - */ - ExtendedLocation extendedLocation(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the provisioningState property: Provisioning state of the Kubernetes Environment. - * - * @return the provisioningState value. - */ - ConnectedEnvironmentProvisioningState provisioningState(); - - /** - * Gets the deploymentErrors property: Any errors that occurred during deployment or deployment validation. - * - * @return the deploymentErrors value. - */ - String deploymentErrors(); - - /** - * Gets the defaultDomain property: Default Domain Name for the cluster. - * - * @return the defaultDomain value. - */ - String defaultDomain(); - - /** - * Gets the staticIp property: Static IP of the connectedEnvironment. - * - * @return the staticIp value. - */ - String staticIp(); - - /** - * Gets the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service - * to Service communication telemetry. - * - * @return the daprAIConnectionString value. - */ - String daprAIConnectionString(); - - /** - * Gets the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @return the customDomainConfiguration value. - */ - CustomDomainConfiguration customDomainConfiguration(); - - /** - * 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.ConnectedEnvironmentInner object. - * - * @return the inner object. - */ - ConnectedEnvironmentInner innerModel(); - - /** - * The entirety of the ConnectedEnvironment definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The ConnectedEnvironment definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ConnectedEnvironment definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the ConnectedEnvironment 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 ConnectedEnvironment 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 ConnectedEnvironment 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.WithExtendedLocation, DefinitionStages.WithStaticIp, - DefinitionStages.WithDaprAIConnectionString, DefinitionStages.WithCustomDomainConfiguration { - /** - * Executes the create request. - * - * @return the created resource. - */ - ConnectedEnvironment create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ConnectedEnvironment create(Context context); - } - - /** - * The stage of the ConnectedEnvironment 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 ConnectedEnvironment definition allowing to specify extendedLocation. - */ - interface WithExtendedLocation { - /** - * Specifies the extendedLocation property: The complex type of the extended location.. - * - * @param extendedLocation The complex type of the extended location. - * @return the next definition stage. - */ - WithCreate withExtendedLocation(ExtendedLocation extendedLocation); - } - - /** - * The stage of the ConnectedEnvironment definition allowing to specify staticIp. - */ - interface WithStaticIp { - /** - * Specifies the staticIp property: Static IP of the connectedEnvironment. - * - * @param staticIp Static IP of the connectedEnvironment. - * @return the next definition stage. - */ - WithCreate withStaticIp(String staticIp); - } - - /** - * The stage of the ConnectedEnvironment definition allowing to specify daprAIConnectionString. - */ - interface WithDaprAIConnectionString { - /** - * Specifies the daprAIConnectionString property: Application Insights connection string used by Dapr to - * export Service to Service communication telemetry. - * - * @param daprAIConnectionString Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * @return the next definition stage. - */ - WithCreate withDaprAIConnectionString(String daprAIConnectionString); - } - - /** - * The stage of the ConnectedEnvironment definition allowing to specify customDomainConfiguration. - */ - interface WithCustomDomainConfiguration { - /** - * Specifies the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @param customDomainConfiguration Custom domain configuration for the environment. - * @return the next definition stage. - */ - WithCreate withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration); - } - } - - /** - * Begins update for the ConnectedEnvironment resource. - * - * @return the stage of resource update. - */ - ConnectedEnvironment.Update update(); - - /** - * The template for ConnectedEnvironment update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithExtendedLocation, UpdateStages.WithStaticIp, - UpdateStages.WithDaprAIConnectionString, UpdateStages.WithCustomDomainConfiguration { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ConnectedEnvironment apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ConnectedEnvironment apply(Context context); - } - - /** - * The ConnectedEnvironment update stages. - */ - interface UpdateStages { - /** - * The stage of the ConnectedEnvironment update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the ConnectedEnvironment update allowing to specify extendedLocation. - */ - interface WithExtendedLocation { - /** - * Specifies the extendedLocation property: The complex type of the extended location.. - * - * @param extendedLocation The complex type of the extended location. - * @return the next definition stage. - */ - Update withExtendedLocation(ExtendedLocation extendedLocation); - } - - /** - * The stage of the ConnectedEnvironment update allowing to specify staticIp. - */ - interface WithStaticIp { - /** - * Specifies the staticIp property: Static IP of the connectedEnvironment. - * - * @param staticIp Static IP of the connectedEnvironment. - * @return the next definition stage. - */ - Update withStaticIp(String staticIp); - } - - /** - * The stage of the ConnectedEnvironment update allowing to specify daprAIConnectionString. - */ - interface WithDaprAIConnectionString { - /** - * Specifies the daprAIConnectionString property: Application Insights connection string used by Dapr to - * export Service to Service communication telemetry. - * - * @param daprAIConnectionString Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * @return the next definition stage. - */ - Update withDaprAIConnectionString(String daprAIConnectionString); - } - - /** - * The stage of the ConnectedEnvironment update allowing to specify customDomainConfiguration. - */ - interface WithCustomDomainConfiguration { - /** - * Specifies the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @param customDomainConfiguration Custom domain configuration for the environment. - * @return the next definition stage. - */ - Update withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ConnectedEnvironment refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ConnectedEnvironment refresh(Context context); - - /** - * Checks the resource connectedEnvironmentName availability. - * - * Checks if resource connectedEnvironmentName is available. - * - * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. - * @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 check availability result along with {@link Response}. - */ - Response - checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context); - - /** - * Checks the resource connectedEnvironmentName availability. - * - * Checks if resource connectedEnvironmentName is available. - * - * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. - * @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 check availability result. - */ - CheckNameAvailabilityResponse checkNameAvailability(CheckNameAvailabilityRequest checkNameAvailabilityRequest); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentCollection.java deleted file mode 100644 index 09017c93dba6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentCollection.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of connectedEnvironments. - */ -@Fluent -public final class ConnectedEnvironmentCollection implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of ConnectedEnvironmentCollection class. - */ - public ConnectedEnvironmentCollection() { - } - - /** - * 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 ConnectedEnvironmentCollection object itself. - */ - public ConnectedEnvironmentCollection 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) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConnectedEnvironmentCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConnectedEnvironmentCollection if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ConnectedEnvironmentCollection. - */ - public static ConnectedEnvironmentCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConnectedEnvironmentCollection deserializedConnectedEnvironmentCollection - = new ConnectedEnvironmentCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ConnectedEnvironmentInner.fromJson(reader1)); - deserializedConnectedEnvironmentCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedConnectedEnvironmentCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedConnectedEnvironmentCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentProvisioningState.java deleted file mode 100644 index d9ca5cac6b16..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentProvisioningState.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Provisioning state of the Kubernetes Environment. - */ -public final class ConnectedEnvironmentProvisioningState - extends ExpandableStringEnum { - /** - * Static value Succeeded for ConnectedEnvironmentProvisioningState. - */ - public static final ConnectedEnvironmentProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for ConnectedEnvironmentProvisioningState. - */ - public static final ConnectedEnvironmentProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for ConnectedEnvironmentProvisioningState. - */ - public static final ConnectedEnvironmentProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Waiting for ConnectedEnvironmentProvisioningState. - */ - public static final ConnectedEnvironmentProvisioningState WAITING = fromString("Waiting"); - - /** - * Static value InitializationInProgress for ConnectedEnvironmentProvisioningState. - */ - public static final ConnectedEnvironmentProvisioningState INITIALIZATION_IN_PROGRESS - = fromString("InitializationInProgress"); - - /** - * Static value InfrastructureSetupInProgress for ConnectedEnvironmentProvisioningState. - */ - public static final ConnectedEnvironmentProvisioningState INFRASTRUCTURE_SETUP_IN_PROGRESS - = fromString("InfrastructureSetupInProgress"); - - /** - * Static value InfrastructureSetupComplete for ConnectedEnvironmentProvisioningState. - */ - public static final ConnectedEnvironmentProvisioningState INFRASTRUCTURE_SETUP_COMPLETE - = fromString("InfrastructureSetupComplete"); - - /** - * Static value ScheduledForDelete for ConnectedEnvironmentProvisioningState. - */ - public static final ConnectedEnvironmentProvisioningState SCHEDULED_FOR_DELETE = fromString("ScheduledForDelete"); - - /** - * Creates a new instance of ConnectedEnvironmentProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ConnectedEnvironmentProvisioningState() { - } - - /** - * Creates or finds a ConnectedEnvironmentProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ConnectedEnvironmentProvisioningState. - */ - public static ConnectedEnvironmentProvisioningState fromString(String name) { - return fromString(name, ConnectedEnvironmentProvisioningState.class); - } - - /** - * Gets known ConnectedEnvironmentProvisioningState values. - * - * @return known ConnectedEnvironmentProvisioningState values. - */ - public static Collection values() { - return values(ConnectedEnvironmentProvisioningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorage.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorage.java deleted file mode 100644 index 861b0c8c0339..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorage.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (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.ConnectedEnvironmentStorageInner; - -/** - * An immutable client-side representation of ConnectedEnvironmentStorage. - */ -public interface ConnectedEnvironmentStorage { - /** - * 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: Storage properties. - * - * @return the properties value. - */ - ConnectedEnvironmentStorageProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner object. - * - * @return the inner object. - */ - ConnectedEnvironmentStorageInner innerModel(); - - /** - * The entirety of the ConnectedEnvironmentStorage definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The ConnectedEnvironmentStorage definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ConnectedEnvironmentStorage definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the ConnectedEnvironmentStorage definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, connectedEnvironmentName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @return the next definition stage. - */ - WithCreate withExistingConnectedEnvironment(String resourceGroupName, String connectedEnvironmentName); - } - - /** - * The stage of the ConnectedEnvironmentStorage definition which contains all the minimum required properties - * for the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - ConnectedEnvironmentStorage create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ConnectedEnvironmentStorage create(Context context); - } - - /** - * The stage of the ConnectedEnvironmentStorage definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Storage properties. - * - * @param properties Storage properties. - * @return the next definition stage. - */ - WithCreate withProperties(ConnectedEnvironmentStorageProperties properties); - } - } - - /** - * Begins update for the ConnectedEnvironmentStorage resource. - * - * @return the stage of resource update. - */ - ConnectedEnvironmentStorage.Update update(); - - /** - * The template for ConnectedEnvironmentStorage update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ConnectedEnvironmentStorage apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ConnectedEnvironmentStorage apply(Context context); - } - - /** - * The ConnectedEnvironmentStorage update stages. - */ - interface UpdateStages { - /** - * The stage of the ConnectedEnvironmentStorage update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Storage properties. - * - * @param properties Storage properties. - * @return the next definition stage. - */ - Update withProperties(ConnectedEnvironmentStorageProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ConnectedEnvironmentStorage refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ConnectedEnvironmentStorage refresh(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java deleted file mode 100644 index 4ba039d9a39c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Storage properties. - */ -@Fluent -public final class ConnectedEnvironmentStorageProperties - implements JsonSerializable { - /* - * Azure file properties - */ - private AzureFileProperties azureFile; - - /* - * SMB storage properties - */ - private SmbStorage smb; - - /** - * Creates an instance of ConnectedEnvironmentStorageProperties class. - */ - public ConnectedEnvironmentStorageProperties() { - } - - /** - * Get the azureFile property: Azure file properties. - * - * @return the azureFile value. - */ - public AzureFileProperties azureFile() { - return this.azureFile; - } - - /** - * Set the azureFile property: Azure file properties. - * - * @param azureFile the azureFile value to set. - * @return the ConnectedEnvironmentStorageProperties object itself. - */ - public ConnectedEnvironmentStorageProperties withAzureFile(AzureFileProperties azureFile) { - this.azureFile = azureFile; - return this; - } - - /** - * Get the smb property: SMB storage properties. - * - * @return the smb value. - */ - public SmbStorage smb() { - return this.smb; - } - - /** - * Set the smb property: SMB storage properties. - * - * @param smb the smb value to set. - * @return the ConnectedEnvironmentStorageProperties object itself. - */ - public ConnectedEnvironmentStorageProperties withSmb(SmbStorage smb) { - this.smb = smb; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (azureFile() != null) { - azureFile().validate(); - } - if (smb() != null) { - smb().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("azureFile", this.azureFile); - jsonWriter.writeJsonField("smb", this.smb); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ConnectedEnvironmentStorageProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ConnectedEnvironmentStorageProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ConnectedEnvironmentStorageProperties. - */ - public static ConnectedEnvironmentStorageProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ConnectedEnvironmentStorageProperties deserializedConnectedEnvironmentStorageProperties - = new ConnectedEnvironmentStorageProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("azureFile".equals(fieldName)) { - deserializedConnectedEnvironmentStorageProperties.azureFile = AzureFileProperties.fromJson(reader); - } else if ("smb".equals(fieldName)) { - deserializedConnectedEnvironmentStorageProperties.smb = SmbStorage.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedConnectedEnvironmentStorageProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStoragesCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStoragesCollection.java deleted file mode 100644 index 4493ee7e11dc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStoragesCollection.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.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; -import java.util.List; - -/** - * An immutable client-side representation of ConnectedEnvironmentStoragesCollection. - */ -public interface ConnectedEnvironmentStoragesCollection { - /** - * Gets the value property: Collection of storage resources. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner - * object. - * - * @return the inner object. - */ - ConnectedEnvironmentStoragesCollectionInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironments.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironments.java deleted file mode 100644 index e8cef8647f81..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironments.java +++ /dev/null @@ -1,238 +0,0 @@ -// Copyright (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 ConnectedEnvironments. - */ -public interface ConnectedEnvironments { - /** - * Get all connectedEnvironments for a 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 all connectedEnvironments for a subscription as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Get all connectedEnvironments for a 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 all connectedEnvironments for a subscription as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * Get all connectedEnvironments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments in a resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get all connectedEnvironments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all connectedEnvironments in a resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get the properties of an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 an connectedEnvironment along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, - String connectedEnvironmentName, Context context); - - /** - * Get the properties of an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 an connectedEnvironment. - */ - ConnectedEnvironment getByResourceGroup(String resourceGroupName, String connectedEnvironmentName); - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 connectedEnvironmentName); - - /** - * Delete an connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 connectedEnvironmentName, Context context); - - /** - * Update connected Environment's properties. - * - * Patches a Managed Environment. Only patching of tags is supported currently. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response}. - */ - Response updateWithResponse(String resourceGroupName, String connectedEnvironmentName, - Context context); - - /** - * Update connected Environment's properties. - * - * Patches a Managed Environment. Only patching of tags is supported currently. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connectedEnvironment. - * @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 an environment for Kubernetes cluster specialized for web workloads by Azure App Service. - */ - ConnectedEnvironment update(String resourceGroupName, String connectedEnvironmentName); - - /** - * Checks the resource connectedEnvironmentName availability. - * - * Checks if resource connectedEnvironmentName is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. - * @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 check availability result along with {@link Response}. - */ - Response checkNameAvailabilityWithResponse(String resourceGroupName, - String connectedEnvironmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context); - - /** - * Checks the resource connectedEnvironmentName availability. - * - * Checks if resource connectedEnvironmentName is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. - * @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 check availability result. - */ - CheckNameAvailabilityResponse checkNameAvailability(String resourceGroupName, String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest); - - /** - * Get the properties of an connectedEnvironment. - * - * @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 an connectedEnvironment along with {@link Response}. - */ - ConnectedEnvironment getById(String id); - - /** - * Get the properties of an connectedEnvironment. - * - * @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 an connectedEnvironment along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete an connectedEnvironment. - * - * @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 an connectedEnvironment. - * - * @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 ConnectedEnvironment resource. - * - * @param name resource name. - * @return the first stage of the new ConnectedEnvironment definition. - */ - ConnectedEnvironment.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsCertificates.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsCertificates.java deleted file mode 100644 index 58a536c24fb9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsCertificates.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (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 ConnectedEnvironmentsCertificates. - */ -public interface ConnectedEnvironmentsCertificates { - /** - * Get the Certificates in a given connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given connected environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String connectedEnvironmentName); - - /** - * Get the Certificates in a given connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Certificates in a given connected environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String connectedEnvironmentName, Context context); - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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 specified Certificate along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, - String certificateName, Context context); - - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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 specified Certificate. - */ - Certificate get(String resourceGroupName, String connectedEnvironmentName, String certificateName); - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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 Response}. - */ - Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String certificateName, - Context context); - - /** - * Deletes the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @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 connectedEnvironmentName, String certificateName); - - /** - * Get the specified Certificate. - * - * @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 specified Certificate along with {@link Response}. - */ - Certificate getById(String id); - - /** - * Get the specified Certificate. - * - * @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 specified Certificate along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes the specified Certificate. - * - * @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); - - /** - * Deletes the specified Certificate. - * - * @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 {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Certificate resource. - * - * @param name resource name. - * @return the first stage of the new Certificate definition. - */ - Certificate.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsDaprComponents.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsDaprComponents.java deleted file mode 100644 index f02d74ed7226..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsDaprComponents.java +++ /dev/null @@ -1,195 +0,0 @@ -// Copyright (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 ConnectedEnvironmentsDaprComponents. - */ -public interface ConnectedEnvironmentsDaprComponents { - /** - * Get the Dapr Components for a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String connectedEnvironmentName); - - /** - * Get the Dapr Components for a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String connectedEnvironmentName, Context context); - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, - String componentName, Context context); - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component. - */ - DaprComponent get(String resourceGroupName, String connectedEnvironmentName, String componentName); - - /** - * Delete a Dapr Component. - * - * Delete a Dapr Component from a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 Response}. - */ - Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String componentName, - Context context); - - /** - * Delete a Dapr Component. - * - * Delete a Dapr Component from a connected environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 connectedEnvironmentName, String componentName); - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component Secrets Collection for ListSecrets Action along with {@link Response}. - */ - Response listSecretsWithResponse(String resourceGroupName, String connectedEnvironmentName, - String componentName, Context context); - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component Secrets Collection for ListSecrets Action. - */ - DaprSecretsCollection listSecrets(String resourceGroupName, String connectedEnvironmentName, String componentName); - - /** - * Get a dapr component. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. - */ - DaprComponent getById(String id); - - /** - * Get a dapr component. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Dapr Component. - * - * Delete a Dapr Component from a connected environment. - * - * @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 Dapr Component. - * - * Delete a Dapr Component from a connected 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.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 Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new DaprComponent resource. - * - * @param name resource name. - * @return the first stage of the new DaprComponent definition. - */ - DaprComponent.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsStorages.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsStorages.java deleted file mode 100644 index 3b4ba9cde372..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsStorages.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (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 ConnectedEnvironmentsStorages. - */ -public interface ConnectedEnvironmentsStorages { - /** - * Get all storages for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a connectedEnvironment along with {@link Response}. - */ - Response listWithResponse(String resourceGroupName, - String connectedEnvironmentName, Context context); - - /** - * Get all storages for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a connectedEnvironment. - */ - ConnectedEnvironmentStoragesCollection list(String resourceGroupName, String connectedEnvironmentName); - - /** - * Get storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 storage for a connectedEnvironment along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, - String storageName, Context context); - - /** - * Get storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 storage for a connectedEnvironment. - */ - ConnectedEnvironmentStorage get(String resourceGroupName, String connectedEnvironmentName, String storageName); - - /** - * Delete storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 Response}. - */ - Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String storageName, - Context context); - - /** - * Delete storage for a connectedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 connectedEnvironmentName, String storageName); - - /** - * Get storage for a connectedEnvironment. - * - * @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 storage for a connectedEnvironment along with {@link Response}. - */ - ConnectedEnvironmentStorage getById(String id); - - /** - * Get storage for a connectedEnvironment. - * - * @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 storage for a connectedEnvironment along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete storage for a connectedEnvironment. - * - * @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 storage for a connectedEnvironment. - * - * @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 {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ConnectedEnvironmentStorage resource. - * - * @param name resource name. - * @return the first stage of the new ConnectedEnvironmentStorage definition. - */ - ConnectedEnvironmentStorage.DefinitionStages.Blank define(String name); -} 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 deleted file mode 100644 index dede37bf0485..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Container App container definition. - */ -@Fluent -public final class Container extends BaseContainer { - /* - * List of probes for the container. - */ - private List probes; - - /** - * Creates an instance of Container class. - */ - public Container() { - } - - /** - * Get the probes property: List of probes for the container. - * - * @return the probes value. - */ - public List probes() { - return this.probes; - } - - /** - * Set the probes property: List of probes for the container. - * - * @param probes the probes value to set. - * @return the Container object itself. - */ - public Container withProbes(List probes) { - this.probes = probes; - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Container withImage(String image) { - super.withImage(image); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Container withImageType(ImageType imageType) { - super.withImageType(imageType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Container withName(String name) { - super.withName(name); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Container withCommand(List command) { - super.withCommand(command); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Container withArgs(List args) { - super.withArgs(args); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Container withEnv(List env) { - super.withEnv(env); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Container withResources(ContainerResources resources) { - super.withResources(resources); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public Container withVolumeMounts(List volumeMounts) { - super.withVolumeMounts(volumeMounts); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (probes() != null) { - probes().forEach(e -> e.validate()); - } - if (env() != null) { - env().forEach(e -> e.validate()); - } - if (resources() != null) { - resources().validate(); - } - if (volumeMounts() != null) { - volumeMounts().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("image", image()); - jsonWriter.writeStringField("imageType", imageType() == null ? null : imageType().toString()); - jsonWriter.writeStringField("name", name()); - jsonWriter.writeArrayField("command", command(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("args", args(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("env", env(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("resources", resources()); - jsonWriter.writeArrayField("volumeMounts", volumeMounts(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("probes", this.probes, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Container from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Container if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the Container. - */ - public static Container fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Container deserializedContainer = new Container(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("image".equals(fieldName)) { - deserializedContainer.withImage(reader.getString()); - } else if ("imageType".equals(fieldName)) { - deserializedContainer.withImageType(ImageType.fromString(reader.getString())); - } else if ("name".equals(fieldName)) { - deserializedContainer.withName(reader.getString()); - } else if ("command".equals(fieldName)) { - List command = reader.readArray(reader1 -> reader1.getString()); - deserializedContainer.withCommand(command); - } else if ("args".equals(fieldName)) { - List args = reader.readArray(reader1 -> reader1.getString()); - deserializedContainer.withArgs(args); - } else if ("env".equals(fieldName)) { - List env = reader.readArray(reader1 -> EnvironmentVar.fromJson(reader1)); - deserializedContainer.withEnv(env); - } else if ("resources".equals(fieldName)) { - deserializedContainer.withResources(ContainerResources.fromJson(reader)); - } else if ("volumeMounts".equals(fieldName)) { - List volumeMounts = reader.readArray(reader1 -> VolumeMount.fromJson(reader1)); - deserializedContainer.withVolumeMounts(volumeMounts); - } else if ("probes".equals(fieldName)) { - List probes = reader.readArray(reader1 -> ContainerAppProbe.fromJson(reader1)); - deserializedContainer.probes = probes; - } else { - reader.skipChildren(); - } - } - - return deserializedContainer; - }); - } -} 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 deleted file mode 100644 index 3f86e3387c14..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java +++ /dev/null @@ -1,726 +0,0 @@ -// Copyright (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.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -import java.util.List; -import java.util.Map; - -/** - * An immutable client-side representation of ContainerApp. - */ -public interface ContainerApp { - /** - * 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 extendedLocation property: The complex type of the extended location. - * - * @return the extendedLocation value. - */ - ExtendedLocation extendedLocation(); - - /** - * Gets 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. - */ - ManagedServiceIdentity identity(); - - /** - * Gets 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. - */ - 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. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the provisioningState property: Provisioning state of the Container App. - * - * @return the provisioningState value. - */ - ContainerAppProvisioningState provisioningState(); - - /** - * Gets the deploymentErrors property: Any errors that occurred during deployment. - * - * @return the deploymentErrors value. - */ - String deploymentErrors(); - - /** - * Gets the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment. - * - * @return the managedEnvironmentId value. - */ - String managedEnvironmentId(); - - /** - * Gets the environmentId property: Resource ID of environment. - * - * @return the environmentId value. - */ - String environmentId(); - - /** - * Gets the workloadProfileName property: Workload profile name to pin for container app execution. - * - * @return the workloadProfileName value. - */ - 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. - * - * @return the latestRevisionName value. - */ - String latestRevisionName(); - - /** - * Gets the latestReadyRevisionName property: Name of the latest ready revision of the Container App. - * - * @return the latestReadyRevisionName value. - */ - String latestReadyRevisionName(); - - /** - * Gets the latestRevisionFqdn property: Fully Qualified Domain Name of the latest revision of the Container App. - * - * @return the latestRevisionFqdn value. - */ - String latestRevisionFqdn(); - - /** - * Gets the customDomainVerificationId property: Id used to verify domain name ownership. - * - * @return the customDomainVerificationId value. - */ - String customDomainVerificationId(); - - /** - * Gets the configuration property: Non versioned Container App configuration properties. - * - * @return the configuration value. - */ - Configuration configuration(); - - /** - * Gets the template property: Container App versioned application definition. - * - * @return the template value. - */ - Template template(); - - /** - * Gets the outboundIpAddresses property: Outbound IP Addresses for container app. - * - * @return the outboundIpAddresses value. - */ - List outboundIpAddresses(); - - /** - * Gets the eventStreamEndpoint property: The endpoint of the eventstream of the container app. - * - * @return the eventStreamEndpoint value. - */ - String eventStreamEndpoint(); - - /** - * 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.ContainerAppInner object. - * - * @return the inner object. - */ - ContainerAppInner innerModel(); - - /** - * The entirety of the ContainerApp definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The ContainerApp definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ContainerApp definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the ContainerApp 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 ContainerApp 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 ContainerApp 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.WithExtendedLocation, - DefinitionStages.WithIdentity, DefinitionStages.WithManagedBy, DefinitionStages.WithKind, - DefinitionStages.WithManagedEnvironmentId, DefinitionStages.WithEnvironmentId, - DefinitionStages.WithWorkloadProfileName, DefinitionStages.WithPatchingConfiguration, - DefinitionStages.WithConfiguration, DefinitionStages.WithTemplate { - /** - * Executes the create request. - * - * @return the created resource. - */ - ContainerApp create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ContainerApp create(Context context); - } - - /** - * The stage of the ContainerApp 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 ContainerApp definition allowing to specify extendedLocation. - */ - interface WithExtendedLocation { - /** - * Specifies the extendedLocation property: The complex type of the extended location.. - * - * @param extendedLocation The complex type of the extended location. - * @return the next definition stage. - */ - WithCreate withExtendedLocation(ExtendedLocation extendedLocation); - } - - /** - * The stage of the ContainerApp definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies 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 managed identities for the Container App to interact with other Azure services without - * maintaining any secrets or credentials in code. - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the ContainerApp definition allowing to specify managedBy. - */ - interface WithManagedBy { - /** - * Specifies 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 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 next definition stage. - */ - 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. - */ - interface WithManagedEnvironmentId { - /** - * Specifies the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment.. - * - * @param managedEnvironmentId Deprecated. Resource ID of the Container App's environment. - * @return the next definition stage. - */ - WithCreate withManagedEnvironmentId(String managedEnvironmentId); - } - - /** - * The stage of the ContainerApp definition allowing to specify environmentId. - */ - interface WithEnvironmentId { - /** - * Specifies the environmentId property: Resource ID of environment.. - * - * @param environmentId Resource ID of environment. - * @return the next definition stage. - */ - WithCreate withEnvironmentId(String environmentId); - } - - /** - * The stage of the ContainerApp definition allowing to specify workloadProfileName. - */ - interface WithWorkloadProfileName { - /** - * Specifies the workloadProfileName property: Workload profile name to pin for container app execution.. - * - * @param workloadProfileName Workload profile name to pin for container app execution. - * @return the next definition stage. - */ - 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. - */ - interface WithConfiguration { - /** - * Specifies the configuration property: Non versioned Container App configuration properties.. - * - * @param configuration Non versioned Container App configuration properties. - * @return the next definition stage. - */ - WithCreate withConfiguration(Configuration configuration); - } - - /** - * The stage of the ContainerApp definition allowing to specify template. - */ - interface WithTemplate { - /** - * Specifies the template property: Container App versioned application definition.. - * - * @param template Container App versioned application definition. - * @return the next definition stage. - */ - WithCreate withTemplate(Template template); - } - } - - /** - * Begins update for the ContainerApp resource. - * - * @return the stage of resource update. - */ - ContainerApp.Update update(); - - /** - * The template for ContainerApp update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithExtendedLocation, UpdateStages.WithIdentity, - UpdateStages.WithManagedBy, UpdateStages.WithWorkloadProfileName, UpdateStages.WithPatchingConfiguration, - UpdateStages.WithConfiguration, UpdateStages.WithTemplate { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ContainerApp apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ContainerApp apply(Context context); - } - - /** - * The ContainerApp update stages. - */ - interface UpdateStages { - /** - * The stage of the ContainerApp update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the ContainerApp update allowing to specify extendedLocation. - */ - interface WithExtendedLocation { - /** - * Specifies the extendedLocation property: The complex type of the extended location.. - * - * @param extendedLocation The complex type of the extended location. - * @return the next definition stage. - */ - Update withExtendedLocation(ExtendedLocation extendedLocation); - } - - /** - * The stage of the ContainerApp update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies 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 managed identities for the Container App to interact with other Azure services without - * maintaining any secrets or credentials in code. - * @return the next definition stage. - */ - Update withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the ContainerApp update allowing to specify managedBy. - */ - interface WithManagedBy { - /** - * Specifies 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 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 next definition stage. - */ - Update withManagedBy(String managedBy); - } - - /** - * The stage of the ContainerApp update allowing to specify workloadProfileName. - */ - interface WithWorkloadProfileName { - /** - * Specifies the workloadProfileName property: Workload profile name to pin for container app execution.. - * - * @param workloadProfileName Workload profile name to pin for container app execution. - * @return the next definition stage. - */ - 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. - */ - interface WithConfiguration { - /** - * Specifies the configuration property: Non versioned Container App configuration properties.. - * - * @param configuration Non versioned Container App configuration properties. - * @return the next definition stage. - */ - Update withConfiguration(Configuration configuration); - } - - /** - * The stage of the ContainerApp update allowing to specify template. - */ - interface WithTemplate { - /** - * Specifies the template property: Container App versioned application definition.. - * - * @param template Container App versioned application definition. - * @return the next definition stage. - */ - Update withTemplate(Template template); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ContainerApp refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ContainerApp refresh(Context context); - - /** - * Analyzes a custom hostname for a Container App. - * - * @param customHostname Custom hostname. - * @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 custom domain analysis along with {@link Response}. - */ - Response listCustomHostnameAnalysisWithResponse(String customHostname, - Context context); - - /** - * Analyzes a custom hostname for a Container App. - * - * @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 custom domain analysis. - */ - CustomHostnameAnalysisResult listCustomHostnameAnalysis(); - - /** - * List secrets for a container app. - * - * @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 Secrets Collection ARM resource along with {@link Response}. - */ - Response listSecretsWithResponse(Context context); - - /** - * List secrets for a container app. - * - * @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 Secrets Collection ARM resource. - */ - SecretsCollection listSecrets(); - - /** - * Get auth token for a container app. - * - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return auth token for a container app along with {@link Response}. - */ - Response getAuthTokenWithResponse(Context context); - - /** - * Get auth token for a container app. - * - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return auth token for a container app. - */ - ContainerAppAuthToken getAuthToken(); - - /** - * Start a container app. - * - * @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. - */ - ContainerApp start(); - - /** - * Start a container app. - * - * @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. - */ - ContainerApp start(Context context); - - /** - * Stop a container app. - * - * @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. - */ - ContainerApp stop(); - - /** - * Stop a container app. - * - * @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. - */ - ContainerApp stop(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppAuthToken.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppAuthToken.java deleted file mode 100644 index 48faf0c045db..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppAuthToken.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (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.ContainerAppAuthTokenInner; -import java.time.OffsetDateTime; -import java.util.Map; - -/** - * An immutable client-side representation of ContainerAppAuthToken. - */ -public interface ContainerAppAuthToken { - /** - * 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 token property: Auth token value. - * - * @return the token value. - */ - String token(); - - /** - * Gets the expires property: Token expiration date. - * - * @return the expires value. - */ - OffsetDateTime expires(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppAuthTokenInner object. - * - * @return the inner object. - */ - ContainerAppAuthTokenInner innerModel(); -} 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 deleted file mode 100644 index 1a61963f8c2d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppCollection.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -import java.io.IOException; -import java.util.List; - -/** - * Container App collection ARM resource. - */ -@Fluent -public final class ContainerAppCollection implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of ContainerAppCollection class. - */ - public ContainerAppCollection() { - } - - /** - * 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 ContainerAppCollection object itself. - */ - public ContainerAppCollection 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 ContainerAppCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppCollection if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContainerAppCollection. - */ - public static ContainerAppCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppCollection deserializedContainerAppCollection = new ContainerAppCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> ContainerAppInner.fromJson(reader1)); - deserializedContainerAppCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedContainerAppCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppContainerRunningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppContainerRunningState.java deleted file mode 100644 index 2345993fbb89..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppContainerRunningState.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Current running state of the container. - */ -public final class ContainerAppContainerRunningState extends ExpandableStringEnum { - /** - * Static value Running for ContainerAppContainerRunningState. - */ - public static final ContainerAppContainerRunningState RUNNING = fromString("Running"); - - /** - * Static value Terminated for ContainerAppContainerRunningState. - */ - public static final ContainerAppContainerRunningState TERMINATED = fromString("Terminated"); - - /** - * Static value Waiting for ContainerAppContainerRunningState. - */ - public static final ContainerAppContainerRunningState WAITING = fromString("Waiting"); - - /** - * Creates a new instance of ContainerAppContainerRunningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ContainerAppContainerRunningState() { - } - - /** - * Creates or finds a ContainerAppContainerRunningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ContainerAppContainerRunningState. - */ - public static ContainerAppContainerRunningState fromString(String name) { - return fromString(name, ContainerAppContainerRunningState.class); - } - - /** - * Gets known ContainerAppContainerRunningState values. - * - * @return known ContainerAppContainerRunningState values. - */ - public static Collection values() { - return values(ContainerAppContainerRunningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppJobExecutions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppJobExecutions.java deleted file mode 100644 index 2ff642890419..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppJobExecutions.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.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppJobExecutionsInner; -import java.util.List; - -/** - * An immutable client-side representation of ContainerAppJobExecutions. - */ -public interface ContainerAppJobExecutions { - /** - * Gets the value property: Collection of resources. - * - * @return the value value. - */ - List value(); - - /** - * Gets the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - String nextLink(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppJobExecutionsInner object. - * - * @return the inner object. - */ - ContainerAppJobExecutionsInner innerModel(); -} 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 deleted file mode 100644 index 417fa0b3698c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbe.java +++ /dev/null @@ -1,359 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Probe describes a health check to be performed against a container to determine whether it is alive or ready to - * receive traffic. - */ -@Fluent -public final class ContainerAppProbe implements JsonSerializable { - /* - * Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum - * value is 1. Maximum value is 10. - */ - private Integer failureThreshold; - - /* - * HTTPGet specifies the http request to perform. - */ - private ContainerAppProbeHttpGet httpGet; - - /* - * Number of seconds after the container has started before liveness probes are initiated. Minimum value is 1. - * Maximum value is 60. - */ - private Integer initialDelaySeconds; - - /* - * How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value is 240. - */ - 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. - */ - private Integer successThreshold; - - /* - * TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. - */ - 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) - */ - private Long terminationGracePeriodSeconds; - - /* - * Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is - * 240. - */ - private Integer timeoutSeconds; - - /* - * The type of probe. - */ - private Type type; - - /** - * Creates an instance of ContainerAppProbe class. - */ - public ContainerAppProbe() { - } - - /** - * Get the failureThreshold property: Minimum consecutive failures for the probe to be considered failed after - * having succeeded. Defaults to 3. Minimum value is 1. Maximum value is 10. - * - * @return the failureThreshold value. - */ - public Integer failureThreshold() { - return this.failureThreshold; - } - - /** - * Set the failureThreshold property: Minimum consecutive failures for the probe to be considered failed after - * having succeeded. Defaults to 3. Minimum value is 1. Maximum value is 10. - * - * @param failureThreshold the failureThreshold value to set. - * @return the ContainerAppProbe object itself. - */ - public ContainerAppProbe withFailureThreshold(Integer failureThreshold) { - this.failureThreshold = failureThreshold; - return this; - } - - /** - * Get the httpGet property: HTTPGet specifies the http request to perform. - * - * @return the httpGet value. - */ - public ContainerAppProbeHttpGet httpGet() { - return this.httpGet; - } - - /** - * Set the httpGet property: HTTPGet specifies the http request to perform. - * - * @param httpGet the httpGet value to set. - * @return the ContainerAppProbe object itself. - */ - public ContainerAppProbe withHttpGet(ContainerAppProbeHttpGet httpGet) { - this.httpGet = httpGet; - return this; - } - - /** - * Get the initialDelaySeconds property: Number of seconds after the container has started before liveness probes - * are initiated. Minimum value is 1. Maximum value is 60. - * - * @return the initialDelaySeconds value. - */ - public Integer initialDelaySeconds() { - return this.initialDelaySeconds; - } - - /** - * Set the initialDelaySeconds property: Number of seconds after the container has started before liveness probes - * are initiated. Minimum value is 1. Maximum value is 60. - * - * @param initialDelaySeconds the initialDelaySeconds value to set. - * @return the ContainerAppProbe object itself. - */ - public ContainerAppProbe withInitialDelaySeconds(Integer initialDelaySeconds) { - this.initialDelaySeconds = initialDelaySeconds; - return this; - } - - /** - * 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. - */ - public Integer periodSeconds() { - return this.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. - * - * @param periodSeconds the periodSeconds value to set. - * @return the ContainerAppProbe object itself. - */ - public ContainerAppProbe withPeriodSeconds(Integer periodSeconds) { - this.periodSeconds = periodSeconds; - return this; - } - - /** - * Get the successThreshold property: 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. - * - * @return the successThreshold value. - */ - public Integer successThreshold() { - return this.successThreshold; - } - - /** - * Set the successThreshold property: 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. - * - * @param successThreshold the successThreshold value to set. - * @return the ContainerAppProbe object itself. - */ - public ContainerAppProbe withSuccessThreshold(Integer successThreshold) { - this.successThreshold = successThreshold; - return this; - } - - /** - * Get the tcpSocket property: TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. - * - * @return the tcpSocket value. - */ - public ContainerAppProbeTcpSocket tcpSocket() { - return this.tcpSocket; - } - - /** - * Set the tcpSocket property: TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. - * - * @param tcpSocket the tcpSocket value to set. - * @return the ContainerAppProbe object itself. - */ - public ContainerAppProbe withTcpSocket(ContainerAppProbeTcpSocket tcpSocket) { - this.tcpSocket = tcpSocket; - return this; - } - - /** - * 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 - * 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). - * - * @return the terminationGracePeriodSeconds value. - */ - public Long terminationGracePeriodSeconds() { - return this.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 - * 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). - * - * @param terminationGracePeriodSeconds the terminationGracePeriodSeconds value to set. - * @return the ContainerAppProbe object itself. - */ - public ContainerAppProbe withTerminationGracePeriodSeconds(Long terminationGracePeriodSeconds) { - this.terminationGracePeriodSeconds = terminationGracePeriodSeconds; - return this; - } - - /** - * 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. - */ - public Integer timeoutSeconds() { - return this.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. - * - * @param timeoutSeconds the timeoutSeconds value to set. - * @return the ContainerAppProbe object itself. - */ - public ContainerAppProbe withTimeoutSeconds(Integer timeoutSeconds) { - this.timeoutSeconds = timeoutSeconds; - return this; - } - - /** - * Get the type property: The type of probe. - * - * @return the type value. - */ - public Type type() { - return this.type; - } - - /** - * Set the type property: The type of probe. - * - * @param type the type value to set. - * @return the ContainerAppProbe object itself. - */ - public ContainerAppProbe withType(Type type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (httpGet() != null) { - httpGet().validate(); - } - if (tcpSocket() != null) { - tcpSocket().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("failureThreshold", this.failureThreshold); - jsonWriter.writeJsonField("httpGet", this.httpGet); - jsonWriter.writeNumberField("initialDelaySeconds", this.initialDelaySeconds); - jsonWriter.writeNumberField("periodSeconds", this.periodSeconds); - jsonWriter.writeNumberField("successThreshold", this.successThreshold); - jsonWriter.writeJsonField("tcpSocket", this.tcpSocket); - jsonWriter.writeNumberField("terminationGracePeriodSeconds", this.terminationGracePeriodSeconds); - jsonWriter.writeNumberField("timeoutSeconds", this.timeoutSeconds); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppProbe from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppProbe if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ContainerAppProbe. - */ - public static ContainerAppProbe fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppProbe deserializedContainerAppProbe = new ContainerAppProbe(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("failureThreshold".equals(fieldName)) { - deserializedContainerAppProbe.failureThreshold = reader.getNullable(JsonReader::getInt); - } else if ("httpGet".equals(fieldName)) { - deserializedContainerAppProbe.httpGet = ContainerAppProbeHttpGet.fromJson(reader); - } else if ("initialDelaySeconds".equals(fieldName)) { - deserializedContainerAppProbe.initialDelaySeconds = reader.getNullable(JsonReader::getInt); - } else if ("periodSeconds".equals(fieldName)) { - deserializedContainerAppProbe.periodSeconds = reader.getNullable(JsonReader::getInt); - } else if ("successThreshold".equals(fieldName)) { - deserializedContainerAppProbe.successThreshold = reader.getNullable(JsonReader::getInt); - } else if ("tcpSocket".equals(fieldName)) { - deserializedContainerAppProbe.tcpSocket = ContainerAppProbeTcpSocket.fromJson(reader); - } else if ("terminationGracePeriodSeconds".equals(fieldName)) { - deserializedContainerAppProbe.terminationGracePeriodSeconds - = reader.getNullable(JsonReader::getLong); - } else if ("timeoutSeconds".equals(fieldName)) { - deserializedContainerAppProbe.timeoutSeconds = reader.getNullable(JsonReader::getInt); - } else if ("type".equals(fieldName)) { - deserializedContainerAppProbe.type = Type.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppProbe; - }); - } -} 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 deleted file mode 100644 index 75cd7d1ccba7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGet.java +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * HTTPGet specifies the http request to perform. - */ -@Fluent -public final class ContainerAppProbeHttpGet implements JsonSerializable { - /* - * Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. - */ - private String host; - - /* - * Custom headers to set in the request. HTTP allows repeated headers. - */ - private List httpHeaders; - - /* - * Path to access on the HTTP server. - */ - 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. - */ - private int port; - - /* - * Scheme to use for connecting to the host. Defaults to HTTP. - */ - private Scheme scheme; - - /** - * Creates an instance of ContainerAppProbeHttpGet class. - */ - public ContainerAppProbeHttpGet() { - } - - /** - * Get the host property: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in - * httpHeaders instead. - * - * @return the host value. - */ - public String host() { - return this.host; - } - - /** - * Set the host property: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in - * httpHeaders instead. - * - * @param host the host value to set. - * @return the ContainerAppProbeHttpGet object itself. - */ - public ContainerAppProbeHttpGet withHost(String host) { - this.host = host; - return this; - } - - /** - * Get the httpHeaders property: Custom headers to set in the request. HTTP allows repeated headers. - * - * @return the httpHeaders value. - */ - public List httpHeaders() { - return this.httpHeaders; - } - - /** - * Set the httpHeaders property: Custom headers to set in the request. HTTP allows repeated headers. - * - * @param httpHeaders the httpHeaders value to set. - * @return the ContainerAppProbeHttpGet object itself. - */ - public ContainerAppProbeHttpGet withHttpHeaders(List httpHeaders) { - this.httpHeaders = httpHeaders; - return this; - } - - /** - * Get the path property: Path to access on the HTTP server. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: Path to access on the HTTP server. - * - * @param path the path value to set. - * @return the ContainerAppProbeHttpGet object itself. - */ - public ContainerAppProbeHttpGet withPath(String path) { - this.path = path; - return this; - } - - /** - * Get the port property: 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. - * - * @return the port value. - */ - public int port() { - return this.port; - } - - /** - * Set the port property: 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. - * - * @param port the port value to set. - * @return the ContainerAppProbeHttpGet object itself. - */ - public ContainerAppProbeHttpGet withPort(int port) { - this.port = port; - return this; - } - - /** - * Get the scheme property: Scheme to use for connecting to the host. Defaults to HTTP. - * - * @return the scheme value. - */ - public Scheme scheme() { - return this.scheme; - } - - /** - * Set the scheme property: Scheme to use for connecting to the host. Defaults to HTTP. - * - * @param scheme the scheme value to set. - * @return the ContainerAppProbeHttpGet object itself. - */ - public ContainerAppProbeHttpGet withScheme(Scheme scheme) { - this.scheme = scheme; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (httpHeaders() != null) { - httpHeaders().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeIntField("port", this.port); - jsonWriter.writeStringField("host", this.host); - jsonWriter.writeArrayField("httpHeaders", this.httpHeaders, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("path", this.path); - jsonWriter.writeStringField("scheme", this.scheme == null ? null : this.scheme.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppProbeHttpGet from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppProbeHttpGet if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContainerAppProbeHttpGet. - */ - public static ContainerAppProbeHttpGet fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppProbeHttpGet deserializedContainerAppProbeHttpGet = new ContainerAppProbeHttpGet(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("port".equals(fieldName)) { - deserializedContainerAppProbeHttpGet.port = reader.getInt(); - } else if ("host".equals(fieldName)) { - deserializedContainerAppProbeHttpGet.host = reader.getString(); - } else if ("httpHeaders".equals(fieldName)) { - List httpHeaders - = reader.readArray(reader1 -> ContainerAppProbeHttpGetHttpHeadersItem.fromJson(reader1)); - deserializedContainerAppProbeHttpGet.httpHeaders = httpHeaders; - } else if ("path".equals(fieldName)) { - deserializedContainerAppProbeHttpGet.path = reader.getString(); - } else if ("scheme".equals(fieldName)) { - deserializedContainerAppProbeHttpGet.scheme = Scheme.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppProbeHttpGet; - }); - } -} 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 deleted file mode 100644 index 4c947e5689a2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGetHttpHeadersItem.java +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * HTTPHeader describes a custom header to be used in HTTP probes. - */ -@Fluent -public final class ContainerAppProbeHttpGetHttpHeadersItem - implements JsonSerializable { - /* - * The header field name - */ - private String name; - - /* - * The header field value - */ - private String value; - - /** - * Creates an instance of ContainerAppProbeHttpGetHttpHeadersItem class. - */ - public ContainerAppProbeHttpGetHttpHeadersItem() { - } - - /** - * Get the name property: The header field name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The header field name. - * - * @param name the name value to set. - * @return the ContainerAppProbeHttpGetHttpHeadersItem object itself. - */ - public ContainerAppProbeHttpGetHttpHeadersItem withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: The header field value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: The header field value. - * - * @param value the value value to set. - * @return the ContainerAppProbeHttpGetHttpHeadersItem object itself. - */ - public ContainerAppProbeHttpGetHttpHeadersItem withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property name in model ContainerAppProbeHttpGetHttpHeadersItem")); - } - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property value in model ContainerAppProbeHttpGetHttpHeadersItem")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContainerAppProbeHttpGetHttpHeadersItem.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("value", this.value); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppProbeHttpGetHttpHeadersItem from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppProbeHttpGetHttpHeadersItem if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContainerAppProbeHttpGetHttpHeadersItem. - */ - public static ContainerAppProbeHttpGetHttpHeadersItem fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppProbeHttpGetHttpHeadersItem deserializedContainerAppProbeHttpGetHttpHeadersItem - = new ContainerAppProbeHttpGetHttpHeadersItem(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedContainerAppProbeHttpGetHttpHeadersItem.name = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedContainerAppProbeHttpGetHttpHeadersItem.value = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppProbeHttpGetHttpHeadersItem; - }); - } -} 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 deleted file mode 100644 index bf143f4a5f77..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeTcpSocket.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. - */ -@Fluent -public final class ContainerAppProbeTcpSocket implements JsonSerializable { - /* - * Optional: Host name to connect to, defaults to the pod IP. - */ - 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. - */ - private int port; - - /** - * Creates an instance of ContainerAppProbeTcpSocket class. - */ - public ContainerAppProbeTcpSocket() { - } - - /** - * Get the host property: Optional: Host name to connect to, defaults to the pod IP. - * - * @return the host value. - */ - public String host() { - return this.host; - } - - /** - * Set the host property: Optional: Host name to connect to, defaults to the pod IP. - * - * @param host the host value to set. - * @return the ContainerAppProbeTcpSocket object itself. - */ - public ContainerAppProbeTcpSocket withHost(String host) { - this.host = host; - return this; - } - - /** - * Get the port property: 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. - * - * @return the port value. - */ - public int port() { - return this.port; - } - - /** - * Set the port property: 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. - * - * @param port the port value to set. - * @return the ContainerAppProbeTcpSocket object itself. - */ - public ContainerAppProbeTcpSocket withPort(int port) { - this.port = port; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeIntField("port", this.port); - jsonWriter.writeStringField("host", this.host); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppProbeTcpSocket from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppProbeTcpSocket if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContainerAppProbeTcpSocket. - */ - public static ContainerAppProbeTcpSocket fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppProbeTcpSocket deserializedContainerAppProbeTcpSocket = new ContainerAppProbeTcpSocket(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("port".equals(fieldName)) { - deserializedContainerAppProbeTcpSocket.port = reader.getInt(); - } else if ("host".equals(fieldName)) { - deserializedContainerAppProbeTcpSocket.host = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppProbeTcpSocket; - }); - } -} 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 deleted file mode 100644 index 538fd7361ad8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppPropertiesPatchingConfiguration.java +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container App auto patch configuration. - */ -@Fluent -public final class ContainerAppPropertiesPatchingConfiguration - implements JsonSerializable { - /* - * 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. - */ - 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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("patchingMode", this.patchingMode == null ? null : this.patchingMode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppPropertiesPatchingConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppPropertiesPatchingConfiguration if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ContainerAppPropertiesPatchingConfiguration. - */ - public static ContainerAppPropertiesPatchingConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppPropertiesPatchingConfiguration deserializedContainerAppPropertiesPatchingConfiguration - = new ContainerAppPropertiesPatchingConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("patchingMode".equals(fieldName)) { - deserializedContainerAppPropertiesPatchingConfiguration.patchingMode - = PatchingMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppPropertiesPatchingConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProvisioningState.java deleted file mode 100644 index e7993871a247..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProvisioningState.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Provisioning state of the Container App. - */ -public final class ContainerAppProvisioningState extends ExpandableStringEnum { - /** - * Static value InProgress for ContainerAppProvisioningState. - */ - public static final ContainerAppProvisioningState IN_PROGRESS = fromString("InProgress"); - - /** - * Static value Succeeded for ContainerAppProvisioningState. - */ - public static final ContainerAppProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for ContainerAppProvisioningState. - */ - public static final ContainerAppProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for ContainerAppProvisioningState. - */ - public static final ContainerAppProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Deleting for ContainerAppProvisioningState. - */ - public static final ContainerAppProvisioningState DELETING = fromString("Deleting"); - - /** - * Creates a new instance of ContainerAppProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ContainerAppProvisioningState() { - } - - /** - * Creates or finds a ContainerAppProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ContainerAppProvisioningState. - */ - public static ContainerAppProvisioningState fromString(String name) { - return fromString(name, ContainerAppProvisioningState.class); - } - - /** - * Gets known ContainerAppProvisioningState values. - * - * @return known ContainerAppProvisioningState values. - */ - public static Collection values() { - return values(ContainerAppProvisioningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppReplicaRunningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppReplicaRunningState.java deleted file mode 100644 index 327c9eb5b65f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppReplicaRunningState.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Current running state of the replica. - */ -public final class ContainerAppReplicaRunningState extends ExpandableStringEnum { - /** - * Static value Running for ContainerAppReplicaRunningState. - */ - public static final ContainerAppReplicaRunningState RUNNING = fromString("Running"); - - /** - * Static value NotRunning for ContainerAppReplicaRunningState. - */ - public static final ContainerAppReplicaRunningState NOT_RUNNING = fromString("NotRunning"); - - /** - * Static value Unknown for ContainerAppReplicaRunningState. - */ - public static final ContainerAppReplicaRunningState UNKNOWN = fromString("Unknown"); - - /** - * Creates a new instance of ContainerAppReplicaRunningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ContainerAppReplicaRunningState() { - } - - /** - * Creates or finds a ContainerAppReplicaRunningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding ContainerAppReplicaRunningState. - */ - public static ContainerAppReplicaRunningState fromString(String name) { - return fromString(name, ContainerAppReplicaRunningState.class); - } - - /** - * Gets known ContainerAppReplicaRunningState values. - * - * @return known ContainerAppReplicaRunningState values. - */ - public static Collection values() { - return values(ContainerAppReplicaRunningState.class); - } -} 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 deleted file mode 100644 index c647d95cff2b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppSecret.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (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.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container App Secret. - */ -@Immutable -public final class ContainerAppSecret implements JsonSerializable { - /* - * Secret Name. - */ - private String name; - - /* - * Secret Value. - */ - private String value; - - /* - * Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned - * identity. - */ - private String identity; - - /* - * Azure Key Vault URL pointing to the secret referenced by the container app. - */ - private String keyVaultUrl; - - /** - * Creates an instance of ContainerAppSecret class. - */ - public ContainerAppSecret() { - } - - /** - * Get the name property: Secret Name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the value property: Secret Value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Get the identity property: Resource ID of a managed identity to authenticate with Azure Key Vault, or System to - * use a system-assigned identity. - * - * @return the identity value. - */ - public String identity() { - return this.identity; - } - - /** - * Get the keyVaultUrl property: Azure Key Vault URL pointing to the secret referenced by the container app. - * - * @return the keyVaultUrl value. - */ - public String keyVaultUrl() { - return this.keyVaultUrl; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppSecret from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppSecret if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ContainerAppSecret. - */ - public static ContainerAppSecret fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppSecret deserializedContainerAppSecret = new ContainerAppSecret(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedContainerAppSecret.name = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedContainerAppSecret.value = reader.getString(); - } else if ("identity".equals(fieldName)) { - deserializedContainerAppSecret.identity = reader.getString(); - } else if ("keyVaultUrl".equals(fieldName)) { - deserializedContainerAppSecret.keyVaultUrl = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppSecret; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApps.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApps.java deleted file mode 100644 index c695056471b9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApps.java +++ /dev/null @@ -1,321 +0,0 @@ -// Copyright (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 ContainerApps. - */ -public interface ContainerApps { - /** - * Get the Container Apps 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 Container Apps in a given subscription as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Get the Container Apps 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 Container Apps in a given subscription as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * Get the Container Apps in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get the Container Apps in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps in a given resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container App along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String containerAppName, - Context context); - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container App. - */ - ContainerApp getByResourceGroup(String resourceGroupName, String containerAppName); - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 containerAppName); - - /** - * Delete a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 containerAppName, Context context); - - /** - * Analyzes a custom hostname for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param customHostname Custom hostname. - * @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 custom domain analysis along with {@link Response}. - */ - Response listCustomHostnameAnalysisWithResponse(String resourceGroupName, - String containerAppName, String customHostname, Context context); - - /** - * Analyzes a custom hostname for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 custom domain analysis. - */ - CustomHostnameAnalysisResult listCustomHostnameAnalysis(String resourceGroupName, String containerAppName); - - /** - * List secrets for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Secrets Collection ARM resource along with {@link Response}. - */ - Response listSecretsWithResponse(String resourceGroupName, String containerAppName, - Context context); - - /** - * List secrets for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Secrets Collection ARM resource. - */ - SecretsCollection listSecrets(String resourceGroupName, String containerAppName); - - /** - * Get auth token for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return auth token for a container app along with {@link Response}. - */ - Response getAuthTokenWithResponse(String resourceGroupName, String containerAppName, - Context context); - - /** - * Get auth token for a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return auth token for a container app. - */ - ContainerAppAuthToken getAuthToken(String resourceGroupName, String containerAppName); - - /** - * Start a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - ContainerApp start(String resourceGroupName, String containerAppName); - - /** - * Start a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - ContainerApp start(String resourceGroupName, String containerAppName, Context context); - - /** - * Stop a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - ContainerApp stop(String resourceGroupName, String containerAppName); - - /** - * Stop a container app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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. - */ - ContainerApp stop(String resourceGroupName, String containerAppName, Context context); - - /** - * Get the properties of a Container App. - * - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container App along with {@link Response}. - */ - ContainerApp getById(String id); - - /** - * Get the properties of a Container App. - * - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container App along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Container App. - * - * @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 Container App. - * - * @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 ContainerApp resource. - * - * @param name resource name. - * @return the first stage of the new ContainerApp definition. - */ - ContainerApp.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsAuthConfigs.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsAuthConfigs.java deleted file mode 100644 index 1859a1057108..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsAuthConfigs.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (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 ContainerAppsAuthConfigs. - */ -public interface ContainerAppsAuthConfigs { - /** - * Get the Container App AuthConfigs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Container App AuthConfigs in a given resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByContainerApp(String resourceGroupName, String containerAppName); - - /** - * Get the Container App AuthConfigs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Container App AuthConfigs in a given resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, Context context); - - /** - * Get a AuthConfig of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AuthConfig of a Container App along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String containerAppName, String authConfigName, - Context context); - - /** - * Get a AuthConfig of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AuthConfig of a Container App. - */ - AuthConfig get(String resourceGroupName, String containerAppName, String authConfigName); - - /** - * Delete a Container App AuthConfig. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @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 Response}. - */ - Response deleteWithResponse(String resourceGroupName, String containerAppName, String authConfigName, - Context context); - - /** - * Delete a Container App AuthConfig. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @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 containerAppName, String authConfigName); - - /** - * Get a AuthConfig of a Container App. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AuthConfig of a Container App along with {@link Response}. - */ - AuthConfig getById(String id); - - /** - * Get a AuthConfig of a Container App. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AuthConfig of a Container App along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Container App AuthConfig. - * - * @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 Container App AuthConfig. - * - * @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 {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new AuthConfig resource. - * - * @param name resource name. - * @return the first stage of the new AuthConfig definition. - */ - AuthConfig.DefinitionStages.Blank define(String name); -} 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 deleted file mode 100644 index d0764cdbf52f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildCollection.java +++ /dev/null @@ -1,136 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * The response of a Container Apps Build Resource list operation. - */ -@Fluent -public final class ContainerAppsBuildCollection implements JsonSerializable { - /* - * The Container Apps Build Resource items on this page - */ - private List value; - - /* - * The link to the next page of items - */ - 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); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppsBuildCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppsBuildCollection if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContainerAppsBuildCollection. - */ - public static ContainerAppsBuildCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppsBuildCollection deserializedContainerAppsBuildCollection = new ContainerAppsBuildCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ContainerAppsBuildResourceInner.fromJson(reader1)); - deserializedContainerAppsBuildCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedContainerAppsBuildCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppsBuildCollection; - }); - } -} 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 deleted file mode 100644 index 1404749df225..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildConfiguration.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (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.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Configuration of the build. - */ -@Immutable -public final class ContainerAppsBuildConfiguration implements JsonSerializable { - /* - * Base OS used to build and run the app. - */ - private String baseOs; - - /* - * Platform to be used to build and run the app. - */ - private String platform; - - /* - * Platform version to be used to build and run the app. - */ - private String platformVersion; - - /* - * List of environment variables to be passed to the build, secrets should not be used in environment variable. - */ - private List environmentVariables; - - /* - * List of steps to perform before the build. - */ - 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerAppsBuildConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerAppsBuildConfiguration if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ContainerAppsBuildConfiguration. - */ - public static ContainerAppsBuildConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerAppsBuildConfiguration deserializedContainerAppsBuildConfiguration - = new ContainerAppsBuildConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("baseOs".equals(fieldName)) { - deserializedContainerAppsBuildConfiguration.baseOs = reader.getString(); - } else if ("platform".equals(fieldName)) { - deserializedContainerAppsBuildConfiguration.platform = reader.getString(); - } else if ("platformVersion".equals(fieldName)) { - deserializedContainerAppsBuildConfiguration.platformVersion = reader.getString(); - } else if ("environmentVariables".equals(fieldName)) { - List environmentVariables - = reader.readArray(reader1 -> EnvironmentVariable.fromJson(reader1)); - deserializedContainerAppsBuildConfiguration.environmentVariables = environmentVariables; - } else if ("preBuildSteps".equals(fieldName)) { - List preBuildSteps = reader.readArray(reader1 -> PreBuildStep.fromJson(reader1)); - deserializedContainerAppsBuildConfiguration.preBuildSteps = preBuildSteps; - } else { - reader.skipChildren(); - } - } - - return deserializedContainerAppsBuildConfiguration; - }); - } -} 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 deleted file mode 100644 index e0a93c5e4895..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildResource.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.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 deleted file mode 100644 index 293579325fa1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuilds.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.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 deleted file mode 100644 index bb61f0cf9013..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildsByContainerApps.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.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/ContainerAppsDiagnostics.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsDiagnostics.java deleted file mode 100644 index 74e0bd45eb2c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsDiagnostics.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (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 ContainerAppsDiagnostics. - */ -public interface ContainerAppsDiagnostics { - /** - * Get the list of diagnostics for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which detector info is needed. - * @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 list of diagnostics for a given Container App as paginated response with {@link PagedIterable}. - */ - PagedIterable listDetectors(String resourceGroupName, String containerAppName); - - /** - * Get the list of diagnostics for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which detector info is needed. - * @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 list of diagnostics for a given Container App as paginated response with {@link PagedIterable}. - */ - PagedIterable listDetectors(String resourceGroupName, String containerAppName, Context context); - - /** - * Get a diagnostics result of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param detectorName Name of the Container App Detector. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a diagnostics result of a Container App along with {@link Response}. - */ - Response getDetectorWithResponse(String resourceGroupName, String containerAppName, - String detectorName, Context context); - - /** - * Get a diagnostics result of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param detectorName Name of the Container App Detector. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a diagnostics result of a Container App. - */ - Diagnostics getDetector(String resourceGroupName, String containerAppName, String detectorName); - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @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 Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - PagedIterable listRevisions(String resourceGroupName, String containerAppName); - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - PagedIterable listRevisions(String resourceGroupName, String containerAppName, String filter, - Context context); - - /** - * Get a revision of a 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App along with {@link Response}. - */ - Response getRevisionWithResponse(String resourceGroupName, String containerAppName, String revisionName, - Context context); - - /** - * Get a revision of a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App. - */ - Revision getRevision(String resourceGroupName, String containerAppName, String revisionName); - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container App along with {@link Response}. - */ - Response getRootWithResponse(String resourceGroupName, String containerAppName, Context context); - - /** - * Get the properties of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container App. - */ - ContainerApp getRoot(String resourceGroupName, String containerAppName); -} 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 deleted file mode 100644 index 0a032a7e86e3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatchResource.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.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 deleted file mode 100644 index 04509a19a50e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatches.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (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/ContainerAppsRevisionReplicas.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisionReplicas.java deleted file mode 100644 index 0bc8de8d41d7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisionReplicas.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.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ContainerAppsRevisionReplicas. - */ -public interface ContainerAppsRevisionReplicas { - /** - * Get a replica for a Container App Revision. - * - * @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. - * @param replicaName Name of the Container App Revision Replica. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a replica for a Container App Revision along with {@link Response}. - */ - Response getReplicaWithResponse(String resourceGroupName, String containerAppName, String revisionName, - String replicaName, Context context); - - /** - * Get a replica for a Container App Revision. - * - * @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. - * @param replicaName Name of the Container App Revision Replica. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a replica for a Container App Revision. - */ - Replica getReplica(String resourceGroupName, String containerAppName, String revisionName, String replicaName); - - /** - * List replicas for a Container App Revision. - * - * @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. - * @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 Revision Replicas collection ARM resource along with {@link Response}. - */ - Response listReplicasWithResponse(String resourceGroupName, String containerAppName, - String revisionName, Context context); - - /** - * List replicas for a Container App Revision. - * - * @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. - * @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 Revision Replicas collection ARM resource. - */ - ReplicaCollection listReplicas(String resourceGroupName, String containerAppName, String revisionName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisions.java deleted file mode 100644 index 60cb3b6963f7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisions.java +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright (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 ContainerAppsRevisions. - */ -public interface ContainerAppsRevisions { - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @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 Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - PagedIterable listRevisions(String resourceGroupName, String containerAppName); - - /** - * Get the Revisions for a given Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App for which Revisions are needed. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. - */ - PagedIterable listRevisions(String resourceGroupName, String containerAppName, String filter, - Context context); - - /** - * Get a revision of a 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. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App along with {@link Response}. - */ - Response getRevisionWithResponse(String resourceGroupName, String containerAppName, String revisionName, - Context context); - - /** - * Get a revision of a 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. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a revision of a Container App. - */ - Revision getRevision(String resourceGroupName, String containerAppName, String revisionName); - - /** - * Activates a revision for a 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. - * @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 Response}. - */ - Response activateRevisionWithResponse(String resourceGroupName, String containerAppName, String revisionName, - Context context); - - /** - * Activates a revision for a 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. - * @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 activateRevision(String resourceGroupName, String containerAppName, String revisionName); - - /** - * Deactivates a revision for a 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. - * @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 Response}. - */ - Response deactivateRevisionWithResponse(String resourceGroupName, String containerAppName, - String revisionName, Context context); - - /** - * Deactivates a revision for a 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. - * @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 deactivateRevision(String resourceGroupName, String containerAppName, String revisionName); - - /** - * Restarts a revision for a 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. - * @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 Response}. - */ - Response restartRevisionWithResponse(String resourceGroupName, String containerAppName, String revisionName, - Context context); - - /** - * Restarts a revision for a 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. - * @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 restartRevision(String resourceGroupName, String containerAppName, String revisionName); -} 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 deleted file mode 100644 index b07cb71bb503..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSessionPools.java +++ /dev/null @@ -1,168 +0,0 @@ -// Copyright (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.core.management.exception.ManagementException 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.core.management.exception.ManagementException 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.core.management.exception.ManagementException 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.core.management.exception.ManagementException 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.core.management.exception.ManagementException 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.core.management.exception.ManagementException 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.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String 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.core.management.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 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.core.management.exception.ManagementException 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.core.management.exception.ManagementException 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.core.management.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 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.core.management.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 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/ContainerAppsSourceControls.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSourceControls.java deleted file mode 100644 index da694047a71d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSourceControls.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (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 ContainerAppsSourceControls. - */ -public interface ContainerAppsSourceControls { - /** - * Get the Container App SourceControls in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Container App SourceControls in a given resource group as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByContainerApp(String resourceGroupName, String containerAppName); - - /** - * Get the Container App SourceControls in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @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 Container App SourceControls in a given resource group as paginated response with - * {@link PagedIterable}. - */ - PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, Context context); - - /** - * Get a SourceControl of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String containerAppName, String sourceControlName, - Context context); - - /** - * Get a SourceControl of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App. - */ - SourceControl get(String resourceGroupName, String containerAppName, String sourceControlName); - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @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 containerAppName, String sourceControlName); - - /** - * Delete a Container App SourceControl. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param sourceControlName Name of the Container App SourceControl. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. - * @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 containerAppName, String sourceControlName, String xMsGithubAuxiliary, - Boolean ignoreWorkflowDeletionFailure, Boolean deleteWorkflow, Context context); - - /** - * Get a SourceControl of a Container App. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App along with {@link Response}. - */ - SourceControl getById(String id); - - /** - * Get a SourceControl of a Container App. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Container App SourceControl. - * - * @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 Container App SourceControl. - * - * @param id the resource ID. - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @param ignoreWorkflowDeletionFailure Ignore Workflow Deletion Failure. - * @param deleteWorkflow Delete workflow. - * @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, String xMsGithubAuxiliary, Boolean ignoreWorkflowDeletionFailure, - Boolean deleteWorkflow, Context context); - - /** - * Begins definition for a new SourceControl resource. - * - * @param name resource name. - * @return the first stage of the new SourceControl definition. - */ - SourceControl.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 deleted file mode 100644 index 0ca01e367769..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerExecutionStatus.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container Apps Job execution container status. Contains status code and reason. - */ -@Fluent -public final class ContainerExecutionStatus implements JsonSerializable { - /* - * Container Name. - */ - private String name; - - /* - * Exit code - */ - private Integer code; - - /* - * Additional information for the container status - */ - private String additionalInformation; - - /* - * Status of the container - */ - 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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeNumberField("code", this.code); - jsonWriter.writeStringField("additionalInformation", this.additionalInformation); - jsonWriter.writeStringField("status", this.status); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerExecutionStatus from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerExecutionStatus if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ContainerExecutionStatus. - */ - public static ContainerExecutionStatus fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerExecutionStatus deserializedContainerExecutionStatus = new ContainerExecutionStatus(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedContainerExecutionStatus.name = reader.getString(); - } else if ("code".equals(fieldName)) { - deserializedContainerExecutionStatus.code = reader.getNullable(JsonReader::getInt); - } else if ("additionalInformation".equals(fieldName)) { - deserializedContainerExecutionStatus.additionalInformation = reader.getString(); - } else if ("status".equals(fieldName)) { - deserializedContainerExecutionStatus.status = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerExecutionStatus; - }); - } -} 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 deleted file mode 100644 index a20c60c56254..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistry.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model representing a mapping from a container registry to the identity used to connect to it. - */ -@Fluent -public final class ContainerRegistry implements JsonSerializable { - /* - * Login server of the container registry. - */ - private String containerRegistryServer; - - /* - * Resource ID of the managed identity. - */ - private String identityResourceId; - - /** - * Creates an instance of ContainerRegistry class. - */ - public ContainerRegistry() { - } - - /** - * Get the containerRegistryServer property: Login server of the container registry. - * - * @return the containerRegistryServer value. - */ - public String containerRegistryServer() { - return this.containerRegistryServer; - } - - /** - * Set the containerRegistryServer property: Login server of the container registry. - * - * @param containerRegistryServer the containerRegistryServer value to set. - * @return the ContainerRegistry object itself. - */ - public ContainerRegistry withContainerRegistryServer(String containerRegistryServer) { - this.containerRegistryServer = containerRegistryServer; - return this; - } - - /** - * Get the identityResourceId property: Resource ID of the managed identity. - * - * @return the identityResourceId value. - */ - public String identityResourceId() { - return this.identityResourceId; - } - - /** - * Set the identityResourceId property: Resource ID of the managed identity. - * - * @param identityResourceId the identityResourceId value to set. - * @return the ContainerRegistry object itself. - */ - public ContainerRegistry withIdentityResourceId(String identityResourceId) { - this.identityResourceId = identityResourceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (containerRegistryServer() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property containerRegistryServer in model ContainerRegistry")); - } - if (identityResourceId() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property identityResourceId in model ContainerRegistry")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContainerRegistry.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("containerRegistryServer", this.containerRegistryServer); - jsonWriter.writeStringField("identityResourceId", this.identityResourceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerRegistry from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerRegistry if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContainerRegistry. - */ - public static ContainerRegistry fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerRegistry deserializedContainerRegistry = new ContainerRegistry(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("containerRegistryServer".equals(fieldName)) { - deserializedContainerRegistry.containerRegistryServer = reader.getString(); - } else if ("identityResourceId".equals(fieldName)) { - deserializedContainerRegistry.identityResourceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerRegistry; - }); - } -} 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 deleted file mode 100644 index aefd2633fb20..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistryWithCustomImage.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container registry that the final image will be uploaded to. - */ -@Fluent -public final class ContainerRegistryWithCustomImage implements JsonSerializable { - /* - * 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. - */ - private String server; - - /* - * Full name that the final image should be uploaded as, including both image name and tag. - */ - private String image; - - /** - * Creates an instance of ContainerRegistryWithCustomImage class. - */ - public ContainerRegistryWithCustomImage() { - } - - /** - * Get the server property: Login server of the container registry that the final image should be uploaded to. - * Builder resource needs to have this container registry defined along with an identity to use to access it. - * - * @return the server value. - */ - public String server() { - return this.server; - } - - /** - * Set the server property: Login server of the container registry that the final image should be uploaded to. - * Builder resource needs to have this container registry defined along with an identity to use to access it. - * - * @param server the server value to set. - * @return the ContainerRegistryWithCustomImage object itself. - */ - public ContainerRegistryWithCustomImage withServer(String server) { - this.server = server; - return this; - } - - /** - * Get the image property: Full name that the final image should be uploaded as, including both image name and tag. - * - * @return the image value. - */ - public String image() { - return this.image; - } - - /** - * Set the image property: Full name that the final image should be uploaded as, including both image name and tag. - * - * @param image the image value to set. - * @return the ContainerRegistryWithCustomImage object itself. - */ - public ContainerRegistryWithCustomImage withImage(String image) { - this.image = image; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (server() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property server in model ContainerRegistryWithCustomImage")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ContainerRegistryWithCustomImage.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("server", this.server); - jsonWriter.writeStringField("image", this.image); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerRegistryWithCustomImage from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerRegistryWithCustomImage if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ContainerRegistryWithCustomImage. - */ - public static ContainerRegistryWithCustomImage fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerRegistryWithCustomImage deserializedContainerRegistryWithCustomImage - = new ContainerRegistryWithCustomImage(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("server".equals(fieldName)) { - deserializedContainerRegistryWithCustomImage.server = reader.getString(); - } else if ("image".equals(fieldName)) { - deserializedContainerRegistryWithCustomImage.image = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerRegistryWithCustomImage; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerResources.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerResources.java deleted file mode 100644 index 5e43d89033e1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerResources.java +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container App container resource requirements. - */ -@Fluent -public final class ContainerResources implements JsonSerializable { - /* - * Required CPU in cores, e.g. 0.5 - */ - private Double cpu; - - /* - * Required memory, e.g. "250Mb" - */ - private String memory; - - /* - * Ephemeral Storage, e.g. "1Gi" - */ - private String ephemeralStorage; - - /** - * Creates an instance of ContainerResources class. - */ - public ContainerResources() { - } - - /** - * 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 ContainerResources object itself. - */ - public ContainerResources 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 ContainerResources object itself. - */ - public ContainerResources withMemory(String memory) { - this.memory = memory; - return this; - } - - /** - * Get the ephemeralStorage property: Ephemeral Storage, e.g. "1Gi". - * - * @return the ephemeralStorage value. - */ - public String ephemeralStorage() { - return this.ephemeralStorage; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("cpu", this.cpu); - jsonWriter.writeStringField("memory", this.memory); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ContainerResources from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ContainerResources if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ContainerResources. - */ - public static ContainerResources fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ContainerResources deserializedContainerResources = new ContainerResources(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("cpu".equals(fieldName)) { - deserializedContainerResources.cpu = reader.getNullable(JsonReader::getDouble); - } else if ("memory".equals(fieldName)) { - deserializedContainerResources.memory = reader.getString(); - } else if ("ephemeralStorage".equals(fieldName)) { - deserializedContainerResources.ephemeralStorage = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedContainerResources; - }); - } -} 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 deleted file mode 100644 index e8b2e7cc4a58..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -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. - */ - 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/CookieExpiration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpiration.java deleted file mode 100644 index da298489c89e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpiration.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the session cookie's expiration. - */ -@Fluent -public final class CookieExpiration implements JsonSerializable { - /* - * The convention used when determining the session cookie's expiration. - */ - private CookieExpirationConvention convention; - - /* - * The time after the request is made when the session cookie should expire. - */ - private String timeToExpiration; - - /** - * Creates an instance of CookieExpiration class. - */ - public CookieExpiration() { - } - - /** - * Get the convention property: The convention used when determining the session cookie's expiration. - * - * @return the convention value. - */ - public CookieExpirationConvention convention() { - return this.convention; - } - - /** - * Set the convention property: The convention used when determining the session cookie's expiration. - * - * @param convention the convention value to set. - * @return the CookieExpiration object itself. - */ - public CookieExpiration withConvention(CookieExpirationConvention convention) { - this.convention = convention; - return this; - } - - /** - * Get the timeToExpiration property: The time after the request is made when the session cookie should expire. - * - * @return the timeToExpiration value. - */ - public String timeToExpiration() { - return this.timeToExpiration; - } - - /** - * Set the timeToExpiration property: The time after the request is made when the session cookie should expire. - * - * @param timeToExpiration the timeToExpiration value to set. - * @return the CookieExpiration object itself. - */ - public CookieExpiration withTimeToExpiration(String timeToExpiration) { - this.timeToExpiration = timeToExpiration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("convention", this.convention == null ? null : this.convention.toString()); - jsonWriter.writeStringField("timeToExpiration", this.timeToExpiration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CookieExpiration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CookieExpiration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the CookieExpiration. - */ - public static CookieExpiration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CookieExpiration deserializedCookieExpiration = new CookieExpiration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("convention".equals(fieldName)) { - deserializedCookieExpiration.convention = CookieExpirationConvention.fromString(reader.getString()); - } else if ("timeToExpiration".equals(fieldName)) { - deserializedCookieExpiration.timeToExpiration = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCookieExpiration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpirationConvention.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpirationConvention.java deleted file mode 100644 index c7940865b546..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpirationConvention.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -/** - * The convention used when determining the session cookie's expiration. - */ -public enum CookieExpirationConvention { - /** - * Enum value FixedTime. - */ - FIXED_TIME("FixedTime"), - - /** - * Enum value IdentityProviderDerived. - */ - IDENTITY_PROVIDER_DERIVED("IdentityProviderDerived"); - - /** - * The actual serialized value for a CookieExpirationConvention instance. - */ - private final String value; - - CookieExpirationConvention(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a CookieExpirationConvention instance. - * - * @param value the serialized value to parse. - * @return the parsed CookieExpirationConvention object, or null if unable to parse. - */ - public static CookieExpirationConvention fromString(String value) { - if (value == null) { - return null; - } - CookieExpirationConvention[] items = CookieExpirationConvention.values(); - for (CookieExpirationConvention item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index 29a0f3cf4d68..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CorsPolicy.java +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Cross-Origin-Resource-Sharing policy. - */ -@Fluent -public final class CorsPolicy implements JsonSerializable { - /* - * Specifies the content for the access-control-allow-origins header - */ - private List allowedOrigins; - - /* - * Specifies the content for the access-control-allow-methods header - */ - private List allowedMethods; - - /* - * Specifies the content for the access-control-allow-headers header - */ - private List allowedHeaders; - - /* - * Specifies the content for the access-control-expose-headers header - */ - private List exposeHeaders; - - /* - * Specifies the content for the access-control-max-age header - */ - private Integer maxAge; - - /* - * Specifies whether the resource allows credentials - */ - private Boolean allowCredentials; - - /** - * Creates an instance of CorsPolicy class. - */ - public CorsPolicy() { - } - - /** - * Get the allowedOrigins property: Specifies the content for the access-control-allow-origins header. - * - * @return the allowedOrigins value. - */ - public List allowedOrigins() { - return this.allowedOrigins; - } - - /** - * Set the allowedOrigins property: Specifies the content for the access-control-allow-origins header. - * - * @param allowedOrigins the allowedOrigins value to set. - * @return the CorsPolicy object itself. - */ - public CorsPolicy withAllowedOrigins(List allowedOrigins) { - this.allowedOrigins = allowedOrigins; - return this; - } - - /** - * Get the allowedMethods property: Specifies the content for the access-control-allow-methods header. - * - * @return the allowedMethods value. - */ - public List allowedMethods() { - return this.allowedMethods; - } - - /** - * Set the allowedMethods property: Specifies the content for the access-control-allow-methods header. - * - * @param allowedMethods the allowedMethods value to set. - * @return the CorsPolicy object itself. - */ - public CorsPolicy withAllowedMethods(List allowedMethods) { - this.allowedMethods = allowedMethods; - return this; - } - - /** - * Get the allowedHeaders property: Specifies the content for the access-control-allow-headers header. - * - * @return the allowedHeaders value. - */ - public List allowedHeaders() { - return this.allowedHeaders; - } - - /** - * Set the allowedHeaders property: Specifies the content for the access-control-allow-headers header. - * - * @param allowedHeaders the allowedHeaders value to set. - * @return the CorsPolicy object itself. - */ - public CorsPolicy withAllowedHeaders(List allowedHeaders) { - this.allowedHeaders = allowedHeaders; - return this; - } - - /** - * Get the exposeHeaders property: Specifies the content for the access-control-expose-headers header. - * - * @return the exposeHeaders value. - */ - public List exposeHeaders() { - return this.exposeHeaders; - } - - /** - * Set the exposeHeaders property: Specifies the content for the access-control-expose-headers header. - * - * @param exposeHeaders the exposeHeaders value to set. - * @return the CorsPolicy object itself. - */ - public CorsPolicy withExposeHeaders(List exposeHeaders) { - this.exposeHeaders = exposeHeaders; - return this; - } - - /** - * Get the maxAge property: Specifies the content for the access-control-max-age header. - * - * @return the maxAge value. - */ - public Integer maxAge() { - return this.maxAge; - } - - /** - * Set the maxAge property: Specifies the content for the access-control-max-age header. - * - * @param maxAge the maxAge value to set. - * @return the CorsPolicy object itself. - */ - public CorsPolicy withMaxAge(Integer maxAge) { - this.maxAge = maxAge; - return this; - } - - /** - * Get the allowCredentials property: Specifies whether the resource allows credentials. - * - * @return the allowCredentials value. - */ - public Boolean allowCredentials() { - return this.allowCredentials; - } - - /** - * Set the allowCredentials property: Specifies whether the resource allows credentials. - * - * @param allowCredentials the allowCredentials value to set. - * @return the CorsPolicy object itself. - */ - public CorsPolicy withAllowCredentials(Boolean allowCredentials) { - this.allowCredentials = allowCredentials; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (allowedOrigins() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property allowedOrigins in model CorsPolicy")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CorsPolicy.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("allowedOrigins", this.allowedOrigins, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("allowedMethods", this.allowedMethods, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("allowedHeaders", this.allowedHeaders, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("exposeHeaders", this.exposeHeaders, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeNumberField("maxAge", this.maxAge); - jsonWriter.writeBooleanField("allowCredentials", this.allowCredentials); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CorsPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CorsPolicy if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CorsPolicy. - */ - public static CorsPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CorsPolicy deserializedCorsPolicy = new CorsPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("allowedOrigins".equals(fieldName)) { - List allowedOrigins = reader.readArray(reader1 -> reader1.getString()); - deserializedCorsPolicy.allowedOrigins = allowedOrigins; - } else if ("allowedMethods".equals(fieldName)) { - List allowedMethods = reader.readArray(reader1 -> reader1.getString()); - deserializedCorsPolicy.allowedMethods = allowedMethods; - } else if ("allowedHeaders".equals(fieldName)) { - List allowedHeaders = reader.readArray(reader1 -> reader1.getString()); - deserializedCorsPolicy.allowedHeaders = allowedHeaders; - } else if ("exposeHeaders".equals(fieldName)) { - List exposeHeaders = reader.readArray(reader1 -> reader1.getString()); - deserializedCorsPolicy.exposeHeaders = exposeHeaders; - } else if ("maxAge".equals(fieldName)) { - deserializedCorsPolicy.maxAge = reader.getNullable(JsonReader::getInt); - } else if ("allowCredentials".equals(fieldName)) { - deserializedCorsPolicy.allowCredentials = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedCorsPolicy; - }); - } -} 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 deleted file mode 100644 index 63725b65db72..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomContainerTemplate.java +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Custom container configuration. - */ -@Fluent -public final class CustomContainerTemplate implements JsonSerializable { - /* - * Private container registry credentials for containers used by the sessions of the session pool. - */ - private SessionRegistryCredentials registryCredentials; - - /* - * List of container definitions for the sessions of the session pool. - */ - private List containers; - - /* - * Session pool ingress configuration. - */ - 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(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("registryCredentials", this.registryCredentials); - jsonWriter.writeArrayField("containers", this.containers, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("ingress", this.ingress); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomContainerTemplate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomContainerTemplate if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the CustomContainerTemplate. - */ - public static CustomContainerTemplate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomContainerTemplate deserializedCustomContainerTemplate = new CustomContainerTemplate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("registryCredentials".equals(fieldName)) { - deserializedCustomContainerTemplate.registryCredentials - = SessionRegistryCredentials.fromJson(reader); - } else if ("containers".equals(fieldName)) { - List containers = reader.readArray(reader1 -> SessionContainer.fromJson(reader1)); - deserializedCustomContainerTemplate.containers = containers; - } else if ("ingress".equals(fieldName)) { - deserializedCustomContainerTemplate.ingress = SessionIngress.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCustomContainerTemplate; - }); - } -} 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 deleted file mode 100644 index d5d83f6444e7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomain.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Custom Domain of a Container App. - */ -@Fluent -public final class CustomDomain implements JsonSerializable { - /* - * Hostname. - */ - private String name; - - /* - * Custom Domain binding type. - */ - private BindingType bindingType; - - /* - * Resource Id of the Certificate to be bound to this hostname. Must exist in the Managed Environment. - */ - private String certificateId; - - /** - * Creates an instance of CustomDomain class. - */ - public CustomDomain() { - } - - /** - * Get the name property: Hostname. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Hostname. - * - * @param name the name value to set. - * @return the CustomDomain object itself. - */ - public CustomDomain withName(String name) { - this.name = name; - return this; - } - - /** - * Get the bindingType property: Custom Domain binding type. - * - * @return the bindingType value. - */ - public BindingType bindingType() { - return this.bindingType; - } - - /** - * Set the bindingType property: Custom Domain binding type. - * - * @param bindingType the bindingType value to set. - * @return the CustomDomain object itself. - */ - public CustomDomain withBindingType(BindingType bindingType) { - this.bindingType = bindingType; - return this; - } - - /** - * Get the certificateId property: Resource Id of the Certificate to be bound to this hostname. Must exist in the - * Managed Environment. - * - * @return the certificateId value. - */ - public String certificateId() { - return this.certificateId; - } - - /** - * Set the certificateId property: Resource Id of the Certificate to be bound to this hostname. Must exist in the - * Managed Environment. - * - * @param certificateId the certificateId value to set. - * @return the CustomDomain object itself. - */ - public CustomDomain withCertificateId(String certificateId) { - this.certificateId = certificateId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model CustomDomain")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(CustomDomain.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("bindingType", this.bindingType == null ? null : this.bindingType.toString()); - jsonWriter.writeStringField("certificateId", this.certificateId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomDomain from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomDomain if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the CustomDomain. - */ - public static CustomDomain fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomDomain deserializedCustomDomain = new CustomDomain(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedCustomDomain.name = reader.getString(); - } else if ("bindingType".equals(fieldName)) { - deserializedCustomDomain.bindingType = BindingType.fromString(reader.getString()); - } else if ("certificateId".equals(fieldName)) { - deserializedCustomDomain.certificateId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCustomDomain; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomainConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomainConfiguration.java deleted file mode 100644 index 543efc3f3adf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomainConfiguration.java +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright (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.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * Configuration properties for apps environment custom domain. - */ -@Fluent -public final class CustomDomainConfiguration implements JsonSerializable { - /* - * Id used to verify domain name ownership - */ - private String customDomainVerificationId; - - /* - * Dns suffix for the environment domain - */ - private String dnsSuffix; - - /* - * Certificate stored in Azure Key Vault. - */ - private CertificateKeyVaultProperties certificateKeyVaultProperties; - - /* - * PFX or PEM blob - */ - private byte[] certificateValue; - - /* - * Certificate password - */ - private String certificatePassword; - - /* - * Certificate expiration date. - */ - private OffsetDateTime expirationDate; - - /* - * Certificate thumbprint. - */ - private String thumbprint; - - /* - * Subject name of the certificate. - */ - private String subjectName; - - /** - * Creates an instance of CustomDomainConfiguration class. - */ - public CustomDomainConfiguration() { - } - - /** - * Get the customDomainVerificationId property: Id used to verify domain name ownership. - * - * @return the customDomainVerificationId value. - */ - public String customDomainVerificationId() { - return this.customDomainVerificationId; - } - - /** - * Get the dnsSuffix property: Dns suffix for the environment domain. - * - * @return the dnsSuffix value. - */ - public String dnsSuffix() { - return this.dnsSuffix; - } - - /** - * Set the dnsSuffix property: Dns suffix for the environment domain. - * - * @param dnsSuffix the dnsSuffix value to set. - * @return the CustomDomainConfiguration object itself. - */ - public CustomDomainConfiguration withDnsSuffix(String dnsSuffix) { - this.dnsSuffix = dnsSuffix; - return this; - } - - /** - * Get the certificateKeyVaultProperties property: Certificate stored in Azure Key Vault. - * - * @return the certificateKeyVaultProperties value. - */ - public CertificateKeyVaultProperties certificateKeyVaultProperties() { - return this.certificateKeyVaultProperties; - } - - /** - * Set the certificateKeyVaultProperties property: Certificate stored in Azure Key Vault. - * - * @param certificateKeyVaultProperties the certificateKeyVaultProperties value to set. - * @return the CustomDomainConfiguration object itself. - */ - public CustomDomainConfiguration - withCertificateKeyVaultProperties(CertificateKeyVaultProperties certificateKeyVaultProperties) { - this.certificateKeyVaultProperties = certificateKeyVaultProperties; - return this; - } - - /** - * Get the certificateValue property: PFX or PEM blob. - * - * @return the certificateValue value. - */ - public byte[] certificateValue() { - return CoreUtils.clone(this.certificateValue); - } - - /** - * Set the certificateValue property: PFX or PEM blob. - * - * @param certificateValue the certificateValue value to set. - * @return the CustomDomainConfiguration object itself. - */ - public CustomDomainConfiguration withCertificateValue(byte[] certificateValue) { - this.certificateValue = CoreUtils.clone(certificateValue); - return this; - } - - /** - * Get the certificatePassword property: Certificate password. - * - * @return the certificatePassword value. - */ - public String certificatePassword() { - return this.certificatePassword; - } - - /** - * Set the certificatePassword property: Certificate password. - * - * @param certificatePassword the certificatePassword value to set. - * @return the CustomDomainConfiguration object itself. - */ - public CustomDomainConfiguration withCertificatePassword(String certificatePassword) { - this.certificatePassword = certificatePassword; - return this; - } - - /** - * Get the expirationDate property: Certificate expiration date. - * - * @return the expirationDate value. - */ - public OffsetDateTime expirationDate() { - return this.expirationDate; - } - - /** - * Get the thumbprint property: Certificate thumbprint. - * - * @return the thumbprint value. - */ - public String thumbprint() { - return this.thumbprint; - } - - /** - * Get the subjectName property: Subject name of the certificate. - * - * @return the subjectName value. - */ - public String subjectName() { - return this.subjectName; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (certificateKeyVaultProperties() != null) { - certificateKeyVaultProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("dnsSuffix", this.dnsSuffix); - jsonWriter.writeJsonField("certificateKeyVaultProperties", this.certificateKeyVaultProperties); - jsonWriter.writeBinaryField("certificateValue", this.certificateValue); - jsonWriter.writeStringField("certificatePassword", this.certificatePassword); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomDomainConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomDomainConfiguration if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CustomDomainConfiguration. - */ - public static CustomDomainConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomDomainConfiguration deserializedCustomDomainConfiguration = new CustomDomainConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("customDomainVerificationId".equals(fieldName)) { - deserializedCustomDomainConfiguration.customDomainVerificationId = reader.getString(); - } else if ("dnsSuffix".equals(fieldName)) { - deserializedCustomDomainConfiguration.dnsSuffix = reader.getString(); - } else if ("certificateKeyVaultProperties".equals(fieldName)) { - deserializedCustomDomainConfiguration.certificateKeyVaultProperties - = CertificateKeyVaultProperties.fromJson(reader); - } else if ("certificateValue".equals(fieldName)) { - deserializedCustomDomainConfiguration.certificateValue = reader.getBinary(); - } else if ("certificatePassword".equals(fieldName)) { - deserializedCustomDomainConfiguration.certificatePassword = reader.getString(); - } else if ("expirationDate".equals(fieldName)) { - deserializedCustomDomainConfiguration.expirationDate = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("thumbprint".equals(fieldName)) { - deserializedCustomDomainConfiguration.thumbprint = reader.getString(); - } else if ("subjectName".equals(fieldName)) { - deserializedCustomDomainConfiguration.subjectName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCustomDomainConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResult.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResult.java deleted file mode 100644 index 27c48d9aa597..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResult.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.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; -import java.util.List; - -/** - * An immutable client-side representation of CustomHostnameAnalysisResult. - */ -public interface CustomHostnameAnalysisResult { - /** - * Gets the hostname property: Host name that was analyzed. - * - * @return the hostname value. - */ - String hostname(); - - /** - * Gets the isHostnameAlreadyVerified property: <code>true</code> if hostname is already verified; - * otherwise, <code>false</code>. - * - * @return the isHostnameAlreadyVerified value. - */ - Boolean isHostnameAlreadyVerified(); - - /** - * Gets the customDomainVerificationTest property: DNS verification test result. - * - * @return the customDomainVerificationTest value. - */ - DnsVerificationTestResult customDomainVerificationTest(); - - /** - * Gets the customDomainVerificationFailureInfo property: Raw failure information if DNS verification fails. - * - * @return the customDomainVerificationFailureInfo value. - */ - CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo(); - - /** - * Gets the hasConflictOnManagedEnvironment property: <code>true</code> if there is a conflict on the - * Container App's managed environment; otherwise, <code>false</code>. - * - * @return the hasConflictOnManagedEnvironment value. - */ - Boolean hasConflictOnManagedEnvironment(); - - /** - * Gets 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. - */ - Boolean conflictWithEnvironmentCustomDomain(); - - /** - * Gets the conflictingContainerAppResourceId property: Name of the conflicting Container App on the Managed - * Environment if it's within the same subscription. - * - * @return the conflictingContainerAppResourceId value. - */ - String conflictingContainerAppResourceId(); - - /** - * Gets the cNameRecords property: CName records visible for this hostname. - * - * @return the cNameRecords value. - */ - List cNameRecords(); - - /** - * Gets the txtRecords property: TXT records visible for this hostname. - * - * @return the txtRecords value. - */ - List txtRecords(); - - /** - * Gets the aRecords property: A records visible for this hostname. - * - * @return the aRecords value. - */ - List aRecords(); - - /** - * Gets the alternateCNameRecords property: Alternate CName records visible for this hostname. - * - * @return the alternateCNameRecords value. - */ - List alternateCNameRecords(); - - /** - * Gets the alternateTxtRecords property: Alternate TXT records visible for this hostname. - * - * @return the alternateTxtRecords value. - */ - List alternateTxtRecords(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner object. - * - * @return the inner object. - */ - CustomHostnameAnalysisResultInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.java deleted file mode 100644 index 12e0c9ad2519..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Raw failure information if DNS verification fails. - */ -@Fluent -public final class CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo - implements JsonSerializable { - /* - * Standardized string to programmatically identify the error. - */ - private String code; - - /* - * Detailed error description and debugging information. - */ - private String message; - - /* - * Detailed error description and debugging information. - */ - private String target; - - /* - * Details or the error - */ - private List details; - - /** - * Creates an instance of CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo class. - */ - public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo() { - } - - /** - * Get the code property: Standardized string to programmatically identify the error. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Get the message property: Detailed error description and debugging information. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Get the target property: Detailed error description and debugging information. - * - * @return the target value. - */ - public String target() { - return this.target; - } - - /** - * Get the details property: Details or the error. - * - * @return the details value. - */ - public List details() { - return this.details; - } - - /** - * Set the details property: Details or the error. - * - * @param details the details value to set. - * @return the CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo object itself. - */ - public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo - withDetails(List details) { - this.details = details; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (details() != null) { - details().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("details", this.details, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo if the JsonReader was - * pointing to an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the - * CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo. - */ - public static CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo deserializedCustomHostnameAnalysisResultCustomDomainVerificationFailureInfo - = new CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("code".equals(fieldName)) { - deserializedCustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.code - = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedCustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.message - = reader.getString(); - } else if ("target".equals(fieldName)) { - deserializedCustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.target - = reader.getString(); - } else if ("details".equals(fieldName)) { - List details = reader - .readArray(reader1 -> CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem - .fromJson(reader1)); - deserializedCustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.details = details; - } else { - reader.skipChildren(); - } - } - - return deserializedCustomHostnameAnalysisResultCustomDomainVerificationFailureInfo; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.java deleted file mode 100644 index 499ba7d2784c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (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.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Detailed errors. - */ -@Immutable -public final class CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem - implements JsonSerializable { - /* - * Standardized string to programmatically identify the error. - */ - private String code; - - /* - * Detailed error description and debugging information. - */ - private String message; - - /* - * Detailed error description and debugging information. - */ - private String target; - - /** - * Creates an instance of CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem class. - */ - public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem() { - } - - /** - * Get the code property: Standardized string to programmatically identify the error. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Get the message property: Detailed error description and debugging information. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Get the target property: Detailed error description and debugging information. - * - * @return the target value. - */ - public String target() { - return this.target; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem from the - * JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem if the - * JsonReader was pointing to an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the - * CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem. - */ - public static CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem - fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem deserializedCustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem - = new CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("code".equals(fieldName)) { - deserializedCustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.code - = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedCustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.message - = reader.getString(); - } else if ("target".equals(fieldName)) { - deserializedCustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.target - = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomOpenIdConnectProvider.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomOpenIdConnectProvider.java deleted file mode 100644 index 3d2c8518522f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomOpenIdConnectProvider.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the custom Open ID Connect provider. - */ -@Fluent -public final class CustomOpenIdConnectProvider implements JsonSerializable { - /* - * false if the custom Open ID provider provider should not be enabled; otherwise, true. - */ - private Boolean enabled; - - /* - * The configuration settings of the app registration for the custom Open ID Connect provider. - */ - private OpenIdConnectRegistration registration; - - /* - * The configuration settings of the login flow of the custom Open ID Connect provider. - */ - private OpenIdConnectLogin login; - - /** - * Creates an instance of CustomOpenIdConnectProvider class. - */ - public CustomOpenIdConnectProvider() { - } - - /** - * Get the enabled property: <code>false</code> if the custom Open ID provider provider should not be - * enabled; otherwise, <code>true</code>. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: <code>false</code> if the custom Open ID provider provider should not be - * enabled; otherwise, <code>true</code>. - * - * @param enabled the enabled value to set. - * @return the CustomOpenIdConnectProvider object itself. - */ - public CustomOpenIdConnectProvider withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the registration property: The configuration settings of the app registration for the custom Open ID Connect - * provider. - * - * @return the registration value. - */ - public OpenIdConnectRegistration registration() { - return this.registration; - } - - /** - * Set the registration property: The configuration settings of the app registration for the custom Open ID Connect - * provider. - * - * @param registration the registration value to set. - * @return the CustomOpenIdConnectProvider object itself. - */ - public CustomOpenIdConnectProvider withRegistration(OpenIdConnectRegistration registration) { - this.registration = registration; - return this; - } - - /** - * Get the login property: The configuration settings of the login flow of the custom Open ID Connect provider. - * - * @return the login value. - */ - public OpenIdConnectLogin login() { - return this.login; - } - - /** - * Set the login property: The configuration settings of the login flow of the custom Open ID Connect provider. - * - * @param login the login value to set. - * @return the CustomOpenIdConnectProvider object itself. - */ - public CustomOpenIdConnectProvider withLogin(OpenIdConnectLogin login) { - this.login = login; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (registration() != null) { - registration().validate(); - } - if (login() != null) { - login().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeJsonField("registration", this.registration); - jsonWriter.writeJsonField("login", this.login); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomOpenIdConnectProvider from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomOpenIdConnectProvider if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the CustomOpenIdConnectProvider. - */ - public static CustomOpenIdConnectProvider fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomOpenIdConnectProvider deserializedCustomOpenIdConnectProvider = new CustomOpenIdConnectProvider(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedCustomOpenIdConnectProvider.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("registration".equals(fieldName)) { - deserializedCustomOpenIdConnectProvider.registration = OpenIdConnectRegistration.fromJson(reader); - } else if ("login".equals(fieldName)) { - deserializedCustomOpenIdConnectProvider.login = OpenIdConnectLogin.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedCustomOpenIdConnectProvider; - }); - } -} 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 deleted file mode 100644 index 2a63f74b802b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Container App container Custom scaling rule. - */ -@Fluent -public final class CustomScaleRule implements JsonSerializable { - /* - * Type of the custom scale rule - * eg: azure-servicebus, redis etc. - */ - private String type; - - /* - * Metadata properties to describe custom scale rule. - */ - private Map metadata; - - /* - * Authentication secrets for the custom scale rule. - */ - 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. - */ - private String identity; - - /** - * Creates an instance of CustomScaleRule class. - */ - public CustomScaleRule() { - } - - /** - * Get the type property: Type of the custom scale rule - * eg: azure-servicebus, redis etc. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: Type of the custom scale rule - * eg: azure-servicebus, redis etc. - * - * @param type the type value to set. - * @return the CustomScaleRule object itself. - */ - public CustomScaleRule withType(String type) { - this.type = type; - return this; - } - - /** - * Get the metadata property: Metadata properties to describe custom scale rule. - * - * @return the metadata value. - */ - public Map metadata() { - return this.metadata; - } - - /** - * Set the metadata property: Metadata properties to describe custom scale rule. - * - * @param metadata the metadata value to set. - * @return the CustomScaleRule object itself. - */ - public CustomScaleRule withMetadata(Map metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the auth property: Authentication secrets for the custom scale rule. - * - * @return the auth value. - */ - public List auth() { - return this.auth; - } - - /** - * Set the auth property: Authentication secrets for the custom scale rule. - * - * @param auth the auth value to set. - * @return the CustomScaleRule object itself. - */ - public CustomScaleRule withAuth(List auth) { - this.auth = 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. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (auth() != null) { - auth().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type); - jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("auth", this.auth, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of CustomScaleRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of CustomScaleRule if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the CustomScaleRule. - */ - public static CustomScaleRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - CustomScaleRule deserializedCustomScaleRule = new CustomScaleRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedCustomScaleRule.type = reader.getString(); - } else if ("metadata".equals(fieldName)) { - Map metadata = reader.readMap(reader1 -> reader1.getString()); - deserializedCustomScaleRule.metadata = metadata; - } else if ("auth".equals(fieldName)) { - List auth = reader.readArray(reader1 -> ScaleRuleAuth.fromJson(reader1)); - deserializedCustomScaleRule.auth = auth; - } else if ("identity".equals(fieldName)) { - deserializedCustomScaleRule.identity = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedCustomScaleRule; - }); - } -} 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 deleted file mode 100644 index a12e4ad8164b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Dapr.java +++ /dev/null @@ -1,298 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container App Dapr configuration. - */ -@Fluent -public final class Dapr implements JsonSerializable { - /* - * Boolean indicating if the Dapr side car is enabled - */ - private Boolean enabled; - - /* - * Dapr application identifier - */ - private String appId; - - /* - * Tells Dapr which protocol your application is using. Valid options are http and grpc. Default is http - */ - private AppProtocol appProtocol; - - /* - * Tells Dapr which port your application is listening on - */ - private Integer appPort; - - /* - * Dapr max size of http header read buffer in KB to handle when sending multi-KB headers. Default is 65KB. - */ - 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. - */ - private Integer httpMaxRequestSize; - - /* - * Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. - */ - private LogLevel logLevel; - - /* - * Enables API logging for the Dapr sidecar - */ - private Boolean enableApiLogging; - - /** - * Creates an instance of Dapr class. - */ - public Dapr() { - } - - /** - * Get the enabled property: Boolean indicating if the Dapr side car is enabled. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Boolean indicating if the Dapr side car is enabled. - * - * @param enabled the enabled value to set. - * @return the Dapr object itself. - */ - public Dapr withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the appId property: Dapr application identifier. - * - * @return the appId value. - */ - public String appId() { - return this.appId; - } - - /** - * Set the appId property: Dapr application identifier. - * - * @param appId the appId value to set. - * @return the Dapr object itself. - */ - public Dapr withAppId(String appId) { - this.appId = appId; - return this; - } - - /** - * Get the appProtocol property: Tells Dapr which protocol your application is using. Valid options are http and - * grpc. Default is http. - * - * @return the appProtocol value. - */ - public AppProtocol appProtocol() { - return this.appProtocol; - } - - /** - * Set the appProtocol property: Tells Dapr which protocol your application is using. Valid options are http and - * grpc. Default is http. - * - * @param appProtocol the appProtocol value to set. - * @return the Dapr object itself. - */ - public Dapr withAppProtocol(AppProtocol appProtocol) { - this.appProtocol = appProtocol; - return this; - } - - /** - * Get the appPort property: Tells Dapr which port your application is listening on. - * - * @return the appPort value. - */ - public Integer appPort() { - return this.appPort; - } - - /** - * Set the appPort property: Tells Dapr which port your application is listening on. - * - * @param appPort the appPort value to set. - * @return the Dapr object itself. - */ - public Dapr withAppPort(Integer appPort) { - this.appPort = appPort; - return this; - } - - /** - * Get the httpReadBufferSize property: Dapr max size of http header read buffer in KB to handle when sending - * multi-KB headers. Default is 65KB. - * - * @return the httpReadBufferSize value. - */ - public Integer httpReadBufferSize() { - return this.httpReadBufferSize; - } - - /** - * Set the httpReadBufferSize property: Dapr max size of http header read buffer in KB to handle when sending - * multi-KB headers. Default is 65KB. - * - * @param httpReadBufferSize the httpReadBufferSize value to set. - * @return the Dapr object itself. - */ - public Dapr withHttpReadBufferSize(Integer httpReadBufferSize) { - this.httpReadBufferSize = httpReadBufferSize; - return this; - } - - /** - * 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. - */ - public Integer httpMaxRequestSize() { - return this.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. - * - * @param httpMaxRequestSize the httpMaxRequestSize value to set. - * @return the Dapr object itself. - */ - public Dapr withHttpMaxRequestSize(Integer httpMaxRequestSize) { - this.httpMaxRequestSize = httpMaxRequestSize; - return this; - } - - /** - * Get the logLevel property: Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. - * Default is info. - * - * @return the logLevel value. - */ - public LogLevel logLevel() { - return this.logLevel; - } - - /** - * Set the logLevel property: Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. - * Default is info. - * - * @param logLevel the logLevel value to set. - * @return the Dapr object itself. - */ - public Dapr withLogLevel(LogLevel logLevel) { - this.logLevel = logLevel; - return this; - } - - /** - * Get the enableApiLogging property: Enables API logging for the Dapr sidecar. - * - * @return the enableApiLogging value. - */ - public Boolean enableApiLogging() { - return this.enableApiLogging; - } - - /** - * Set the enableApiLogging property: Enables API logging for the Dapr sidecar. - * - * @param enableApiLogging the enableApiLogging value to set. - * @return the Dapr object itself. - */ - public Dapr withEnableApiLogging(Boolean enableApiLogging) { - this.enableApiLogging = enableApiLogging; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeStringField("appId", this.appId); - jsonWriter.writeStringField("appProtocol", this.appProtocol == null ? null : this.appProtocol.toString()); - jsonWriter.writeNumberField("appPort", this.appPort); - jsonWriter.writeNumberField("httpReadBufferSize", this.httpReadBufferSize); - jsonWriter.writeNumberField("httpMaxRequestSize", this.httpMaxRequestSize); - jsonWriter.writeStringField("logLevel", this.logLevel == null ? null : this.logLevel.toString()); - jsonWriter.writeBooleanField("enableApiLogging", this.enableApiLogging); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Dapr from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Dapr if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Dapr. - */ - public static Dapr fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Dapr deserializedDapr = new Dapr(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedDapr.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("appId".equals(fieldName)) { - deserializedDapr.appId = reader.getString(); - } else if ("appProtocol".equals(fieldName)) { - deserializedDapr.appProtocol = AppProtocol.fromString(reader.getString()); - } else if ("appPort".equals(fieldName)) { - deserializedDapr.appPort = reader.getNullable(JsonReader::getInt); - } else if ("httpReadBufferSize".equals(fieldName)) { - deserializedDapr.httpReadBufferSize = reader.getNullable(JsonReader::getInt); - } else if ("httpMaxRequestSize".equals(fieldName)) { - deserializedDapr.httpMaxRequestSize = reader.getNullable(JsonReader::getInt); - } else if ("logLevel".equals(fieldName)) { - deserializedDapr.logLevel = LogLevel.fromString(reader.getString()); - } else if ("enableApiLogging".equals(fieldName)) { - deserializedDapr.enableApiLogging = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedDapr; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java deleted file mode 100644 index dc79196c9979..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java +++ /dev/null @@ -1,484 +0,0 @@ -// Copyright (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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import java.util.List; - -/** - * An immutable client-side representation of DaprComponent. - */ -public interface DaprComponent { - /** - * 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 componentType property: Component type. - * - * @return the componentType value. - */ - String componentType(); - - /** - * Gets the version property: Component version. - * - * @return the version value. - */ - String version(); - - /** - * Gets the ignoreErrors property: Boolean describing if the component errors are ignores. - * - * @return the ignoreErrors value. - */ - Boolean ignoreErrors(); - - /** - * Gets the initTimeout property: Initialization timeout. - * - * @return the initTimeout value. - */ - String initTimeout(); - - /** - * Gets the secrets property: Collection of secrets used by a Dapr component. - * - * @return the secrets value. - */ - List secrets(); - - /** - * Gets the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * - * @return the secretStoreComponent value. - */ - String secretStoreComponent(); - - /** - * Gets the metadata property: Component metadata. - * - * @return the metadata value. - */ - List metadata(); - - /** - * Gets the scopes property: Names of container apps that can use this Dapr component. - * - * @return the scopes value. - */ - List scopes(); - - /** - * Gets the serviceComponentBind property: List of container app services that are bound to the Dapr component. - * - * @return the serviceComponentBind value. - */ - List serviceComponentBind(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner object. - * - * @return the inner object. - */ - DaprComponentInner innerModel(); - - /** - * The entirety of the DaprComponent definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The DaprComponent definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the DaprComponent definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the DaprComponent definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, connectedEnvironmentName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @return the next definition stage. - */ - WithCreate withExistingConnectedEnvironment(String resourceGroupName, String connectedEnvironmentName); - } - - /** - * The stage of the DaprComponent 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.WithVersion, DefinitionStages.WithIgnoreErrors, - DefinitionStages.WithInitTimeout, DefinitionStages.WithSecrets, DefinitionStages.WithSecretStoreComponent, - DefinitionStages.WithMetadata, DefinitionStages.WithScopes, DefinitionStages.WithServiceComponentBind { - /** - * Executes the create request. - * - * @return the created resource. - */ - DaprComponent create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DaprComponent create(Context context); - } - - /** - * The stage of the DaprComponent definition allowing to specify componentType. - */ - interface WithComponentType { - /** - * Specifies the componentType property: Component type. - * - * @param componentType Component type. - * @return the next definition stage. - */ - WithCreate withComponentType(String componentType); - } - - /** - * The stage of the DaprComponent definition allowing to specify version. - */ - interface WithVersion { - /** - * Specifies the version property: Component version. - * - * @param version Component version. - * @return the next definition stage. - */ - WithCreate withVersion(String version); - } - - /** - * The stage of the DaprComponent definition allowing to specify ignoreErrors. - */ - interface WithIgnoreErrors { - /** - * Specifies the ignoreErrors property: Boolean describing if the component errors are ignores. - * - * @param ignoreErrors Boolean describing if the component errors are ignores. - * @return the next definition stage. - */ - WithCreate withIgnoreErrors(Boolean ignoreErrors); - } - - /** - * The stage of the DaprComponent definition allowing to specify initTimeout. - */ - interface WithInitTimeout { - /** - * Specifies the initTimeout property: Initialization timeout. - * - * @param initTimeout Initialization timeout. - * @return the next definition stage. - */ - WithCreate withInitTimeout(String initTimeout); - } - - /** - * The stage of the DaprComponent definition allowing to specify secrets. - */ - interface WithSecrets { - /** - * Specifies the secrets property: Collection of secrets used by a Dapr component. - * - * @param secrets Collection of secrets used by a Dapr component. - * @return the next definition stage. - */ - WithCreate withSecrets(List secrets); - } - - /** - * The stage of the DaprComponent definition allowing to specify secretStoreComponent. - */ - interface WithSecretStoreComponent { - /** - * Specifies the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * - * @param secretStoreComponent Name of a Dapr component to retrieve component secrets from. - * @return the next definition stage. - */ - WithCreate withSecretStoreComponent(String secretStoreComponent); - } - - /** - * The stage of the DaprComponent definition allowing to specify metadata. - */ - interface WithMetadata { - /** - * Specifies the metadata property: Component metadata. - * - * @param metadata Component metadata. - * @return the next definition stage. - */ - WithCreate withMetadata(List metadata); - } - - /** - * The stage of the DaprComponent definition allowing to specify scopes. - */ - interface WithScopes { - /** - * Specifies the scopes property: Names of container apps that can use this Dapr component. - * - * @param scopes Names of container apps that can use this Dapr component. - * @return the next definition stage. - */ - WithCreate withScopes(List scopes); - } - - /** - * The stage of the DaprComponent definition allowing to specify serviceComponentBind. - */ - interface WithServiceComponentBind { - /** - * Specifies the serviceComponentBind property: List of container app services that are bound to the Dapr - * component. - * - * @param serviceComponentBind List of container app services that are bound to the Dapr component. - * @return the next definition stage. - */ - WithCreate withServiceComponentBind(List serviceComponentBind); - } - } - - /** - * Begins update for the DaprComponent resource. - * - * @return the stage of resource update. - */ - DaprComponent.Update update(); - - /** - * The template for DaprComponent update. - */ - interface Update extends UpdateStages.WithComponentType, UpdateStages.WithVersion, UpdateStages.WithIgnoreErrors, - UpdateStages.WithInitTimeout, UpdateStages.WithSecrets, UpdateStages.WithSecretStoreComponent, - UpdateStages.WithMetadata, UpdateStages.WithScopes, UpdateStages.WithServiceComponentBind { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DaprComponent apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DaprComponent apply(Context context); - } - - /** - * The DaprComponent update stages. - */ - interface UpdateStages { - /** - * The stage of the DaprComponent update allowing to specify componentType. - */ - interface WithComponentType { - /** - * Specifies the componentType property: Component type. - * - * @param componentType Component type. - * @return the next definition stage. - */ - Update withComponentType(String componentType); - } - - /** - * The stage of the DaprComponent update allowing to specify version. - */ - interface WithVersion { - /** - * Specifies the version property: Component version. - * - * @param version Component version. - * @return the next definition stage. - */ - Update withVersion(String version); - } - - /** - * The stage of the DaprComponent update allowing to specify ignoreErrors. - */ - interface WithIgnoreErrors { - /** - * Specifies the ignoreErrors property: Boolean describing if the component errors are ignores. - * - * @param ignoreErrors Boolean describing if the component errors are ignores. - * @return the next definition stage. - */ - Update withIgnoreErrors(Boolean ignoreErrors); - } - - /** - * The stage of the DaprComponent update allowing to specify initTimeout. - */ - interface WithInitTimeout { - /** - * Specifies the initTimeout property: Initialization timeout. - * - * @param initTimeout Initialization timeout. - * @return the next definition stage. - */ - Update withInitTimeout(String initTimeout); - } - - /** - * The stage of the DaprComponent update allowing to specify secrets. - */ - interface WithSecrets { - /** - * Specifies the secrets property: Collection of secrets used by a Dapr component. - * - * @param secrets Collection of secrets used by a Dapr component. - * @return the next definition stage. - */ - Update withSecrets(List secrets); - } - - /** - * The stage of the DaprComponent update allowing to specify secretStoreComponent. - */ - interface WithSecretStoreComponent { - /** - * Specifies the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * - * @param secretStoreComponent Name of a Dapr component to retrieve component secrets from. - * @return the next definition stage. - */ - Update withSecretStoreComponent(String secretStoreComponent); - } - - /** - * The stage of the DaprComponent update allowing to specify metadata. - */ - interface WithMetadata { - /** - * Specifies the metadata property: Component metadata. - * - * @param metadata Component metadata. - * @return the next definition stage. - */ - Update withMetadata(List metadata); - } - - /** - * The stage of the DaprComponent update allowing to specify scopes. - */ - interface WithScopes { - /** - * Specifies the scopes property: Names of container apps that can use this Dapr component. - * - * @param scopes Names of container apps that can use this Dapr component. - * @return the next definition stage. - */ - Update withScopes(List scopes); - } - - /** - * The stage of the DaprComponent update allowing to specify serviceComponentBind. - */ - interface WithServiceComponentBind { - /** - * Specifies the serviceComponentBind property: List of container app services that are bound to the Dapr - * component. - * - * @param serviceComponentBind List of container app services that are bound to the Dapr component. - * @return the next definition stage. - */ - Update withServiceComponentBind(List serviceComponentBind); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - DaprComponent refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DaprComponent refresh(Context context); - - /** - * List secrets for a dapr component. - * - * @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 dapr component Secrets Collection for ListSecrets Action along with {@link Response}. - */ - Response listSecretsWithResponse(Context context); - - /** - * List secrets for a dapr component. - * - * @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 dapr component Secrets Collection for ListSecrets Action. - */ - DaprSecretsCollection listSecrets(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicies.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicies.java deleted file mode 100644 index 5658db8005ad..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicies.java +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (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 DaprComponentResiliencyPolicies. - */ -public interface DaprComponentResiliencyPolicies { - /** - * Get the resiliency policies for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 resiliency policies for a Dapr component as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName, - String componentName); - - /** - * Get the resiliency policies for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 resiliency policies for a Dapr component as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName, - String componentName, Context context); - - /** - * Get a Dapr component resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Dapr component resiliency policy along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String environmentName, - String componentName, String name, Context context); - - /** - * Get a Dapr component resiliency policy. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Dapr component resiliency policy. - */ - DaprComponentResiliencyPolicy get(String resourceGroupName, String environmentName, String componentName, - String name); - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @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 Response}. - */ - Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, - String name, Context context); - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param name Name of the Dapr Component Resiliency Policy. - * @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 environmentName, String componentName, String name); - - /** - * Get a Dapr component resiliency policy. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Dapr component resiliency policy along with {@link Response}. - */ - DaprComponentResiliencyPolicy getById(String id); - - /** - * Get a Dapr component resiliency policy. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Dapr component resiliency policy along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @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 Dapr component resiliency policy. - * - * Delete a resiliency policy for a Dapr component. - * - * @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 {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new DaprComponentResiliencyPolicy resource. - * - * @param name resource name. - * @return the first stage of the new DaprComponentResiliencyPolicy definition. - */ - DaprComponentResiliencyPolicy.DefinitionStages.Blank define(String name); -} 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 deleted file mode 100644 index cc87807184db..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPoliciesCollection.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner; -import java.io.IOException; -import java.util.List; - -/** - * Dapr Component Resiliency Policies ARM resource. - */ -@Fluent -public final class DaprComponentResiliencyPoliciesCollection - implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of DaprComponentResiliencyPoliciesCollection class. - */ - public DaprComponentResiliencyPoliciesCollection() { - } - - /** - * 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 DaprComponentResiliencyPoliciesCollection object itself. - */ - public DaprComponentResiliencyPoliciesCollection 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 DaprComponentResiliencyPoliciesCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DaprComponentResiliencyPoliciesCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentResiliencyPoliciesCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentResiliencyPoliciesCollection if the JsonReader was pointing to an instance of - * it, or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DaprComponentResiliencyPoliciesCollection. - */ - public static DaprComponentResiliencyPoliciesCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentResiliencyPoliciesCollection deserializedDaprComponentResiliencyPoliciesCollection - = new DaprComponentResiliencyPoliciesCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> DaprComponentResiliencyPolicyInner.fromJson(reader1)); - deserializedDaprComponentResiliencyPoliciesCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDaprComponentResiliencyPoliciesCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentResiliencyPoliciesCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicy.java deleted file mode 100644 index a8322cfe73ff..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicy.java +++ /dev/null @@ -1,224 +0,0 @@ -// Copyright (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.DaprComponentResiliencyPolicyInner; - -/** - * An immutable client-side representation of DaprComponentResiliencyPolicy. - */ -public interface DaprComponentResiliencyPolicy { - /** - * 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 inboundPolicy property: The optional inbound component resiliency policy configuration. - * - * @return the inboundPolicy value. - */ - DaprComponentResiliencyPolicyConfiguration inboundPolicy(); - - /** - * Gets the outboundPolicy property: The optional outbound component resiliency policy configuration. - * - * @return the outboundPolicy value. - */ - DaprComponentResiliencyPolicyConfiguration outboundPolicy(); - - /** - * 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.DaprComponentResiliencyPolicyInner object. - * - * @return the inner object. - */ - DaprComponentResiliencyPolicyInner innerModel(); - - /** - * The entirety of the DaprComponentResiliencyPolicy definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The DaprComponentResiliencyPolicy definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the DaprComponentResiliencyPolicy definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the DaprComponentResiliencyPolicy definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, environmentName, componentName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @return the next definition stage. - */ - WithCreate withExistingDaprComponent(String resourceGroupName, String environmentName, - String componentName); - } - - /** - * The stage of the DaprComponentResiliencyPolicy 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.WithInboundPolicy, DefinitionStages.WithOutboundPolicy { - /** - * Executes the create request. - * - * @return the created resource. - */ - DaprComponentResiliencyPolicy create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DaprComponentResiliencyPolicy create(Context context); - } - - /** - * The stage of the DaprComponentResiliencyPolicy definition allowing to specify inboundPolicy. - */ - interface WithInboundPolicy { - /** - * Specifies the inboundPolicy property: The optional inbound component resiliency policy configuration. - * - * @param inboundPolicy The optional inbound component resiliency policy configuration. - * @return the next definition stage. - */ - WithCreate withInboundPolicy(DaprComponentResiliencyPolicyConfiguration inboundPolicy); - } - - /** - * The stage of the DaprComponentResiliencyPolicy definition allowing to specify outboundPolicy. - */ - interface WithOutboundPolicy { - /** - * Specifies the outboundPolicy property: The optional outbound component resiliency policy configuration. - * - * @param outboundPolicy The optional outbound component resiliency policy configuration. - * @return the next definition stage. - */ - WithCreate withOutboundPolicy(DaprComponentResiliencyPolicyConfiguration outboundPolicy); - } - } - - /** - * Begins update for the DaprComponentResiliencyPolicy resource. - * - * @return the stage of resource update. - */ - DaprComponentResiliencyPolicy.Update update(); - - /** - * The template for DaprComponentResiliencyPolicy update. - */ - interface Update extends UpdateStages.WithInboundPolicy, UpdateStages.WithOutboundPolicy { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DaprComponentResiliencyPolicy apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DaprComponentResiliencyPolicy apply(Context context); - } - - /** - * The DaprComponentResiliencyPolicy update stages. - */ - interface UpdateStages { - /** - * The stage of the DaprComponentResiliencyPolicy update allowing to specify inboundPolicy. - */ - interface WithInboundPolicy { - /** - * Specifies the inboundPolicy property: The optional inbound component resiliency policy configuration. - * - * @param inboundPolicy The optional inbound component resiliency policy configuration. - * @return the next definition stage. - */ - Update withInboundPolicy(DaprComponentResiliencyPolicyConfiguration inboundPolicy); - } - - /** - * The stage of the DaprComponentResiliencyPolicy update allowing to specify outboundPolicy. - */ - interface WithOutboundPolicy { - /** - * Specifies the outboundPolicy property: The optional outbound component resiliency policy configuration. - * - * @param outboundPolicy The optional outbound component resiliency policy configuration. - * @return the next definition stage. - */ - Update withOutboundPolicy(DaprComponentResiliencyPolicyConfiguration outboundPolicy); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - DaprComponentResiliencyPolicy refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DaprComponentResiliencyPolicy refresh(Context context); -} 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 deleted file mode 100644 index d1e30673c559..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Dapr Component Resiliency Policy Circuit Breaker Policy Configuration. - */ -@Fluent -public final class DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration - implements JsonSerializable { - /* - * The number of consecutive errors before the circuit is opened. - */ - private Integer consecutiveErrors; - - /* - * The interval in seconds until a retry attempt is made after the circuit is opened. - */ - 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. - */ - private Integer intervalInSeconds; - - /** - * Creates an instance of DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration class. - */ - public DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() { - } - - /** - * Get the consecutiveErrors property: The number of consecutive errors before the circuit is opened. - * - * @return the consecutiveErrors value. - */ - public Integer consecutiveErrors() { - return this.consecutiveErrors; - } - - /** - * Set the consecutiveErrors property: The number of consecutive errors before the circuit is opened. - * - * @param consecutiveErrors the consecutiveErrors value to set. - * @return the DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration object itself. - */ - public DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration - withConsecutiveErrors(Integer consecutiveErrors) { - this.consecutiveErrors = consecutiveErrors; - return this; - } - - /** - * Get the timeoutInSeconds property: The interval in seconds until a retry attempt is made after the circuit is - * opened. - * - * @return the timeoutInSeconds value. - */ - public Integer timeoutInSeconds() { - return this.timeoutInSeconds; - } - - /** - * Set the timeoutInSeconds property: The interval in seconds until a retry attempt is made after the circuit is - * opened. - * - * @param timeoutInSeconds the timeoutInSeconds value to set. - * @return the DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration object itself. - */ - public DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration - withTimeoutInSeconds(Integer timeoutInSeconds) { - this.timeoutInSeconds = timeoutInSeconds; - return this; - } - - /** - * Get the intervalInSeconds property: 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. - * - * @return the intervalInSeconds value. - */ - public Integer intervalInSeconds() { - return this.intervalInSeconds; - } - - /** - * Set the intervalInSeconds property: 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. - * - * @param intervalInSeconds the intervalInSeconds value to set. - * @return the DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration object itself. - */ - public DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration - withIntervalInSeconds(Integer intervalInSeconds) { - this.intervalInSeconds = intervalInSeconds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("consecutiveErrors", this.consecutiveErrors); - jsonWriter.writeNumberField("timeoutInSeconds", this.timeoutInSeconds); - jsonWriter.writeNumberField("intervalInSeconds", this.intervalInSeconds); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration if the JsonReader was - * pointing to an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the - * DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration. - */ - public static DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration deserializedDaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration - = new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("consecutiveErrors".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.consecutiveErrors - = reader.getNullable(JsonReader::getInt); - } else if ("timeoutInSeconds".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.timeoutInSeconds - = reader.getNullable(JsonReader::getInt); - } else if ("intervalInSeconds".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.intervalInSeconds - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyConfiguration.java deleted file mode 100644 index 3e83447dbee9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyConfiguration.java +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Dapr Component Resiliency Policy Configuration. - */ -@Fluent -public final class DaprComponentResiliencyPolicyConfiguration - implements JsonSerializable { - /* - * The optional HTTP retry policy configuration - */ - private DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration httpRetryPolicy; - - /* - * The optional timeout policy configuration - */ - private DaprComponentResiliencyPolicyTimeoutPolicyConfiguration timeoutPolicy; - - /* - * The optional circuit breaker policy configuration - */ - private DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration circuitBreakerPolicy; - - /** - * Creates an instance of DaprComponentResiliencyPolicyConfiguration class. - */ - public DaprComponentResiliencyPolicyConfiguration() { - } - - /** - * Get the httpRetryPolicy property: The optional HTTP retry policy configuration. - * - * @return the httpRetryPolicy value. - */ - public DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration httpRetryPolicy() { - return this.httpRetryPolicy; - } - - /** - * Set the httpRetryPolicy property: The optional HTTP retry policy configuration. - * - * @param httpRetryPolicy the httpRetryPolicy value to set. - * @return the DaprComponentResiliencyPolicyConfiguration object itself. - */ - public DaprComponentResiliencyPolicyConfiguration - withHttpRetryPolicy(DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration httpRetryPolicy) { - this.httpRetryPolicy = httpRetryPolicy; - return this; - } - - /** - * Get the timeoutPolicy property: The optional timeout policy configuration. - * - * @return the timeoutPolicy value. - */ - public DaprComponentResiliencyPolicyTimeoutPolicyConfiguration timeoutPolicy() { - return this.timeoutPolicy; - } - - /** - * Set the timeoutPolicy property: The optional timeout policy configuration. - * - * @param timeoutPolicy the timeoutPolicy value to set. - * @return the DaprComponentResiliencyPolicyConfiguration object itself. - */ - public DaprComponentResiliencyPolicyConfiguration - withTimeoutPolicy(DaprComponentResiliencyPolicyTimeoutPolicyConfiguration timeoutPolicy) { - this.timeoutPolicy = timeoutPolicy; - return this; - } - - /** - * Get the circuitBreakerPolicy property: The optional circuit breaker policy configuration. - * - * @return the circuitBreakerPolicy value. - */ - public DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration circuitBreakerPolicy() { - return this.circuitBreakerPolicy; - } - - /** - * Set the circuitBreakerPolicy property: The optional circuit breaker policy configuration. - * - * @param circuitBreakerPolicy the circuitBreakerPolicy value to set. - * @return the DaprComponentResiliencyPolicyConfiguration object itself. - */ - public DaprComponentResiliencyPolicyConfiguration - withCircuitBreakerPolicy(DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration circuitBreakerPolicy) { - this.circuitBreakerPolicy = circuitBreakerPolicy; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (httpRetryPolicy() != null) { - httpRetryPolicy().validate(); - } - if (timeoutPolicy() != null) { - timeoutPolicy().validate(); - } - if (circuitBreakerPolicy() != null) { - circuitBreakerPolicy().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("httpRetryPolicy", this.httpRetryPolicy); - jsonWriter.writeJsonField("timeoutPolicy", this.timeoutPolicy); - jsonWriter.writeJsonField("circuitBreakerPolicy", this.circuitBreakerPolicy); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentResiliencyPolicyConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentResiliencyPolicyConfiguration if the JsonReader was pointing to an instance - * of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DaprComponentResiliencyPolicyConfiguration. - */ - public static DaprComponentResiliencyPolicyConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentResiliencyPolicyConfiguration deserializedDaprComponentResiliencyPolicyConfiguration - = new DaprComponentResiliencyPolicyConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("httpRetryPolicy".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyConfiguration.httpRetryPolicy - = DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.fromJson(reader); - } else if ("timeoutPolicy".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyConfiguration.timeoutPolicy - = DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.fromJson(reader); - } else if ("circuitBreakerPolicy".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyConfiguration.circuitBreakerPolicy - = DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentResiliencyPolicyConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.java deleted file mode 100644 index 5a8a3dfdbaf1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Dapr Component Resiliency Policy HTTP Retry Backoff Configuration. - */ -@Fluent -public final class DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration - implements JsonSerializable { - /* - * The optional initial delay in milliseconds before an operation is retried - */ - private Integer initialDelayInMilliseconds; - - /* - * The optional maximum time interval in milliseconds between retry attempts - */ - private Integer maxIntervalInMilliseconds; - - /** - * Creates an instance of DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration class. - */ - public DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() { - } - - /** - * Get the initialDelayInMilliseconds property: The optional initial delay in milliseconds before an operation is - * retried. - * - * @return the initialDelayInMilliseconds value. - */ - public Integer initialDelayInMilliseconds() { - return this.initialDelayInMilliseconds; - } - - /** - * Set the initialDelayInMilliseconds property: The optional initial delay in milliseconds before an operation is - * retried. - * - * @param initialDelayInMilliseconds the initialDelayInMilliseconds value to set. - * @return the DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration object itself. - */ - public DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration - withInitialDelayInMilliseconds(Integer initialDelayInMilliseconds) { - this.initialDelayInMilliseconds = initialDelayInMilliseconds; - return this; - } - - /** - * Get the maxIntervalInMilliseconds property: The optional maximum time interval in milliseconds between retry - * attempts. - * - * @return the maxIntervalInMilliseconds value. - */ - public Integer maxIntervalInMilliseconds() { - return this.maxIntervalInMilliseconds; - } - - /** - * Set the maxIntervalInMilliseconds property: The optional maximum time interval in milliseconds between retry - * attempts. - * - * @param maxIntervalInMilliseconds the maxIntervalInMilliseconds value to set. - * @return the DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration object itself. - */ - public DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration - withMaxIntervalInMilliseconds(Integer maxIntervalInMilliseconds) { - this.maxIntervalInMilliseconds = maxIntervalInMilliseconds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("initialDelayInMilliseconds", this.initialDelayInMilliseconds); - jsonWriter.writeNumberField("maxIntervalInMilliseconds", this.maxIntervalInMilliseconds); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration if the JsonReader was pointing - * to an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the - * DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration. - */ - public static DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration deserializedDaprComponentResiliencyPolicyHttpRetryBackOffConfiguration - = new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("initialDelayInMilliseconds".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.initialDelayInMilliseconds - = reader.getNullable(JsonReader::getInt); - } else if ("maxIntervalInMilliseconds".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.maxIntervalInMilliseconds - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.java deleted file mode 100644 index f88a92cdb674..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Dapr Component Resiliency Policy HTTP Retry Policy Configuration. - */ -@Fluent -public final class DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration - implements JsonSerializable { - /* - * The optional maximum number of retries - */ - private Integer maxRetries; - - /* - * The optional retry backoff configuration - */ - private DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration retryBackOff; - - /** - * Creates an instance of DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration class. - */ - public DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration() { - } - - /** - * Get the maxRetries property: The optional maximum number of retries. - * - * @return the maxRetries value. - */ - public Integer maxRetries() { - return this.maxRetries; - } - - /** - * Set the maxRetries property: The optional maximum number of retries. - * - * @param maxRetries the maxRetries value to set. - * @return the DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration object itself. - */ - public DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration withMaxRetries(Integer maxRetries) { - this.maxRetries = maxRetries; - return this; - } - - /** - * Get the retryBackOff property: The optional retry backoff configuration. - * - * @return the retryBackOff value. - */ - public DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration retryBackOff() { - return this.retryBackOff; - } - - /** - * Set the retryBackOff property: The optional retry backoff configuration. - * - * @param retryBackOff the retryBackOff value to set. - * @return the DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration object itself. - */ - public DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration - withRetryBackOff(DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration retryBackOff) { - this.retryBackOff = retryBackOff; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (retryBackOff() != null) { - retryBackOff().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("maxRetries", this.maxRetries); - jsonWriter.writeJsonField("retryBackOff", this.retryBackOff); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration if the JsonReader was pointing - * to an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the - * DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration. - */ - public static DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration deserializedDaprComponentResiliencyPolicyHttpRetryPolicyConfiguration - = new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maxRetries".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.maxRetries - = reader.getNullable(JsonReader::getInt); - } else if ("retryBackOff".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.retryBackOff - = DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.java deleted file mode 100644 index c90caf2f86bb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Dapr Component Resiliency Policy Timeout Policy Configuration. - */ -@Fluent -public final class DaprComponentResiliencyPolicyTimeoutPolicyConfiguration - implements JsonSerializable { - /* - * The optional response timeout in seconds - */ - private Integer responseTimeoutInSeconds; - - /** - * Creates an instance of DaprComponentResiliencyPolicyTimeoutPolicyConfiguration class. - */ - public DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() { - } - - /** - * Get the responseTimeoutInSeconds property: The optional response timeout in seconds. - * - * @return the responseTimeoutInSeconds value. - */ - public Integer responseTimeoutInSeconds() { - return this.responseTimeoutInSeconds; - } - - /** - * Set the responseTimeoutInSeconds property: The optional response timeout in seconds. - * - * @param responseTimeoutInSeconds the responseTimeoutInSeconds value to set. - * @return the DaprComponentResiliencyPolicyTimeoutPolicyConfiguration object itself. - */ - public DaprComponentResiliencyPolicyTimeoutPolicyConfiguration - withResponseTimeoutInSeconds(Integer responseTimeoutInSeconds) { - this.responseTimeoutInSeconds = responseTimeoutInSeconds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("responseTimeoutInSeconds", this.responseTimeoutInSeconds); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentResiliencyPolicyTimeoutPolicyConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentResiliencyPolicyTimeoutPolicyConfiguration if the JsonReader was pointing to - * an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DaprComponentResiliencyPolicyTimeoutPolicyConfiguration. - */ - public static DaprComponentResiliencyPolicyTimeoutPolicyConfiguration fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentResiliencyPolicyTimeoutPolicyConfiguration deserializedDaprComponentResiliencyPolicyTimeoutPolicyConfiguration - = new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("responseTimeoutInSeconds".equals(fieldName)) { - deserializedDaprComponentResiliencyPolicyTimeoutPolicyConfiguration.responseTimeoutInSeconds - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentResiliencyPolicyTimeoutPolicyConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentServiceBinding.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentServiceBinding.java deleted file mode 100644 index 0d4739a9d4f6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentServiceBinding.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Configuration to bind a Dapr Component to a dev ContainerApp Service. - */ -@Fluent -public final class DaprComponentServiceBinding implements JsonSerializable { - /* - * Name of the service bind - */ - private String name; - - /* - * Resource id of the target service - */ - private String serviceId; - - /* - * Service bind metadata - */ - private DaprServiceBindMetadata metadata; - - /** - * Creates an instance of DaprComponentServiceBinding class. - */ - public DaprComponentServiceBinding() { - } - - /** - * Get the name property: Name of the service bind. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the service bind. - * - * @param name the name value to set. - * @return the DaprComponentServiceBinding object itself. - */ - public DaprComponentServiceBinding withName(String name) { - this.name = name; - return this; - } - - /** - * Get the serviceId property: Resource id of the target service. - * - * @return the serviceId value. - */ - public String serviceId() { - return this.serviceId; - } - - /** - * Set the serviceId property: Resource id of the target service. - * - * @param serviceId the serviceId value to set. - * @return the DaprComponentServiceBinding object itself. - */ - public DaprComponentServiceBinding withServiceId(String serviceId) { - this.serviceId = serviceId; - return this; - } - - /** - * Get the metadata property: Service bind metadata. - * - * @return the metadata value. - */ - public DaprServiceBindMetadata metadata() { - return this.metadata; - } - - /** - * Set the metadata property: Service bind metadata. - * - * @param metadata the metadata value to set. - * @return the DaprComponentServiceBinding object itself. - */ - public DaprComponentServiceBinding withMetadata(DaprServiceBindMetadata metadata) { - this.metadata = metadata; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (metadata() != null) { - metadata().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("serviceId", this.serviceId); - jsonWriter.writeJsonField("metadata", this.metadata); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentServiceBinding from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentServiceBinding if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DaprComponentServiceBinding. - */ - public static DaprComponentServiceBinding fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentServiceBinding deserializedDaprComponentServiceBinding = new DaprComponentServiceBinding(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedDaprComponentServiceBinding.name = reader.getString(); - } else if ("serviceId".equals(fieldName)) { - deserializedDaprComponentServiceBinding.serviceId = reader.getString(); - } else if ("metadata".equals(fieldName)) { - deserializedDaprComponentServiceBinding.metadata = DaprServiceBindMetadata.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentServiceBinding; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponents.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponents.java deleted file mode 100644 index 8834ca17b94b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponents.java +++ /dev/null @@ -1,172 +0,0 @@ -// Copyright (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; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; - -/** - * Resource collection API of DaprComponents. - */ -public interface DaprComponents { - /** - * Get the Dapr Components for a 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.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 Dapr Components for a managed environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Get the Dapr Components for a 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.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 Dapr Components for a managed environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName, Context context); - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String environmentName, String componentName, - Context context); - - /** - * Get a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component. - */ - DaprComponent get(String resourceGroupName, String environmentName, String componentName); - - /** - * Creates or updates a Dapr Component. - * - * Creates or updates a Dapr Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @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 dapr Component along with {@link Response}. - */ - Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, - String componentName, DaprComponentInner daprComponentEnvelope, Context context); - - /** - * Creates or updates a Dapr Component. - * - * Creates or updates a Dapr Component in a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @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 dapr Component. - */ - DaprComponent createOrUpdate(String resourceGroupName, String environmentName, String componentName, - DaprComponentInner daprComponentEnvelope); - - /** - * Delete a Dapr Component. - * - * Delete a Dapr Component from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 Response}. - */ - Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, - Context context); - - /** - * Delete a Dapr Component. - * - * Delete a Dapr Component from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 environmentName, String componentName); - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component Secrets Collection for ListSecrets Action along with {@link Response}. - */ - Response listSecretsWithResponse(String resourceGroupName, String environmentName, - String componentName, Context context); - - /** - * List secrets for a dapr component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param componentName Name of the Dapr Component. - * @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 dapr component Secrets Collection for ListSecrets Action. - */ - DaprSecretsCollection listSecrets(String resourceGroupName, String environmentName, String componentName); -} 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 deleted file mode 100644 index 812630bf02eb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentsCollection.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import java.io.IOException; -import java.util.List; - -/** - * Dapr Components ARM resource. - */ -@Fluent -public final class DaprComponentsCollection implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of DaprComponentsCollection class. - */ - public DaprComponentsCollection() { - } - - /** - * 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 DaprComponentsCollection object itself. - */ - public DaprComponentsCollection 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 DaprComponentsCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DaprComponentsCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprComponentsCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprComponentsCollection if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DaprComponentsCollection. - */ - public static DaprComponentsCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprComponentsCollection deserializedDaprComponentsCollection = new DaprComponentsCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> DaprComponentInner.fromJson(reader1)); - deserializedDaprComponentsCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDaprComponentsCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprComponentsCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprConfiguration.java deleted file mode 100644 index 98c7a26c6868..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprConfiguration.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Configuration properties Dapr component. - */ -@Immutable -public final class DaprConfiguration implements JsonSerializable { - /* - * The version of Dapr - */ - private String version; - - /** - * Creates an instance of DaprConfiguration class. - */ - public DaprConfiguration() { - } - - /** - * Get the version property: The version of Dapr. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprConfiguration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DaprConfiguration. - */ - public static DaprConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprConfiguration deserializedDaprConfiguration = new DaprConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("version".equals(fieldName)) { - deserializedDaprConfiguration.version = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprMetadata.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprMetadata.java deleted file mode 100644 index 0673beca3a57..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprMetadata.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Dapr component metadata. - */ -@Fluent -public final class DaprMetadata implements JsonSerializable { - /* - * Metadata property name. - */ - private String name; - - /* - * Metadata property value. - */ - private String value; - - /* - * Name of the Dapr Component secret from which to pull the metadata property value. - */ - private String secretRef; - - /** - * Creates an instance of DaprMetadata class. - */ - public DaprMetadata() { - } - - /** - * Get the name property: Metadata property name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Metadata property name. - * - * @param name the name value to set. - * @return the DaprMetadata object itself. - */ - public DaprMetadata withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: Metadata property value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Metadata property value. - * - * @param value the value value to set. - * @return the DaprMetadata object itself. - */ - public DaprMetadata withValue(String value) { - this.value = value; - return this; - } - - /** - * Get the secretRef property: Name of the Dapr Component secret from which to pull the metadata property value. - * - * @return the secretRef value. - */ - public String secretRef() { - return this.secretRef; - } - - /** - * Set the secretRef property: Name of the Dapr Component secret from which to pull the metadata property value. - * - * @param secretRef the secretRef value to set. - * @return the DaprMetadata object itself. - */ - public DaprMetadata withSecretRef(String secretRef) { - this.secretRef = secretRef; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("value", this.value); - jsonWriter.writeStringField("secretRef", this.secretRef); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprMetadata from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprMetadata if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DaprMetadata. - */ - public static DaprMetadata fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprMetadata deserializedDaprMetadata = new DaprMetadata(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedDaprMetadata.name = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedDaprMetadata.value = reader.getString(); - } else if ("secretRef".equals(fieldName)) { - deserializedDaprMetadata.secretRef = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprMetadata; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecret.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecret.java deleted file mode 100644 index cd8cdbf7a4ff..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecret.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.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Dapr component Secret for ListSecrets Action. - */ -@Immutable -public final class DaprSecret implements JsonSerializable { - /* - * Secret Name. - */ - private String name; - - /* - * Secret Value. - */ - private String value; - - /** - * Creates an instance of DaprSecret class. - */ - public DaprSecret() { - } - - /** - * Get the name property: Secret Name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the value property: Secret Value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprSecret from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprSecret if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the DaprSecret. - */ - public static DaprSecret fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprSecret deserializedDaprSecret = new DaprSecret(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedDaprSecret.name = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedDaprSecret.value = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprSecret; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecretsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecretsCollection.java deleted file mode 100644 index 7a8c0766d80e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecretsCollection.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.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; -import java.util.List; - -/** - * An immutable client-side representation of DaprSecretsCollection. - */ -public interface DaprSecretsCollection { - /** - * Gets the value property: Collection of secrets used by a Dapr component. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner object. - * - * @return the inner object. - */ - DaprSecretsCollectionInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprServiceBindMetadata.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprServiceBindMetadata.java deleted file mode 100644 index d273181362de..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprServiceBindMetadata.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Dapr component metadata. - */ -@Fluent -public final class DaprServiceBindMetadata implements JsonSerializable { - /* - * Service bind metadata property name. - */ - private String name; - - /* - * Service bind metadata property value. - */ - private String value; - - /** - * Creates an instance of DaprServiceBindMetadata class. - */ - public DaprServiceBindMetadata() { - } - - /** - * Get the name property: Service bind metadata property name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Service bind metadata property name. - * - * @param name the name value to set. - * @return the DaprServiceBindMetadata object itself. - */ - public DaprServiceBindMetadata withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: Service bind metadata property value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Service bind metadata property value. - * - * @param value the value value to set. - * @return the DaprServiceBindMetadata object itself. - */ - public DaprServiceBindMetadata withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("value", this.value); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprServiceBindMetadata from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprServiceBindMetadata if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DaprServiceBindMetadata. - */ - public static DaprServiceBindMetadata fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprServiceBindMetadata deserializedDaprServiceBindMetadata = new DaprServiceBindMetadata(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedDaprServiceBindMetadata.name = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedDaprServiceBindMetadata.value = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprServiceBindMetadata; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscription.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscription.java deleted file mode 100644 index f5283e5b9ec8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscription.java +++ /dev/null @@ -1,392 +0,0 @@ -// Copyright (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.DaprSubscriptionInner; -import java.util.List; -import java.util.Map; - -/** - * An immutable client-side representation of DaprSubscription. - */ -public interface DaprSubscription { - /** - * 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 pubsubName property: Dapr PubSub component name. - * - * @return the pubsubName value. - */ - String pubsubName(); - - /** - * Gets the topic property: Topic name. - * - * @return the topic value. - */ - String topic(); - - /** - * Gets the deadLetterTopic property: Deadletter topic name. - * - * @return the deadLetterTopic value. - */ - String deadLetterTopic(); - - /** - * Gets the routes property: Subscription routes. - * - * @return the routes value. - */ - DaprSubscriptionRoutes routes(); - - /** - * Gets the scopes property: Application scopes to restrict the subscription to specific apps. - * - * @return the scopes value. - */ - List scopes(); - - /** - * Gets the metadata property: Subscription metadata. - * - * @return the metadata value. - */ - Map metadata(); - - /** - * Gets the bulkSubscribe property: Bulk subscription options. - * - * @return the bulkSubscribe value. - */ - DaprSubscriptionBulkSubscribeOptions bulkSubscribe(); - - /** - * 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.DaprSubscriptionInner object. - * - * @return the inner object. - */ - DaprSubscriptionInner innerModel(); - - /** - * The entirety of the DaprSubscription definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The DaprSubscription definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the DaprSubscription definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the DaprSubscription 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 DaprSubscription 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.WithPubsubName, DefinitionStages.WithTopic, - DefinitionStages.WithDeadLetterTopic, DefinitionStages.WithRoutes, DefinitionStages.WithScopes, - DefinitionStages.WithMetadata, DefinitionStages.WithBulkSubscribe { - /** - * Executes the create request. - * - * @return the created resource. - */ - DaprSubscription create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DaprSubscription create(Context context); - } - - /** - * The stage of the DaprSubscription definition allowing to specify pubsubName. - */ - interface WithPubsubName { - /** - * Specifies the pubsubName property: Dapr PubSub component name. - * - * @param pubsubName Dapr PubSub component name. - * @return the next definition stage. - */ - WithCreate withPubsubName(String pubsubName); - } - - /** - * The stage of the DaprSubscription definition allowing to specify topic. - */ - interface WithTopic { - /** - * Specifies the topic property: Topic name. - * - * @param topic Topic name. - * @return the next definition stage. - */ - WithCreate withTopic(String topic); - } - - /** - * The stage of the DaprSubscription definition allowing to specify deadLetterTopic. - */ - interface WithDeadLetterTopic { - /** - * Specifies the deadLetterTopic property: Deadletter topic name. - * - * @param deadLetterTopic Deadletter topic name. - * @return the next definition stage. - */ - WithCreate withDeadLetterTopic(String deadLetterTopic); - } - - /** - * The stage of the DaprSubscription definition allowing to specify routes. - */ - interface WithRoutes { - /** - * Specifies the routes property: Subscription routes. - * - * @param routes Subscription routes. - * @return the next definition stage. - */ - WithCreate withRoutes(DaprSubscriptionRoutes routes); - } - - /** - * The stage of the DaprSubscription definition allowing to specify scopes. - */ - interface WithScopes { - /** - * Specifies the scopes property: Application scopes to restrict the subscription to specific apps.. - * - * @param scopes Application scopes to restrict the subscription to specific apps. - * @return the next definition stage. - */ - WithCreate withScopes(List scopes); - } - - /** - * The stage of the DaprSubscription definition allowing to specify metadata. - */ - interface WithMetadata { - /** - * Specifies the metadata property: Subscription metadata. - * - * @param metadata Subscription metadata. - * @return the next definition stage. - */ - WithCreate withMetadata(Map metadata); - } - - /** - * The stage of the DaprSubscription definition allowing to specify bulkSubscribe. - */ - interface WithBulkSubscribe { - /** - * Specifies the bulkSubscribe property: Bulk subscription options. - * - * @param bulkSubscribe Bulk subscription options. - * @return the next definition stage. - */ - WithCreate withBulkSubscribe(DaprSubscriptionBulkSubscribeOptions bulkSubscribe); - } - } - - /** - * Begins update for the DaprSubscription resource. - * - * @return the stage of resource update. - */ - DaprSubscription.Update update(); - - /** - * The template for DaprSubscription update. - */ - interface Update extends UpdateStages.WithPubsubName, UpdateStages.WithTopic, UpdateStages.WithDeadLetterTopic, - UpdateStages.WithRoutes, UpdateStages.WithScopes, UpdateStages.WithMetadata, UpdateStages.WithBulkSubscribe { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DaprSubscription apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DaprSubscription apply(Context context); - } - - /** - * The DaprSubscription update stages. - */ - interface UpdateStages { - /** - * The stage of the DaprSubscription update allowing to specify pubsubName. - */ - interface WithPubsubName { - /** - * Specifies the pubsubName property: Dapr PubSub component name. - * - * @param pubsubName Dapr PubSub component name. - * @return the next definition stage. - */ - Update withPubsubName(String pubsubName); - } - - /** - * The stage of the DaprSubscription update allowing to specify topic. - */ - interface WithTopic { - /** - * Specifies the topic property: Topic name. - * - * @param topic Topic name. - * @return the next definition stage. - */ - Update withTopic(String topic); - } - - /** - * The stage of the DaprSubscription update allowing to specify deadLetterTopic. - */ - interface WithDeadLetterTopic { - /** - * Specifies the deadLetterTopic property: Deadletter topic name. - * - * @param deadLetterTopic Deadletter topic name. - * @return the next definition stage. - */ - Update withDeadLetterTopic(String deadLetterTopic); - } - - /** - * The stage of the DaprSubscription update allowing to specify routes. - */ - interface WithRoutes { - /** - * Specifies the routes property: Subscription routes. - * - * @param routes Subscription routes. - * @return the next definition stage. - */ - Update withRoutes(DaprSubscriptionRoutes routes); - } - - /** - * The stage of the DaprSubscription update allowing to specify scopes. - */ - interface WithScopes { - /** - * Specifies the scopes property: Application scopes to restrict the subscription to specific apps.. - * - * @param scopes Application scopes to restrict the subscription to specific apps. - * @return the next definition stage. - */ - Update withScopes(List scopes); - } - - /** - * The stage of the DaprSubscription update allowing to specify metadata. - */ - interface WithMetadata { - /** - * Specifies the metadata property: Subscription metadata. - * - * @param metadata Subscription metadata. - * @return the next definition stage. - */ - Update withMetadata(Map metadata); - } - - /** - * The stage of the DaprSubscription update allowing to specify bulkSubscribe. - */ - interface WithBulkSubscribe { - /** - * Specifies the bulkSubscribe property: Bulk subscription options. - * - * @param bulkSubscribe Bulk subscription options. - * @return the next definition stage. - */ - Update withBulkSubscribe(DaprSubscriptionBulkSubscribeOptions bulkSubscribe); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - DaprSubscription refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DaprSubscription refresh(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionBulkSubscribeOptions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionBulkSubscribeOptions.java deleted file mode 100644 index 2359c554ab54..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionBulkSubscribeOptions.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Dapr PubSub Bulk Subscription Options. - */ -@Fluent -public final class DaprSubscriptionBulkSubscribeOptions - implements JsonSerializable { - /* - * Enable bulk subscription - */ - private Boolean enabled; - - /* - * Maximum number of messages to deliver in a bulk message. - */ - private Integer maxMessagesCount; - - /* - * Maximum duration in milliseconds to wait before a bulk message is sent to the app. - */ - private Integer maxAwaitDurationMs; - - /** - * Creates an instance of DaprSubscriptionBulkSubscribeOptions class. - */ - public DaprSubscriptionBulkSubscribeOptions() { - } - - /** - * Get the enabled property: Enable bulk subscription. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Enable bulk subscription. - * - * @param enabled the enabled value to set. - * @return the DaprSubscriptionBulkSubscribeOptions object itself. - */ - public DaprSubscriptionBulkSubscribeOptions withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the maxMessagesCount property: Maximum number of messages to deliver in a bulk message. - * - * @return the maxMessagesCount value. - */ - public Integer maxMessagesCount() { - return this.maxMessagesCount; - } - - /** - * Set the maxMessagesCount property: Maximum number of messages to deliver in a bulk message. - * - * @param maxMessagesCount the maxMessagesCount value to set. - * @return the DaprSubscriptionBulkSubscribeOptions object itself. - */ - public DaprSubscriptionBulkSubscribeOptions withMaxMessagesCount(Integer maxMessagesCount) { - this.maxMessagesCount = maxMessagesCount; - return this; - } - - /** - * Get the maxAwaitDurationMs property: Maximum duration in milliseconds to wait before a bulk message is sent to - * the app. - * - * @return the maxAwaitDurationMs value. - */ - public Integer maxAwaitDurationMs() { - return this.maxAwaitDurationMs; - } - - /** - * Set the maxAwaitDurationMs property: Maximum duration in milliseconds to wait before a bulk message is sent to - * the app. - * - * @param maxAwaitDurationMs the maxAwaitDurationMs value to set. - * @return the DaprSubscriptionBulkSubscribeOptions object itself. - */ - public DaprSubscriptionBulkSubscribeOptions withMaxAwaitDurationMs(Integer maxAwaitDurationMs) { - this.maxAwaitDurationMs = maxAwaitDurationMs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeNumberField("maxMessagesCount", this.maxMessagesCount); - jsonWriter.writeNumberField("maxAwaitDurationMs", this.maxAwaitDurationMs); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprSubscriptionBulkSubscribeOptions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprSubscriptionBulkSubscribeOptions if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DaprSubscriptionBulkSubscribeOptions. - */ - public static DaprSubscriptionBulkSubscribeOptions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprSubscriptionBulkSubscribeOptions deserializedDaprSubscriptionBulkSubscribeOptions - = new DaprSubscriptionBulkSubscribeOptions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedDaprSubscriptionBulkSubscribeOptions.enabled - = reader.getNullable(JsonReader::getBoolean); - } else if ("maxMessagesCount".equals(fieldName)) { - deserializedDaprSubscriptionBulkSubscribeOptions.maxMessagesCount - = reader.getNullable(JsonReader::getInt); - } else if ("maxAwaitDurationMs".equals(fieldName)) { - deserializedDaprSubscriptionBulkSubscribeOptions.maxAwaitDurationMs - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprSubscriptionBulkSubscribeOptions; - }); - } -} 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 deleted file mode 100644 index 6b18d09b436f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRouteRule.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Dapr Pubsub Event Subscription Route Rule is used to specify the condition for sending a message to a specific path. - */ -@Fluent -public final class DaprSubscriptionRouteRule implements JsonSerializable { - /* - * 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. - */ - private String match; - - /* - * The path for events that match this rule - */ - private String path; - - /** - * Creates an instance of DaprSubscriptionRouteRule class. - */ - public DaprSubscriptionRouteRule() { - } - - /** - * Get the match property: 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. - * - * @return the match value. - */ - public String match() { - return this.match; - } - - /** - * Set the match property: 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. - * - * @param match the match value to set. - * @return the DaprSubscriptionRouteRule object itself. - */ - public DaprSubscriptionRouteRule withMatch(String match) { - this.match = match; - return this; - } - - /** - * Get the path property: The path for events that match this rule. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: The path for events that match this rule. - * - * @param path the path value to set. - * @return the DaprSubscriptionRouteRule object itself. - */ - public DaprSubscriptionRouteRule withPath(String path) { - this.path = path; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("match", this.match); - jsonWriter.writeStringField("path", this.path); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprSubscriptionRouteRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprSubscriptionRouteRule if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DaprSubscriptionRouteRule. - */ - public static DaprSubscriptionRouteRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprSubscriptionRouteRule deserializedDaprSubscriptionRouteRule = new DaprSubscriptionRouteRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("match".equals(fieldName)) { - deserializedDaprSubscriptionRouteRule.match = reader.getString(); - } else if ("path".equals(fieldName)) { - deserializedDaprSubscriptionRouteRule.path = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprSubscriptionRouteRule; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRoutes.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRoutes.java deleted file mode 100644 index 8e8e43b7e9f8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRoutes.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Dapr PubSub Event Subscription Routes configuration. - */ -@Fluent -public final class DaprSubscriptionRoutes implements JsonSerializable { - /* - * The list of Dapr PubSub Event Subscription Route Rules. - */ - private List rules; - - /* - * The default path to deliver events that do not match any of the rules. - */ - private String defaultProperty; - - /** - * Creates an instance of DaprSubscriptionRoutes class. - */ - public DaprSubscriptionRoutes() { - } - - /** - * Get the rules property: The list of Dapr PubSub Event Subscription Route Rules. - * - * @return the rules value. - */ - public List rules() { - return this.rules; - } - - /** - * Set the rules property: The list of Dapr PubSub Event Subscription Route Rules. - * - * @param rules the rules value to set. - * @return the DaprSubscriptionRoutes object itself. - */ - public DaprSubscriptionRoutes withRules(List rules) { - this.rules = rules; - return this; - } - - /** - * Get the defaultProperty property: The default path to deliver events that do not match any of the rules. - * - * @return the defaultProperty value. - */ - public String defaultProperty() { - return this.defaultProperty; - } - - /** - * Set the defaultProperty property: The default path to deliver events that do not match any of the rules. - * - * @param defaultProperty the defaultProperty value to set. - * @return the DaprSubscriptionRoutes object itself. - */ - public DaprSubscriptionRoutes withDefaultProperty(String defaultProperty) { - this.defaultProperty = defaultProperty; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (rules() != null) { - rules().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("rules", this.rules, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("default", this.defaultProperty); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprSubscriptionRoutes from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprSubscriptionRoutes if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DaprSubscriptionRoutes. - */ - public static DaprSubscriptionRoutes fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprSubscriptionRoutes deserializedDaprSubscriptionRoutes = new DaprSubscriptionRoutes(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("rules".equals(fieldName)) { - List rules - = reader.readArray(reader1 -> DaprSubscriptionRouteRule.fromJson(reader1)); - deserializedDaprSubscriptionRoutes.rules = rules; - } else if ("default".equals(fieldName)) { - deserializedDaprSubscriptionRoutes.defaultProperty = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprSubscriptionRoutes; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptions.java deleted file mode 100644 index a7cc8cc87f40..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptions.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (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 DaprSubscriptions. - */ -public interface DaprSubscriptions { - /** - * Get the Dapr subscriptions for a 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.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 Dapr subscriptions for a managed environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Get the Dapr subscriptions for a 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.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 Dapr subscriptions for a managed environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName, Context context); - - /** - * Get a dapr subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr 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 a dapr subscription along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String environmentName, String name, - Context context); - - /** - * Get a dapr subscription. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr subscription. - */ - DaprSubscription get(String resourceGroupName, String environmentName, String name); - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr 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 {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String environmentName, String name, Context context); - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Dapr subscription. - * @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 environmentName, String name); - - /** - * Get a dapr subscription. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr subscription along with {@link Response}. - */ - DaprSubscription getById(String id); - - /** - * Get a dapr subscription. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr subscription along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Dapr subscription. - * - * Delete a Dapr subscription from a Managed Environment. - * - * @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 Dapr subscription. - * - * Delete a Dapr subscription from a 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.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 Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new DaprSubscription resource. - * - * @param name resource name. - * @return the first stage of the new DaprSubscription definition. - */ - DaprSubscription.DefinitionStages.Blank define(String name); -} 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 deleted file mode 100644 index 5149087ecbb8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionsCollection.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; -import java.io.IOException; -import java.util.List; - -/** - * Dapr Subscriptions ARM resource. - */ -@Fluent -public final class DaprSubscriptionsCollection implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of DaprSubscriptionsCollection class. - */ - public DaprSubscriptionsCollection() { - } - - /** - * 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 DaprSubscriptionsCollection object itself. - */ - public DaprSubscriptionsCollection 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 DaprSubscriptionsCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DaprSubscriptionsCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DaprSubscriptionsCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DaprSubscriptionsCollection if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DaprSubscriptionsCollection. - */ - public static DaprSubscriptionsCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DaprSubscriptionsCollection deserializedDaprSubscriptionsCollection = new DaprSubscriptionsCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> DaprSubscriptionInner.fromJson(reader1)); - deserializedDaprSubscriptionsCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDaprSubscriptionsCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDaprSubscriptionsCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DataDogConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DataDogConfiguration.java deleted file mode 100644 index 169088edbdcd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DataDogConfiguration.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Configuration of datadog. - */ -@Fluent -public final class DataDogConfiguration implements JsonSerializable { - /* - * The data dog site - */ - private String site; - - /* - * The data dog api key - */ - private String key; - - /** - * Creates an instance of DataDogConfiguration class. - */ - public DataDogConfiguration() { - } - - /** - * Get the site property: The data dog site. - * - * @return the site value. - */ - public String site() { - return this.site; - } - - /** - * Set the site property: The data dog site. - * - * @param site the site value to set. - * @return the DataDogConfiguration object itself. - */ - public DataDogConfiguration withSite(String site) { - this.site = site; - return this; - } - - /** - * Get the key property: The data dog api key. - * - * @return the key value. - */ - public String key() { - return this.key; - } - - /** - * Set the key property: The data dog api key. - * - * @param key the key value to set. - * @return the DataDogConfiguration object itself. - */ - public DataDogConfiguration withKey(String key) { - this.key = key; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("site", this.site); - jsonWriter.writeStringField("key", this.key); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DataDogConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DataDogConfiguration if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DataDogConfiguration. - */ - public static DataDogConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DataDogConfiguration deserializedDataDogConfiguration = new DataDogConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("site".equals(fieldName)) { - deserializedDataDogConfiguration.site = reader.getString(); - } else if ("key".equals(fieldName)) { - deserializedDataDogConfiguration.key = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDataDogConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultAuthorizationPolicy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultAuthorizationPolicy.java deleted file mode 100644 index f5abfa61892a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultAuthorizationPolicy.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The configuration settings of the Azure Active Directory default authorization policy. - */ -@Fluent -public final class DefaultAuthorizationPolicy implements JsonSerializable { - /* - * The configuration settings of the Azure Active Directory allowed principals. - */ - private AllowedPrincipals allowedPrincipals; - - /* - * The configuration settings of the Azure Active Directory allowed applications. - */ - private List allowedApplications; - - /** - * Creates an instance of DefaultAuthorizationPolicy class. - */ - public DefaultAuthorizationPolicy() { - } - - /** - * Get the allowedPrincipals property: The configuration settings of the Azure Active Directory allowed principals. - * - * @return the allowedPrincipals value. - */ - public AllowedPrincipals allowedPrincipals() { - return this.allowedPrincipals; - } - - /** - * Set the allowedPrincipals property: The configuration settings of the Azure Active Directory allowed principals. - * - * @param allowedPrincipals the allowedPrincipals value to set. - * @return the DefaultAuthorizationPolicy object itself. - */ - public DefaultAuthorizationPolicy withAllowedPrincipals(AllowedPrincipals allowedPrincipals) { - this.allowedPrincipals = allowedPrincipals; - return this; - } - - /** - * Get the allowedApplications property: The configuration settings of the Azure Active Directory allowed - * applications. - * - * @return the allowedApplications value. - */ - public List allowedApplications() { - return this.allowedApplications; - } - - /** - * Set the allowedApplications property: The configuration settings of the Azure Active Directory allowed - * applications. - * - * @param allowedApplications the allowedApplications value to set. - * @return the DefaultAuthorizationPolicy object itself. - */ - public DefaultAuthorizationPolicy withAllowedApplications(List allowedApplications) { - this.allowedApplications = allowedApplications; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (allowedPrincipals() != null) { - allowedPrincipals().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("allowedPrincipals", this.allowedPrincipals); - jsonWriter.writeArrayField("allowedApplications", this.allowedApplications, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DefaultAuthorizationPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DefaultAuthorizationPolicy if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DefaultAuthorizationPolicy. - */ - public static DefaultAuthorizationPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DefaultAuthorizationPolicy deserializedDefaultAuthorizationPolicy = new DefaultAuthorizationPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("allowedPrincipals".equals(fieldName)) { - deserializedDefaultAuthorizationPolicy.allowedPrincipals = AllowedPrincipals.fromJson(reader); - } else if ("allowedApplications".equals(fieldName)) { - List allowedApplications = reader.readArray(reader1 -> reader1.getString()); - deserializedDefaultAuthorizationPolicy.allowedApplications = allowedApplications; - } else { - reader.skipChildren(); - } - } - - return deserializedDefaultAuthorizationPolicy; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseError.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseError.java deleted file mode 100644 index 303949482e6b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseError.java +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (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.azure.core.management.exception.AdditionalInfo; -import com.azure.core.management.exception.ManagementError; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * App Service error response. - */ -@Immutable -public final class DefaultErrorResponseError extends ManagementError { - /* - * More information to debug error. - */ - private String innererror; - - /* - * Additional info for the error. - */ - private List additionalInfo; - - /* - * Details for the error. - */ - private List details; - - /* - * The target of the error. - */ - private String target; - - /* - * The error message parsed from the body of the http error response. - */ - private String message; - - /* - * The error code parsed from the body of the http error response. - */ - private String code; - - /** - * Creates an instance of DefaultErrorResponseError class. - */ - public DefaultErrorResponseError() { - } - - /** - * Get the innererror property: More information to debug error. - * - * @return the innererror value. - */ - public String getInnererror() { - return this.innererror; - } - - /** - * Get the additionalInfo property: Additional info for the error. - * - * @return the additionalInfo value. - */ - @Override - public List getAdditionalInfo() { - return this.additionalInfo; - } - - /** - * Get the details property: Details for the error. - * - * @return the details value. - */ - @Override - public List getDetails() { - return this.details; - } - - /** - * Get the target property: The target of the error. - * - * @return the target value. - */ - @Override - public String getTarget() { - return this.target; - } - - /** - * Get the message property: The error message parsed from the body of the http error response. - * - * @return the message value. - */ - @Override - public String getMessage() { - return this.message; - } - - /** - * Get the code property: The error code parsed from the body of the http error response. - * - * @return the code value. - */ - @Override - public String getCode() { - return this.code; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DefaultErrorResponseError from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DefaultErrorResponseError if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DefaultErrorResponseError. - */ - public static DefaultErrorResponseError fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JsonReader bufferedReader = reader.bufferObject(); - bufferedReader.nextToken(); - while (bufferedReader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = bufferedReader.getFieldName(); - bufferedReader.nextToken(); - - if ("error".equals(fieldName)) { - return readManagementError(bufferedReader); - } else { - bufferedReader.skipChildren(); - } - } - return readManagementError(bufferedReader.reset()); - }); - } - - private static DefaultErrorResponseError readManagementError(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DefaultErrorResponseError deserializedDefaultErrorResponseError = new DefaultErrorResponseError(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("code".equals(fieldName)) { - deserializedDefaultErrorResponseError.code = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedDefaultErrorResponseError.message = reader.getString(); - } else if ("target".equals(fieldName)) { - deserializedDefaultErrorResponseError.target = reader.getString(); - } else if ("details".equals(fieldName)) { - List details = reader.readArray(reader1 -> ManagementError.fromJson(reader1)); - deserializedDefaultErrorResponseError.details = details; - } else if ("additionalInfo".equals(fieldName)) { - List additionalInfo = reader.readArray(reader1 -> AdditionalInfo.fromJson(reader1)); - deserializedDefaultErrorResponseError.additionalInfo = additionalInfo; - } else if ("innererror".equals(fieldName)) { - deserializedDefaultErrorResponseError.innererror = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDefaultErrorResponseError; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseErrorException.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseErrorException.java deleted file mode 100644 index 9b49fecbf027..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseErrorException.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.models; - -import com.azure.core.http.HttpResponse; -import com.azure.core.management.exception.ManagementException; - -/** - * Exception thrown for an invalid response with DefaultErrorResponseError information. - */ -public final class DefaultErrorResponseErrorException extends ManagementException { - /** - * Initializes a new instance of the DefaultErrorResponseErrorException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - */ - public DefaultErrorResponseErrorException(String message, HttpResponse response) { - super(message, response); - } - - /** - * Initializes a new instance of the DefaultErrorResponseErrorException class. - * - * @param message the exception message or the response content if a message is not available. - * @param response the HTTP response. - * @param value the deserialized response value. - */ - public DefaultErrorResponseErrorException(String message, HttpResponse response, DefaultErrorResponseError value) { - super(message, response, value); - } - - /** - * {@inheritDoc} - */ - @Override - public DefaultErrorResponseError getValue() { - return (DefaultErrorResponseError) super.getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DestinationsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DestinationsConfiguration.java deleted file mode 100644 index d79de70647ca..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DestinationsConfiguration.java +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Configuration of Open Telemetry destinations. - */ -@Fluent -public final class DestinationsConfiguration implements JsonSerializable { - /* - * Open telemetry datadog destination configuration - */ - private DataDogConfiguration dataDogConfiguration; - - /* - * Open telemetry otlp configurations - */ - private List otlpConfigurations; - - /** - * Creates an instance of DestinationsConfiguration class. - */ - public DestinationsConfiguration() { - } - - /** - * Get the dataDogConfiguration property: Open telemetry datadog destination configuration. - * - * @return the dataDogConfiguration value. - */ - public DataDogConfiguration dataDogConfiguration() { - return this.dataDogConfiguration; - } - - /** - * Set the dataDogConfiguration property: Open telemetry datadog destination configuration. - * - * @param dataDogConfiguration the dataDogConfiguration value to set. - * @return the DestinationsConfiguration object itself. - */ - public DestinationsConfiguration withDataDogConfiguration(DataDogConfiguration dataDogConfiguration) { - this.dataDogConfiguration = dataDogConfiguration; - return this; - } - - /** - * Get the otlpConfigurations property: Open telemetry otlp configurations. - * - * @return the otlpConfigurations value. - */ - public List otlpConfigurations() { - return this.otlpConfigurations; - } - - /** - * Set the otlpConfigurations property: Open telemetry otlp configurations. - * - * @param otlpConfigurations the otlpConfigurations value to set. - * @return the DestinationsConfiguration object itself. - */ - public DestinationsConfiguration withOtlpConfigurations(List otlpConfigurations) { - this.otlpConfigurations = otlpConfigurations; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dataDogConfiguration() != null) { - dataDogConfiguration().validate(); - } - if (otlpConfigurations() != null) { - otlpConfigurations().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("dataDogConfiguration", this.dataDogConfiguration); - jsonWriter.writeArrayField("otlpConfigurations", this.otlpConfigurations, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DestinationsConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DestinationsConfiguration if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DestinationsConfiguration. - */ - public static DestinationsConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DestinationsConfiguration deserializedDestinationsConfiguration = new DestinationsConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("dataDogConfiguration".equals(fieldName)) { - deserializedDestinationsConfiguration.dataDogConfiguration = DataDogConfiguration.fromJson(reader); - } else if ("otlpConfigurations".equals(fieldName)) { - List otlpConfigurations - = reader.readArray(reader1 -> OtlpConfiguration.fromJson(reader1)); - deserializedDestinationsConfiguration.otlpConfigurations = otlpConfigurations; - } else { - reader.skipChildren(); - } - } - - return deserializedDestinationsConfiguration; - }); - } -} 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 deleted file mode 100644 index 8b203aaede5d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DetectionStatus.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -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. - */ - 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/DiagnosticDataProviderMetadata.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadata.java deleted file mode 100644 index b858a7dd7a9a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadata.java +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Details of a diagnostics data provider. - */ -@Fluent -public final class DiagnosticDataProviderMetadata implements JsonSerializable { - /* - * Name of data provider - */ - private String providerName; - - /* - * Collection of properties - */ - private List propertyBag; - - /** - * Creates an instance of DiagnosticDataProviderMetadata class. - */ - public DiagnosticDataProviderMetadata() { - } - - /** - * Get the providerName property: Name of data provider. - * - * @return the providerName value. - */ - public String providerName() { - return this.providerName; - } - - /** - * Set the providerName property: Name of data provider. - * - * @param providerName the providerName value to set. - * @return the DiagnosticDataProviderMetadata object itself. - */ - public DiagnosticDataProviderMetadata withProviderName(String providerName) { - this.providerName = providerName; - return this; - } - - /** - * Get the propertyBag property: Collection of properties. - * - * @return the propertyBag value. - */ - public List propertyBag() { - return this.propertyBag; - } - - /** - * Set the propertyBag property: Collection of properties. - * - * @param propertyBag the propertyBag value to set. - * @return the DiagnosticDataProviderMetadata object itself. - */ - public DiagnosticDataProviderMetadata - withPropertyBag(List propertyBag) { - this.propertyBag = propertyBag; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (propertyBag() != null) { - propertyBag().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("providerName", this.providerName); - jsonWriter.writeArrayField("propertyBag", this.propertyBag, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiagnosticDataProviderMetadata from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiagnosticDataProviderMetadata if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiagnosticDataProviderMetadata. - */ - public static DiagnosticDataProviderMetadata fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiagnosticDataProviderMetadata deserializedDiagnosticDataProviderMetadata - = new DiagnosticDataProviderMetadata(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("providerName".equals(fieldName)) { - deserializedDiagnosticDataProviderMetadata.providerName = reader.getString(); - } else if ("propertyBag".equals(fieldName)) { - List propertyBag - = reader.readArray(reader1 -> DiagnosticDataProviderMetadataPropertyBagItem.fromJson(reader1)); - deserializedDiagnosticDataProviderMetadata.propertyBag = propertyBag; - } else { - reader.skipChildren(); - } - } - - return deserializedDiagnosticDataProviderMetadata; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadataPropertyBagItem.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadataPropertyBagItem.java deleted file mode 100644 index 10c41181eb45..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadataPropertyBagItem.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Property details. - */ -@Fluent -public final class DiagnosticDataProviderMetadataPropertyBagItem - implements JsonSerializable { - /* - * Property name - */ - private String name; - - /* - * Property value - */ - private String value; - - /** - * Creates an instance of DiagnosticDataProviderMetadataPropertyBagItem class. - */ - public DiagnosticDataProviderMetadataPropertyBagItem() { - } - - /** - * Get the name property: Property name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Property name. - * - * @param name the name value to set. - * @return the DiagnosticDataProviderMetadataPropertyBagItem object itself. - */ - public DiagnosticDataProviderMetadataPropertyBagItem withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: Property value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Property value. - * - * @param value the value value to set. - * @return the DiagnosticDataProviderMetadataPropertyBagItem object itself. - */ - public DiagnosticDataProviderMetadataPropertyBagItem withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("value", this.value); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiagnosticDataProviderMetadataPropertyBagItem from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiagnosticDataProviderMetadataPropertyBagItem if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiagnosticDataProviderMetadataPropertyBagItem. - */ - public static DiagnosticDataProviderMetadataPropertyBagItem fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiagnosticDataProviderMetadataPropertyBagItem deserializedDiagnosticDataProviderMetadataPropertyBagItem - = new DiagnosticDataProviderMetadataPropertyBagItem(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedDiagnosticDataProviderMetadataPropertyBagItem.name = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedDiagnosticDataProviderMetadataPropertyBagItem.value = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDiagnosticDataProviderMetadataPropertyBagItem; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseColumn.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseColumn.java deleted file mode 100644 index 746623c49a05..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseColumn.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Diagnostics data column. - */ -@Fluent -public final class DiagnosticDataTableResponseColumn implements JsonSerializable { - /* - * Column name - */ - private String columnName; - - /* - * Data type of the column - */ - private String dataType; - - /* - * Column type - */ - private String columnType; - - /** - * Creates an instance of DiagnosticDataTableResponseColumn class. - */ - public DiagnosticDataTableResponseColumn() { - } - - /** - * Get the columnName property: Column name. - * - * @return the columnName value. - */ - public String columnName() { - return this.columnName; - } - - /** - * Set the columnName property: Column name. - * - * @param columnName the columnName value to set. - * @return the DiagnosticDataTableResponseColumn object itself. - */ - public DiagnosticDataTableResponseColumn withColumnName(String columnName) { - this.columnName = columnName; - return this; - } - - /** - * Get the dataType property: Data type of the column. - * - * @return the dataType value. - */ - public String dataType() { - return this.dataType; - } - - /** - * Set the dataType property: Data type of the column. - * - * @param dataType the dataType value to set. - * @return the DiagnosticDataTableResponseColumn object itself. - */ - public DiagnosticDataTableResponseColumn withDataType(String dataType) { - this.dataType = dataType; - return this; - } - - /** - * Get the columnType property: Column type. - * - * @return the columnType value. - */ - public String columnType() { - return this.columnType; - } - - /** - * Set the columnType property: Column type. - * - * @param columnType the columnType value to set. - * @return the DiagnosticDataTableResponseColumn object itself. - */ - public DiagnosticDataTableResponseColumn withColumnType(String columnType) { - this.columnType = columnType; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("columnName", this.columnName); - jsonWriter.writeStringField("dataType", this.dataType); - jsonWriter.writeStringField("columnType", this.columnType); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiagnosticDataTableResponseColumn from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiagnosticDataTableResponseColumn if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiagnosticDataTableResponseColumn. - */ - public static DiagnosticDataTableResponseColumn fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiagnosticDataTableResponseColumn deserializedDiagnosticDataTableResponseColumn - = new DiagnosticDataTableResponseColumn(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("columnName".equals(fieldName)) { - deserializedDiagnosticDataTableResponseColumn.columnName = reader.getString(); - } else if ("dataType".equals(fieldName)) { - deserializedDiagnosticDataTableResponseColumn.dataType = reader.getString(); - } else if ("columnType".equals(fieldName)) { - deserializedDiagnosticDataTableResponseColumn.columnType = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDiagnosticDataTableResponseColumn; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseObject.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseObject.java deleted file mode 100644 index a82b400f3b2a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseObject.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Diagnostics data table. - */ -@Fluent -public final class DiagnosticDataTableResponseObject implements JsonSerializable { - /* - * Table name - */ - private String tableName; - - /* - * Columns in the table - */ - private List columns; - - /* - * Rows in the table - */ - private List rows; - - /** - * Creates an instance of DiagnosticDataTableResponseObject class. - */ - public DiagnosticDataTableResponseObject() { - } - - /** - * Get the tableName property: Table name. - * - * @return the tableName value. - */ - public String tableName() { - return this.tableName; - } - - /** - * Set the tableName property: Table name. - * - * @param tableName the tableName value to set. - * @return the DiagnosticDataTableResponseObject object itself. - */ - public DiagnosticDataTableResponseObject withTableName(String tableName) { - this.tableName = tableName; - return this; - } - - /** - * Get the columns property: Columns in the table. - * - * @return the columns value. - */ - public List columns() { - return this.columns; - } - - /** - * Set the columns property: Columns in the table. - * - * @param columns the columns value to set. - * @return the DiagnosticDataTableResponseObject object itself. - */ - public DiagnosticDataTableResponseObject withColumns(List columns) { - this.columns = columns; - return this; - } - - /** - * Get the rows property: Rows in the table. - * - * @return the rows value. - */ - public List rows() { - return this.rows; - } - - /** - * Set the rows property: Rows in the table. - * - * @param rows the rows value to set. - * @return the DiagnosticDataTableResponseObject object itself. - */ - public DiagnosticDataTableResponseObject withRows(List rows) { - this.rows = rows; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (columns() != null) { - columns().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("tableName", this.tableName); - jsonWriter.writeArrayField("columns", this.columns, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("rows", this.rows, (writer, element) -> writer.writeUntyped(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiagnosticDataTableResponseObject from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiagnosticDataTableResponseObject if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiagnosticDataTableResponseObject. - */ - public static DiagnosticDataTableResponseObject fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiagnosticDataTableResponseObject deserializedDiagnosticDataTableResponseObject - = new DiagnosticDataTableResponseObject(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tableName".equals(fieldName)) { - deserializedDiagnosticDataTableResponseObject.tableName = reader.getString(); - } else if ("columns".equals(fieldName)) { - List columns - = reader.readArray(reader1 -> DiagnosticDataTableResponseColumn.fromJson(reader1)); - deserializedDiagnosticDataTableResponseObject.columns = columns; - } else if ("rows".equals(fieldName)) { - List rows = reader.readArray(reader1 -> reader1.readUntyped()); - deserializedDiagnosticDataTableResponseObject.rows = rows; - } else { - reader.skipChildren(); - } - } - - return deserializedDiagnosticDataTableResponseObject; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticRendering.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticRendering.java deleted file mode 100644 index 221b8fc25e2f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticRendering.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Rendering details of a diagnostics table. - */ -@Fluent -public final class DiagnosticRendering implements JsonSerializable { - /* - * Rendering type - */ - private Integer type; - - /* - * Title of the table - */ - private String title; - - /* - * Description of the table - */ - private String description; - - /* - * Flag if the table should be rendered - */ - private Boolean isVisible; - - /** - * Creates an instance of DiagnosticRendering class. - */ - public DiagnosticRendering() { - } - - /** - * Get the type property: Rendering type. - * - * @return the type value. - */ - public Integer type() { - return this.type; - } - - /** - * Set the type property: Rendering type. - * - * @param type the type value to set. - * @return the DiagnosticRendering object itself. - */ - public DiagnosticRendering withType(Integer type) { - this.type = type; - return this; - } - - /** - * Get the title property: Title of the table. - * - * @return the title value. - */ - public String title() { - return this.title; - } - - /** - * Set the title property: Title of the table. - * - * @param title the title value to set. - * @return the DiagnosticRendering object itself. - */ - public DiagnosticRendering withTitle(String title) { - this.title = title; - return this; - } - - /** - * Get the description property: Description of the table. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description of the table. - * - * @param description the description value to set. - * @return the DiagnosticRendering object itself. - */ - public DiagnosticRendering withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the isVisible property: Flag if the table should be rendered. - * - * @return the isVisible value. - */ - public Boolean isVisible() { - return this.isVisible; - } - - /** - * Set the isVisible property: Flag if the table should be rendered. - * - * @param isVisible the isVisible value to set. - * @return the DiagnosticRendering object itself. - */ - public DiagnosticRendering withIsVisible(Boolean isVisible) { - this.isVisible = isVisible; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("type", this.type); - jsonWriter.writeStringField("title", this.title); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeBooleanField("isVisible", this.isVisible); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiagnosticRendering from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiagnosticRendering if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DiagnosticRendering. - */ - public static DiagnosticRendering fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiagnosticRendering deserializedDiagnosticRendering = new DiagnosticRendering(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedDiagnosticRendering.type = reader.getNullable(JsonReader::getInt); - } else if ("title".equals(fieldName)) { - deserializedDiagnosticRendering.title = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedDiagnosticRendering.description = reader.getString(); - } else if ("isVisible".equals(fieldName)) { - deserializedDiagnosticRendering.isVisible = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedDiagnosticRendering; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticSupportTopic.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticSupportTopic.java deleted file mode 100644 index 76341cff4927..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticSupportTopic.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.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Support topic information. - */ -@Immutable -public final class DiagnosticSupportTopic implements JsonSerializable { - /* - * Unique topic identifier - */ - private String id; - - /* - * PES identifier - */ - private String pesId; - - /** - * Creates an instance of DiagnosticSupportTopic class. - */ - public DiagnosticSupportTopic() { - } - - /** - * Get the id property: Unique topic identifier. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the pesId property: PES identifier. - * - * @return the pesId value. - */ - public String pesId() { - return this.pesId; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiagnosticSupportTopic from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiagnosticSupportTopic if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiagnosticSupportTopic. - */ - public static DiagnosticSupportTopic fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiagnosticSupportTopic deserializedDiagnosticSupportTopic = new DiagnosticSupportTopic(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDiagnosticSupportTopic.id = reader.getString(); - } else if ("pesId".equals(fieldName)) { - deserializedDiagnosticSupportTopic.pesId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDiagnosticSupportTopic; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Diagnostics.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Diagnostics.java deleted file mode 100644 index fb32bde4a6b7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Diagnostics.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.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; - -/** - * An immutable client-side representation of Diagnostics. - */ -public interface Diagnostics { - /** - * 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: Diagnostics resource specific properties. - * - * @return the properties value. - */ - DiagnosticsProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner object. - * - * @return the inner object. - */ - DiagnosticsInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsCollection.java deleted file mode 100644 index 74cc7c4d5bd0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsCollection.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.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; -import java.util.List; - -/** - * An immutable client-side representation of DiagnosticsCollection. - */ -public interface DiagnosticsCollection { - /** - * Gets the value property: Collection of diagnostic data. - * - * @return the value value. - */ - List value(); - - /** - * Gets the nextLink property: Link to next page of resources. - * - * @return the nextLink value. - */ - String nextLink(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner object. - * - * @return the inner object. - */ - DiagnosticsCollectionInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDataApiResponse.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDataApiResponse.java deleted file mode 100644 index 9640d9549aaf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDataApiResponse.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Diagnostics data returned from a detector. - */ -@Fluent -public final class DiagnosticsDataApiResponse implements JsonSerializable { - /* - * Table response - */ - private DiagnosticDataTableResponseObject table; - - /* - * Details of the table response - */ - private DiagnosticRendering renderingProperties; - - /** - * Creates an instance of DiagnosticsDataApiResponse class. - */ - public DiagnosticsDataApiResponse() { - } - - /** - * Get the table property: Table response. - * - * @return the table value. - */ - public DiagnosticDataTableResponseObject table() { - return this.table; - } - - /** - * Set the table property: Table response. - * - * @param table the table value to set. - * @return the DiagnosticsDataApiResponse object itself. - */ - public DiagnosticsDataApiResponse withTable(DiagnosticDataTableResponseObject table) { - this.table = table; - return this; - } - - /** - * Get the renderingProperties property: Details of the table response. - * - * @return the renderingProperties value. - */ - public DiagnosticRendering renderingProperties() { - return this.renderingProperties; - } - - /** - * Set the renderingProperties property: Details of the table response. - * - * @param renderingProperties the renderingProperties value to set. - * @return the DiagnosticsDataApiResponse object itself. - */ - public DiagnosticsDataApiResponse withRenderingProperties(DiagnosticRendering renderingProperties) { - this.renderingProperties = renderingProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (table() != null) { - table().validate(); - } - if (renderingProperties() != null) { - renderingProperties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("table", this.table); - jsonWriter.writeJsonField("renderingProperties", this.renderingProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiagnosticsDataApiResponse from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiagnosticsDataApiResponse if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiagnosticsDataApiResponse. - */ - public static DiagnosticsDataApiResponse fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiagnosticsDataApiResponse deserializedDiagnosticsDataApiResponse = new DiagnosticsDataApiResponse(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("table".equals(fieldName)) { - deserializedDiagnosticsDataApiResponse.table = DiagnosticDataTableResponseObject.fromJson(reader); - } else if ("renderingProperties".equals(fieldName)) { - deserializedDiagnosticsDataApiResponse.renderingProperties = DiagnosticRendering.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDiagnosticsDataApiResponse; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDefinition.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDefinition.java deleted file mode 100644 index 1e6afd4ed928..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDefinition.java +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Metadata of the diagnostics response. - */ -@Fluent -public final class DiagnosticsDefinition implements JsonSerializable { - /* - * Unique detector name - */ - private String id; - - /* - * Display Name of the detector - */ - private String name; - - /* - * Details of the diagnostics info - */ - private String description; - - /* - * Authors' names of the detector - */ - private String author; - - /* - * Category of the detector - */ - private String category; - - /* - * List of support topics - */ - private List supportTopicList; - - /* - * List of analysis types - */ - private List analysisTypes; - - /* - * Authors' names of the detector - */ - private String type; - - /* - * Authors' names of the detector - */ - private Float score; - - /** - * Creates an instance of DiagnosticsDefinition class. - */ - public DiagnosticsDefinition() { - } - - /** - * Get the id property: Unique detector name. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the name property: Display Name of the detector. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Get the description property: Details of the diagnostics info. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the author property: Authors' names of the detector. - * - * @return the author value. - */ - public String author() { - return this.author; - } - - /** - * Get the category property: Category of the detector. - * - * @return the category value. - */ - public String category() { - return this.category; - } - - /** - * Get the supportTopicList property: List of support topics. - * - * @return the supportTopicList value. - */ - public List supportTopicList() { - return this.supportTopicList; - } - - /** - * Set the supportTopicList property: List of support topics. - * - * @param supportTopicList the supportTopicList value to set. - * @return the DiagnosticsDefinition object itself. - */ - public DiagnosticsDefinition withSupportTopicList(List supportTopicList) { - this.supportTopicList = supportTopicList; - return this; - } - - /** - * Get the analysisTypes property: List of analysis types. - * - * @return the analysisTypes value. - */ - public List analysisTypes() { - return this.analysisTypes; - } - - /** - * Set the analysisTypes property: List of analysis types. - * - * @param analysisTypes the analysisTypes value to set. - * @return the DiagnosticsDefinition object itself. - */ - public DiagnosticsDefinition withAnalysisTypes(List analysisTypes) { - this.analysisTypes = analysisTypes; - return this; - } - - /** - * Get the type property: Authors' names of the detector. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Get the score property: Authors' names of the detector. - * - * @return the score value. - */ - public Float score() { - return this.score; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (supportTopicList() != null) { - supportTopicList().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("supportTopicList", this.supportTopicList, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("analysisTypes", this.analysisTypes, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiagnosticsDefinition from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiagnosticsDefinition if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiagnosticsDefinition. - */ - public static DiagnosticsDefinition fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiagnosticsDefinition deserializedDiagnosticsDefinition = new DiagnosticsDefinition(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedDiagnosticsDefinition.id = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedDiagnosticsDefinition.name = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedDiagnosticsDefinition.description = reader.getString(); - } else if ("author".equals(fieldName)) { - deserializedDiagnosticsDefinition.author = reader.getString(); - } else if ("category".equals(fieldName)) { - deserializedDiagnosticsDefinition.category = reader.getString(); - } else if ("supportTopicList".equals(fieldName)) { - List supportTopicList - = reader.readArray(reader1 -> DiagnosticSupportTopic.fromJson(reader1)); - deserializedDiagnosticsDefinition.supportTopicList = supportTopicList; - } else if ("analysisTypes".equals(fieldName)) { - List analysisTypes = reader.readArray(reader1 -> reader1.getString()); - deserializedDiagnosticsDefinition.analysisTypes = analysisTypes; - } else if ("type".equals(fieldName)) { - deserializedDiagnosticsDefinition.type = reader.getString(); - } else if ("score".equals(fieldName)) { - deserializedDiagnosticsDefinition.score = reader.getNullable(JsonReader::getFloat); - } else { - reader.skipChildren(); - } - } - - return deserializedDiagnosticsDefinition; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsProperties.java deleted file mode 100644 index 47f7ea5cdb9c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsProperties.java +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Diagnostics resource specific properties. - */ -@Fluent -public final class DiagnosticsProperties implements JsonSerializable { - /* - * Metadata of the diagnostics response. - */ - private DiagnosticsDefinition metadata; - - /* - * Set of data collections associated with the response. - */ - private List dataset; - - /* - * Status of the diagnostics response. - */ - private DiagnosticsStatus status; - - /* - * List of data providers' metadata. - */ - private DiagnosticDataProviderMetadata dataProviderMetadata; - - /** - * Creates an instance of DiagnosticsProperties class. - */ - public DiagnosticsProperties() { - } - - /** - * Get the metadata property: Metadata of the diagnostics response. - * - * @return the metadata value. - */ - public DiagnosticsDefinition metadata() { - return this.metadata; - } - - /** - * Set the metadata property: Metadata of the diagnostics response. - * - * @param metadata the metadata value to set. - * @return the DiagnosticsProperties object itself. - */ - public DiagnosticsProperties withMetadata(DiagnosticsDefinition metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the dataset property: Set of data collections associated with the response. - * - * @return the dataset value. - */ - public List dataset() { - return this.dataset; - } - - /** - * Set the dataset property: Set of data collections associated with the response. - * - * @param dataset the dataset value to set. - * @return the DiagnosticsProperties object itself. - */ - public DiagnosticsProperties withDataset(List dataset) { - this.dataset = dataset; - return this; - } - - /** - * Get the status property: Status of the diagnostics response. - * - * @return the status value. - */ - public DiagnosticsStatus status() { - return this.status; - } - - /** - * Set the status property: Status of the diagnostics response. - * - * @param status the status value to set. - * @return the DiagnosticsProperties object itself. - */ - public DiagnosticsProperties withStatus(DiagnosticsStatus status) { - this.status = status; - return this; - } - - /** - * Get the dataProviderMetadata property: List of data providers' metadata. - * - * @return the dataProviderMetadata value. - */ - public DiagnosticDataProviderMetadata dataProviderMetadata() { - return this.dataProviderMetadata; - } - - /** - * Set the dataProviderMetadata property: List of data providers' metadata. - * - * @param dataProviderMetadata the dataProviderMetadata value to set. - * @return the DiagnosticsProperties object itself. - */ - public DiagnosticsProperties withDataProviderMetadata(DiagnosticDataProviderMetadata dataProviderMetadata) { - this.dataProviderMetadata = dataProviderMetadata; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (metadata() != null) { - metadata().validate(); - } - if (dataset() != null) { - dataset().forEach(e -> e.validate()); - } - if (status() != null) { - status().validate(); - } - if (dataProviderMetadata() != null) { - dataProviderMetadata().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("metadata", this.metadata); - jsonWriter.writeArrayField("dataset", this.dataset, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("status", this.status); - jsonWriter.writeJsonField("dataProviderMetadata", this.dataProviderMetadata); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiagnosticsProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiagnosticsProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the DiagnosticsProperties. - */ - public static DiagnosticsProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiagnosticsProperties deserializedDiagnosticsProperties = new DiagnosticsProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("metadata".equals(fieldName)) { - deserializedDiagnosticsProperties.metadata = DiagnosticsDefinition.fromJson(reader); - } else if ("dataset".equals(fieldName)) { - List dataset - = reader.readArray(reader1 -> DiagnosticsDataApiResponse.fromJson(reader1)); - deserializedDiagnosticsProperties.dataset = dataset; - } else if ("status".equals(fieldName)) { - deserializedDiagnosticsProperties.status = DiagnosticsStatus.fromJson(reader); - } else if ("dataProviderMetadata".equals(fieldName)) { - deserializedDiagnosticsProperties.dataProviderMetadata - = DiagnosticDataProviderMetadata.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedDiagnosticsProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsStatus.java deleted file mode 100644 index 4514cbddf3c8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsStatus.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Rendering details of a diagnostics table. - */ -@Fluent -public final class DiagnosticsStatus implements JsonSerializable { - /* - * Diagnostic message - */ - private String message; - - /* - * Status - */ - private Integer statusId; - - /** - * Creates an instance of DiagnosticsStatus class. - */ - public DiagnosticsStatus() { - } - - /** - * Get the message property: Diagnostic message. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: Diagnostic message. - * - * @param message the message value to set. - * @return the DiagnosticsStatus object itself. - */ - public DiagnosticsStatus withMessage(String message) { - this.message = message; - return this; - } - - /** - * Get the statusId property: Status. - * - * @return the statusId value. - */ - public Integer statusId() { - return this.statusId; - } - - /** - * Set the statusId property: Status. - * - * @param statusId the statusId value to set. - * @return the DiagnosticsStatus object itself. - */ - public DiagnosticsStatus withStatusId(Integer statusId) { - this.statusId = statusId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("message", this.message); - jsonWriter.writeNumberField("statusId", this.statusId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DiagnosticsStatus from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DiagnosticsStatus if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the DiagnosticsStatus. - */ - public static DiagnosticsStatus fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DiagnosticsStatus deserializedDiagnosticsStatus = new DiagnosticsStatus(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("message".equals(fieldName)) { - deserializedDiagnosticsStatus.message = reader.getString(); - } else if ("statusId".equals(fieldName)) { - deserializedDiagnosticsStatus.statusId = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedDiagnosticsStatus; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DnsVerificationTestResult.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DnsVerificationTestResult.java deleted file mode 100644 index 73290d277eaf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DnsVerificationTestResult.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.models; - -/** - * DNS verification test result. - */ -public enum DnsVerificationTestResult { - /** - * Enum value Passed. - */ - PASSED("Passed"), - - /** - * Enum value Failed. - */ - FAILED("Failed"), - - /** - * Enum value Skipped. - */ - SKIPPED("Skipped"); - - /** - * The actual serialized value for a DnsVerificationTestResult instance. - */ - private final String value; - - DnsVerificationTestResult(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a DnsVerificationTestResult instance. - * - * @param value the serialized value to parse. - * @return the parsed DnsVerificationTestResult object, or null if unable to parse. - */ - public static DnsVerificationTestResult fromString(String value) { - if (value == null) { - return null; - } - DnsVerificationTestResult[] items = DnsVerificationTestResult.values(); - for (DnsVerificationTestResult item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponent.java deleted file mode 100644 index 6b1f7daa5772..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponent.java +++ /dev/null @@ -1,265 +0,0 @@ -// Copyright (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.DotNetComponentInner; -import java.util.List; - -/** - * An immutable client-side representation of DotNetComponent. - */ -public interface DotNetComponent { - /** - * 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 componentType property: Type of the .NET Component. - * - * @return the componentType value. - */ - DotNetComponentType componentType(); - - /** - * Gets the provisioningState property: Provisioning state of the .NET Component. - * - * @return the provisioningState value. - */ - DotNetComponentProvisioningState provisioningState(); - - /** - * Gets the configurations property: List of .NET Components configuration properties. - * - * @return the configurations value. - */ - List configurations(); - - /** - * Gets the serviceBinds property: List of .NET Components that are bound to the .NET component. - * - * @return the serviceBinds value. - */ - List serviceBinds(); - - /** - * 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.DotNetComponentInner object. - * - * @return the inner object. - */ - DotNetComponentInner innerModel(); - - /** - * The entirety of the DotNetComponent definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The DotNetComponent definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the DotNetComponent definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the DotNetComponent 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 DotNetComponent 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 { - /** - * Executes the create request. - * - * @return the created resource. - */ - DotNetComponent create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - DotNetComponent create(Context context); - } - - /** - * The stage of the DotNetComponent definition allowing to specify componentType. - */ - interface WithComponentType { - /** - * Specifies the componentType property: Type of the .NET Component.. - * - * @param componentType Type of the .NET Component. - * @return the next definition stage. - */ - WithCreate withComponentType(DotNetComponentType componentType); - } - - /** - * The stage of the DotNetComponent definition allowing to specify configurations. - */ - interface WithConfigurations { - /** - * Specifies the configurations property: List of .NET Components configuration properties. - * - * @param configurations List of .NET Components configuration properties. - * @return the next definition stage. - */ - WithCreate withConfigurations(List configurations); - } - - /** - * The stage of the DotNetComponent definition allowing to specify serviceBinds. - */ - interface WithServiceBinds { - /** - * Specifies the serviceBinds property: List of .NET Components that are bound to the .NET component. - * - * @param serviceBinds List of .NET Components that are bound to the .NET component. - * @return the next definition stage. - */ - WithCreate withServiceBinds(List serviceBinds); - } - } - - /** - * Begins update for the DotNetComponent resource. - * - * @return the stage of resource update. - */ - DotNetComponent.Update update(); - - /** - * The template for DotNetComponent update. - */ - interface Update - extends UpdateStages.WithComponentType, UpdateStages.WithConfigurations, UpdateStages.WithServiceBinds { - /** - * Executes the update request. - * - * @return the updated resource. - */ - DotNetComponent apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - DotNetComponent apply(Context context); - } - - /** - * The DotNetComponent update stages. - */ - interface UpdateStages { - /** - * The stage of the DotNetComponent update allowing to specify componentType. - */ - interface WithComponentType { - /** - * Specifies the componentType property: Type of the .NET Component.. - * - * @param componentType Type of the .NET Component. - * @return the next definition stage. - */ - Update withComponentType(DotNetComponentType componentType); - } - - /** - * The stage of the DotNetComponent update allowing to specify configurations. - */ - interface WithConfigurations { - /** - * Specifies the configurations property: List of .NET Components configuration properties. - * - * @param configurations List of .NET Components configuration properties. - * @return the next definition stage. - */ - Update withConfigurations(List configurations); - } - - /** - * The stage of the DotNetComponent update allowing to specify serviceBinds. - */ - interface WithServiceBinds { - /** - * Specifies the serviceBinds property: List of .NET Components that are bound to the .NET component. - * - * @param serviceBinds List of .NET Components that are bound to the .NET component. - * @return the next definition stage. - */ - Update withServiceBinds(List serviceBinds); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - DotNetComponent refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - DotNetComponent refresh(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentConfigurationProperty.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentConfigurationProperty.java deleted file mode 100644 index 467ae1e04d6a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentConfigurationProperty.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Configuration properties for a .NET Component. - */ -@Fluent -public final class DotNetComponentConfigurationProperty - implements JsonSerializable { - /* - * The name of the property - */ - private String propertyName; - - /* - * The value of the property - */ - private String value; - - /** - * Creates an instance of DotNetComponentConfigurationProperty class. - */ - public DotNetComponentConfigurationProperty() { - } - - /** - * Get the propertyName property: The name of the property. - * - * @return the propertyName value. - */ - public String propertyName() { - return this.propertyName; - } - - /** - * Set the propertyName property: The name of the property. - * - * @param propertyName the propertyName value to set. - * @return the DotNetComponentConfigurationProperty object itself. - */ - public DotNetComponentConfigurationProperty withPropertyName(String propertyName) { - this.propertyName = propertyName; - return this; - } - - /** - * Get the value property: The value of the property. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: The value of the property. - * - * @param value the value value to set. - * @return the DotNetComponentConfigurationProperty object itself. - */ - public DotNetComponentConfigurationProperty withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("propertyName", this.propertyName); - jsonWriter.writeStringField("value", this.value); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DotNetComponentConfigurationProperty from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DotNetComponentConfigurationProperty if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DotNetComponentConfigurationProperty. - */ - public static DotNetComponentConfigurationProperty fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DotNetComponentConfigurationProperty deserializedDotNetComponentConfigurationProperty - = new DotNetComponentConfigurationProperty(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("propertyName".equals(fieldName)) { - deserializedDotNetComponentConfigurationProperty.propertyName = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedDotNetComponentConfigurationProperty.value = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDotNetComponentConfigurationProperty; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentProvisioningState.java deleted file mode 100644 index e192894c00c1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentProvisioningState.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Provisioning state of the .NET Component. - */ -public final class DotNetComponentProvisioningState extends ExpandableStringEnum { - /** - * Static value Succeeded for DotNetComponentProvisioningState. - */ - public static final DotNetComponentProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for DotNetComponentProvisioningState. - */ - public static final DotNetComponentProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for DotNetComponentProvisioningState. - */ - public static final DotNetComponentProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Deleting for DotNetComponentProvisioningState. - */ - public static final DotNetComponentProvisioningState DELETING = fromString("Deleting"); - - /** - * Static value InProgress for DotNetComponentProvisioningState. - */ - public static final DotNetComponentProvisioningState IN_PROGRESS = fromString("InProgress"); - - /** - * Creates a new instance of DotNetComponentProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DotNetComponentProvisioningState() { - } - - /** - * Creates or finds a DotNetComponentProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding DotNetComponentProvisioningState. - */ - public static DotNetComponentProvisioningState fromString(String name) { - return fromString(name, DotNetComponentProvisioningState.class); - } - - /** - * Gets known DotNetComponentProvisioningState values. - * - * @return known DotNetComponentProvisioningState values. - */ - public static Collection values() { - return values(DotNetComponentProvisioningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentServiceBind.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentServiceBind.java deleted file mode 100644 index 0f9a7ff68eff..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentServiceBind.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Configuration to bind a .NET Component to another .NET Component. - */ -@Fluent -public final class DotNetComponentServiceBind implements JsonSerializable { - /* - * Name of the service bind - */ - private String name; - - /* - * Resource id of the target service - */ - private String serviceId; - - /** - * Creates an instance of DotNetComponentServiceBind class. - */ - public DotNetComponentServiceBind() { - } - - /** - * Get the name property: Name of the service bind. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the service bind. - * - * @param name the name value to set. - * @return the DotNetComponentServiceBind object itself. - */ - public DotNetComponentServiceBind withName(String name) { - this.name = name; - return this; - } - - /** - * Get the serviceId property: Resource id of the target service. - * - * @return the serviceId value. - */ - public String serviceId() { - return this.serviceId; - } - - /** - * Set the serviceId property: Resource id of the target service. - * - * @param serviceId the serviceId value to set. - * @return the DotNetComponentServiceBind object itself. - */ - public DotNetComponentServiceBind withServiceId(String serviceId) { - this.serviceId = serviceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("serviceId", this.serviceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DotNetComponentServiceBind from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DotNetComponentServiceBind if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DotNetComponentServiceBind. - */ - public static DotNetComponentServiceBind fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DotNetComponentServiceBind deserializedDotNetComponentServiceBind = new DotNetComponentServiceBind(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedDotNetComponentServiceBind.name = reader.getString(); - } else if ("serviceId".equals(fieldName)) { - deserializedDotNetComponentServiceBind.serviceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDotNetComponentServiceBind; - }); - } -} 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 deleted file mode 100644 index 2a317ac4d3c3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of the .NET Component. - */ -public final class DotNetComponentType extends ExpandableStringEnum { - /** - * Static value AspireDashboard for DotNetComponentType. - */ - public static final DotNetComponentType ASPIRE_DASHBOARD = fromString("AspireDashboard"); - - /** - * Creates a new instance of DotNetComponentType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public DotNetComponentType() { - } - - /** - * Creates or finds a DotNetComponentType from its string representation. - * - * @param name a name to look for. - * @return the corresponding DotNetComponentType. - */ - public static DotNetComponentType fromString(String name) { - return fromString(name, DotNetComponentType.class); - } - - /** - * Gets known DotNetComponentType values. - * - * @return known DotNetComponentType values. - */ - public static Collection values() { - return values(DotNetComponentType.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponents.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponents.java deleted file mode 100644 index 18177c70e586..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponents.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.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 DotNetComponents. - */ -public interface DotNetComponents { - /** - * Get the .NET Components for a 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 the .NET Components for a managed environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Get the .NET Components for a 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 the .NET Components for a managed environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName, Context context); - - /** - * Get a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 .NET Component along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String environmentName, String name, - Context context); - - /** - * Get a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 .NET Component. - */ - DotNetComponent get(String resourceGroupName, String environmentName, String name); - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 name); - - /** - * Delete a .NET Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the .NET Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 name, Context context); - - /** - * Get a .NET Component. - * - * @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 .NET Component along with {@link Response}. - */ - DotNetComponent getById(String id); - - /** - * Get a .NET Component. - * - * @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 .NET Component along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a .NET Component. - * - * @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 .NET Component. - * - * @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 DotNetComponent resource. - * - * @param name resource name. - * @return the first stage of the new DotNetComponent definition. - */ - DotNetComponent.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentsCollection.java deleted file mode 100644 index 15ad8913eeff..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentsCollection.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner; -import java.io.IOException; -import java.util.List; - -/** - * .NET Components ARM resource. - */ -@Fluent -public final class DotNetComponentsCollection implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of DotNetComponentsCollection class. - */ - public DotNetComponentsCollection() { - } - - /** - * 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 DotNetComponentsCollection object itself. - */ - public DotNetComponentsCollection 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 DotNetComponentsCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(DotNetComponentsCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DotNetComponentsCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DotNetComponentsCollection if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the DotNetComponentsCollection. - */ - public static DotNetComponentsCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DotNetComponentsCollection deserializedDotNetComponentsCollection = new DotNetComponentsCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> DotNetComponentInner.fromJson(reader1)); - deserializedDotNetComponentsCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedDotNetComponentsCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedDotNetComponentsCollection; - }); - } -} 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 deleted file mode 100644 index 2aa2b808a776..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DynamicPoolConfiguration.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Dynamic pool configuration. - */ -@Fluent -public final class DynamicPoolConfiguration implements JsonSerializable { - /* - * The execution type of the session pool. - */ - private ExecutionType executionType; - - /* - * The cooldown period of a session in seconds. - */ - 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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("executionType", this.executionType == null ? null : this.executionType.toString()); - jsonWriter.writeNumberField("cooldownPeriodInSeconds", this.cooldownPeriodInSeconds); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of DynamicPoolConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of DynamicPoolConfiguration if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the DynamicPoolConfiguration. - */ - public static DynamicPoolConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - DynamicPoolConfiguration deserializedDynamicPoolConfiguration = new DynamicPoolConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("executionType".equals(fieldName)) { - deserializedDynamicPoolConfiguration.executionType = ExecutionType.fromString(reader.getString()); - } else if ("cooldownPeriodInSeconds".equals(fieldName)) { - deserializedDynamicPoolConfiguration.cooldownPeriodInSeconds - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedDynamicPoolConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EncryptionSettings.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EncryptionSettings.java deleted file mode 100644 index af0d032eca02..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EncryptionSettings.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the secrets references of encryption key and signing key for ContainerApp Service - * Authentication/Authorization. - */ -@Fluent -public final class EncryptionSettings implements JsonSerializable { - /* - * The secret name which is referenced for EncryptionKey. - */ - private String containerAppAuthEncryptionSecretName; - - /* - * The secret name which is referenced for SigningKey. - */ - private String containerAppAuthSigningSecretName; - - /** - * Creates an instance of EncryptionSettings class. - */ - public EncryptionSettings() { - } - - /** - * Get the containerAppAuthEncryptionSecretName property: The secret name which is referenced for EncryptionKey. - * - * @return the containerAppAuthEncryptionSecretName value. - */ - public String containerAppAuthEncryptionSecretName() { - return this.containerAppAuthEncryptionSecretName; - } - - /** - * Set the containerAppAuthEncryptionSecretName property: The secret name which is referenced for EncryptionKey. - * - * @param containerAppAuthEncryptionSecretName the containerAppAuthEncryptionSecretName value to set. - * @return the EncryptionSettings object itself. - */ - public EncryptionSettings withContainerAppAuthEncryptionSecretName(String containerAppAuthEncryptionSecretName) { - this.containerAppAuthEncryptionSecretName = containerAppAuthEncryptionSecretName; - return this; - } - - /** - * Get the containerAppAuthSigningSecretName property: The secret name which is referenced for SigningKey. - * - * @return the containerAppAuthSigningSecretName value. - */ - public String containerAppAuthSigningSecretName() { - return this.containerAppAuthSigningSecretName; - } - - /** - * Set the containerAppAuthSigningSecretName property: The secret name which is referenced for SigningKey. - * - * @param containerAppAuthSigningSecretName the containerAppAuthSigningSecretName value to set. - * @return the EncryptionSettings object itself. - */ - public EncryptionSettings withContainerAppAuthSigningSecretName(String containerAppAuthSigningSecretName) { - this.containerAppAuthSigningSecretName = containerAppAuthSigningSecretName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("containerAppAuthEncryptionSecretName", this.containerAppAuthEncryptionSecretName); - jsonWriter.writeStringField("containerAppAuthSigningSecretName", this.containerAppAuthSigningSecretName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EncryptionSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EncryptionSettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the EncryptionSettings. - */ - public static EncryptionSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EncryptionSettings deserializedEncryptionSettings = new EncryptionSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("containerAppAuthEncryptionSecretName".equals(fieldName)) { - deserializedEncryptionSettings.containerAppAuthEncryptionSecretName = reader.getString(); - } else if ("containerAppAuthSigningSecretName".equals(fieldName)) { - deserializedEncryptionSettings.containerAppAuthSigningSecretName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEncryptionSettings; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentAuthToken.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentAuthToken.java deleted file mode 100644 index 46933f2d9ed0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentAuthToken.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (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.EnvironmentAuthTokenInner; -import java.time.OffsetDateTime; -import java.util.Map; - -/** - * An immutable client-side representation of EnvironmentAuthToken. - */ -public interface EnvironmentAuthToken { - /** - * 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 token property: Auth token value. - * - * @return the token value. - */ - String token(); - - /** - * Gets the expires property: Token expiration date. - * - * @return the expires value. - */ - OffsetDateTime expires(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.EnvironmentAuthTokenInner object. - * - * @return the inner object. - */ - EnvironmentAuthTokenInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentProvisioningState.java deleted file mode 100644 index ae124cc770b2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentProvisioningState.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Provisioning state of the Environment. - */ -public final class EnvironmentProvisioningState extends ExpandableStringEnum { - /** - * Static value Succeeded for EnvironmentProvisioningState. - */ - public static final EnvironmentProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for EnvironmentProvisioningState. - */ - public static final EnvironmentProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for EnvironmentProvisioningState. - */ - public static final EnvironmentProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Waiting for EnvironmentProvisioningState. - */ - public static final EnvironmentProvisioningState WAITING = fromString("Waiting"); - - /** - * Static value InitializationInProgress for EnvironmentProvisioningState. - */ - public static final EnvironmentProvisioningState INITIALIZATION_IN_PROGRESS - = fromString("InitializationInProgress"); - - /** - * Static value InfrastructureSetupInProgress for EnvironmentProvisioningState. - */ - public static final EnvironmentProvisioningState INFRASTRUCTURE_SETUP_IN_PROGRESS - = fromString("InfrastructureSetupInProgress"); - - /** - * Static value InfrastructureSetupComplete for EnvironmentProvisioningState. - */ - public static final EnvironmentProvisioningState INFRASTRUCTURE_SETUP_COMPLETE - = fromString("InfrastructureSetupComplete"); - - /** - * Static value ScheduledForDelete for EnvironmentProvisioningState. - */ - public static final EnvironmentProvisioningState SCHEDULED_FOR_DELETE = fromString("ScheduledForDelete"); - - /** - * Static value UpgradeRequested for EnvironmentProvisioningState. - */ - public static final EnvironmentProvisioningState UPGRADE_REQUESTED = fromString("UpgradeRequested"); - - /** - * Static value UpgradeFailed for EnvironmentProvisioningState. - */ - public static final EnvironmentProvisioningState UPGRADE_FAILED = fromString("UpgradeFailed"); - - /** - * Creates a new instance of EnvironmentProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public EnvironmentProvisioningState() { - } - - /** - * Creates or finds a EnvironmentProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding EnvironmentProvisioningState. - */ - public static EnvironmentProvisioningState fromString(String name) { - return fromString(name, EnvironmentProvisioningState.class); - } - - /** - * Gets known EnvironmentProvisioningState values. - * - * @return known EnvironmentProvisioningState values. - */ - public static Collection values() { - return values(EnvironmentProvisioningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVar.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVar.java deleted file mode 100644 index 3f9385a95d30..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVar.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container App container environment variable. - */ -@Fluent -public final class EnvironmentVar implements JsonSerializable { - /* - * Environment variable name. - */ - private String name; - - /* - * Non-secret environment variable value. - */ - private String value; - - /* - * Name of the Container App secret from which to pull the environment variable value. - */ - private String secretRef; - - /** - * Creates an instance of EnvironmentVar class. - */ - public EnvironmentVar() { - } - - /** - * Get the name property: Environment variable name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Environment variable name. - * - * @param name the name value to set. - * @return the EnvironmentVar object itself. - */ - public EnvironmentVar withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: Non-secret environment variable value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Non-secret environment variable value. - * - * @param value the value value to set. - * @return the EnvironmentVar object itself. - */ - public EnvironmentVar withValue(String value) { - this.value = value; - return this; - } - - /** - * Get the secretRef property: Name of the Container App secret from which to pull the environment variable value. - * - * @return the secretRef value. - */ - public String secretRef() { - return this.secretRef; - } - - /** - * Set the secretRef property: Name of the Container App secret from which to pull the environment variable value. - * - * @param secretRef the secretRef value to set. - * @return the EnvironmentVar object itself. - */ - public EnvironmentVar withSecretRef(String secretRef) { - this.secretRef = secretRef; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("value", this.value); - jsonWriter.writeStringField("secretRef", this.secretRef); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EnvironmentVar from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EnvironmentVar if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the EnvironmentVar. - */ - public static EnvironmentVar fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EnvironmentVar deserializedEnvironmentVar = new EnvironmentVar(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedEnvironmentVar.name = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedEnvironmentVar.value = reader.getString(); - } else if ("secretRef".equals(fieldName)) { - deserializedEnvironmentVar.secretRef = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEnvironmentVar; - }); - } -} 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 deleted file mode 100644 index c4701b917d05..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVariable.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Model representing an environment variable. - */ -@Fluent -public final class EnvironmentVariable implements JsonSerializable { - /* - * Environment variable name. - */ - private String name; - - /* - * Environment variable value. - */ - private String value; - - /** - * Creates an instance of EnvironmentVariable class. - */ - public EnvironmentVariable() { - } - - /** - * Get the name property: Environment variable name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Environment variable name. - * - * @param name the name value to set. - * @return the EnvironmentVariable object itself. - */ - public EnvironmentVariable withName(String name) { - this.name = name; - return this; - } - - /** - * Get the value property: Environment variable value. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: Environment variable value. - * - * @param value the value value to set. - * @return the EnvironmentVariable object itself. - */ - public EnvironmentVariable withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model EnvironmentVariable")); - } - if (value() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property value in model EnvironmentVariable")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(EnvironmentVariable.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("value", this.value); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of EnvironmentVariable from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of EnvironmentVariable if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the EnvironmentVariable. - */ - public static EnvironmentVariable fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - EnvironmentVariable deserializedEnvironmentVariable = new EnvironmentVariable(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedEnvironmentVariable.name = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedEnvironmentVariable.value = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedEnvironmentVariable; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ErrorEntity.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ErrorEntity.java deleted file mode 100644 index cae94ab237ff..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ErrorEntity.java +++ /dev/null @@ -1,299 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Body of the error response returned from the API. - */ -@Fluent -public final class ErrorEntity implements JsonSerializable { - /* - * Type of error. - */ - private String extendedCode; - - /* - * Message template. - */ - private String messageTemplate; - - /* - * Parameters for the template. - */ - private List parameters; - - /* - * Inner errors. - */ - private List innerErrors; - - /* - * Error Details. - */ - private List details; - - /* - * The error target. - */ - private String target; - - /* - * Basic error code. - */ - private String code; - - /* - * Any details of the error. - */ - private String message; - - /** - * Creates an instance of ErrorEntity class. - */ - public ErrorEntity() { - } - - /** - * Get the extendedCode property: Type of error. - * - * @return the extendedCode value. - */ - public String extendedCode() { - return this.extendedCode; - } - - /** - * Set the extendedCode property: Type of error. - * - * @param extendedCode the extendedCode value to set. - * @return the ErrorEntity object itself. - */ - public ErrorEntity withExtendedCode(String extendedCode) { - this.extendedCode = extendedCode; - return this; - } - - /** - * Get the messageTemplate property: Message template. - * - * @return the messageTemplate value. - */ - public String messageTemplate() { - return this.messageTemplate; - } - - /** - * Set the messageTemplate property: Message template. - * - * @param messageTemplate the messageTemplate value to set. - * @return the ErrorEntity object itself. - */ - public ErrorEntity withMessageTemplate(String messageTemplate) { - this.messageTemplate = messageTemplate; - return this; - } - - /** - * Get the parameters property: Parameters for the template. - * - * @return the parameters value. - */ - public List parameters() { - return this.parameters; - } - - /** - * Set the parameters property: Parameters for the template. - * - * @param parameters the parameters value to set. - * @return the ErrorEntity object itself. - */ - public ErrorEntity withParameters(List parameters) { - this.parameters = parameters; - return this; - } - - /** - * Get the innerErrors property: Inner errors. - * - * @return the innerErrors value. - */ - public List innerErrors() { - return this.innerErrors; - } - - /** - * Set the innerErrors property: Inner errors. - * - * @param innerErrors the innerErrors value to set. - * @return the ErrorEntity object itself. - */ - public ErrorEntity withInnerErrors(List innerErrors) { - this.innerErrors = innerErrors; - return this; - } - - /** - * Get the details property: Error Details. - * - * @return the details value. - */ - public List details() { - return this.details; - } - - /** - * Set the details property: Error Details. - * - * @param details the details value to set. - * @return the ErrorEntity object itself. - */ - public ErrorEntity withDetails(List details) { - this.details = details; - return this; - } - - /** - * Get the target property: The error target. - * - * @return the target value. - */ - public String target() { - return this.target; - } - - /** - * Set the target property: The error target. - * - * @param target the target value to set. - * @return the ErrorEntity object itself. - */ - public ErrorEntity withTarget(String target) { - this.target = target; - return this; - } - - /** - * Get the code property: Basic error code. - * - * @return the code value. - */ - public String code() { - return this.code; - } - - /** - * Set the code property: Basic error code. - * - * @param code the code value to set. - * @return the ErrorEntity object itself. - */ - public ErrorEntity withCode(String code) { - this.code = code; - return this; - } - - /** - * Get the message property: Any details of the error. - * - * @return the message value. - */ - public String message() { - return this.message; - } - - /** - * Set the message property: Any details of the error. - * - * @param message the message value to set. - * @return the ErrorEntity object itself. - */ - public ErrorEntity withMessage(String message) { - this.message = message; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerErrors() != null) { - innerErrors().forEach(e -> e.validate()); - } - if (details() != null) { - details().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("extendedCode", this.extendedCode); - jsonWriter.writeStringField("messageTemplate", this.messageTemplate); - jsonWriter.writeArrayField("parameters", this.parameters, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("innerErrors", this.innerErrors, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("details", this.details, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("target", this.target); - jsonWriter.writeStringField("code", this.code); - jsonWriter.writeStringField("message", this.message); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ErrorEntity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ErrorEntity if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ErrorEntity. - */ - public static ErrorEntity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ErrorEntity deserializedErrorEntity = new ErrorEntity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("extendedCode".equals(fieldName)) { - deserializedErrorEntity.extendedCode = reader.getString(); - } else if ("messageTemplate".equals(fieldName)) { - deserializedErrorEntity.messageTemplate = reader.getString(); - } else if ("parameters".equals(fieldName)) { - List parameters = reader.readArray(reader1 -> reader1.getString()); - deserializedErrorEntity.parameters = parameters; - } else if ("innerErrors".equals(fieldName)) { - List innerErrors = reader.readArray(reader1 -> ErrorEntity.fromJson(reader1)); - deserializedErrorEntity.innerErrors = innerErrors; - } else if ("details".equals(fieldName)) { - List details = reader.readArray(reader1 -> ErrorEntity.fromJson(reader1)); - deserializedErrorEntity.details = details; - } else if ("target".equals(fieldName)) { - deserializedErrorEntity.target = reader.getString(); - } else if ("code".equals(fieldName)) { - deserializedErrorEntity.code = reader.getString(); - } else if ("message".equals(fieldName)) { - deserializedErrorEntity.message = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedErrorEntity; - }); - } -} 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 deleted file mode 100644 index 35e1d2d7c639..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExecutionStatus.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Container Apps Job execution status. - */ -@Fluent -public final class ExecutionStatus implements JsonSerializable { - /* - * Replicas in the execution. - */ - 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("replicas", this.replicas, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExecutionStatus from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExecutionStatus if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ExecutionStatus. - */ - public static ExecutionStatus fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExecutionStatus deserializedExecutionStatus = new ExecutionStatus(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("replicas".equals(fieldName)) { - List replicas - = reader.readArray(reader1 -> ReplicaExecutionStatus.fromJson(reader1)); - deserializedExecutionStatus.replicas = replicas; - } else { - reader.skipChildren(); - } - } - - return deserializedExecutionStatus; - }); - } -} 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 deleted file mode 100644 index bfa282dff6a4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExecutionType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -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. - */ - 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/ExtendedLocation.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocation.java deleted file mode 100644 index 9aba5ee961a6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocation.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The complex type of the extended location. - */ -@Fluent -public final class ExtendedLocation implements JsonSerializable { - /* - * The name of the extended location. - */ - private String name; - - /* - * The type of the extended location. - */ - private ExtendedLocationTypes type; - - /** - * Creates an instance of ExtendedLocation class. - */ - public ExtendedLocation() { - } - - /** - * Get the name property: The name of the extended location. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of the extended location. - * - * @param name the name value to set. - * @return the ExtendedLocation object itself. - */ - public ExtendedLocation withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: The type of the extended location. - * - * @return the type value. - */ - public ExtendedLocationTypes type() { - return this.type; - } - - /** - * Set the type property: The type of the extended location. - * - * @param type the type value to set. - * @return the ExtendedLocation object itself. - */ - public ExtendedLocation withType(ExtendedLocationTypes type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ExtendedLocation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ExtendedLocation if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ExtendedLocation. - */ - public static ExtendedLocation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ExtendedLocation deserializedExtendedLocation = new ExtendedLocation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedExtendedLocation.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedExtendedLocation.type = ExtendedLocationTypes.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedExtendedLocation; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocationTypes.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocationTypes.java deleted file mode 100644 index 4fa976b9cf7a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocationTypes.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * The type of extendedLocation. - */ -public final class ExtendedLocationTypes extends ExpandableStringEnum { - /** - * Static value CustomLocation for ExtendedLocationTypes. - */ - public static final ExtendedLocationTypes CUSTOM_LOCATION = fromString("CustomLocation"); - - /** - * Creates a new instance of ExtendedLocationTypes value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ExtendedLocationTypes() { - } - - /** - * Creates or finds a ExtendedLocationTypes from its string representation. - * - * @param name a name to look for. - * @return the corresponding ExtendedLocationTypes. - */ - public static ExtendedLocationTypes fromString(String name) { - return fromString(name, ExtendedLocationTypes.class); - } - - /** - * Gets known ExtendedLocationTypes values. - * - * @return known ExtendedLocationTypes values. - */ - public static Collection values() { - return values(ExtendedLocationTypes.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 deleted file mode 100644 index aa1dc33ec6e7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Facebook.java +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the Facebook provider. - */ -@Fluent -public final class Facebook implements JsonSerializable { - /* - * false if the Facebook provider should not be enabled despite the set registration; otherwise, - * true. - */ - private Boolean enabled; - - /* - * The configuration settings of the app registration for the Facebook provider. - */ - private AppRegistration registration; - - /* - * The version of the Facebook api to be used while logging in. - */ - private String graphApiVersion; - - /* - * The configuration settings of the login flow. - */ - private LoginScopes login; - - /** - * Creates an instance of Facebook class. - */ - public Facebook() { - } - - /** - * Get the enabled property: <code>false</code> if the Facebook provider should not be enabled despite - * the set registration; otherwise, <code>true</code>. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: <code>false</code> if the Facebook provider should not be enabled despite - * the set registration; otherwise, <code>true</code>. - * - * @param enabled the enabled value to set. - * @return the Facebook object itself. - */ - public Facebook withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the registration property: The configuration settings of the app registration for the Facebook provider. - * - * @return the registration value. - */ - public AppRegistration registration() { - return this.registration; - } - - /** - * Set the registration property: The configuration settings of the app registration for the Facebook provider. - * - * @param registration the registration value to set. - * @return the Facebook object itself. - */ - public Facebook withRegistration(AppRegistration registration) { - this.registration = registration; - return this; - } - - /** - * Get the graphApiVersion property: The version of the Facebook api to be used while logging in. - * - * @return the graphApiVersion value. - */ - public String graphApiVersion() { - return this.graphApiVersion; - } - - /** - * Set the graphApiVersion property: The version of the Facebook api to be used while logging in. - * - * @param graphApiVersion the graphApiVersion value to set. - * @return the Facebook object itself. - */ - public Facebook withGraphApiVersion(String graphApiVersion) { - this.graphApiVersion = graphApiVersion; - return this; - } - - /** - * Get the login property: The configuration settings of the login flow. - * - * @return the login value. - */ - public LoginScopes login() { - return this.login; - } - - /** - * Set the login property: The configuration settings of the login flow. - * - * @param login the login value to set. - * @return the Facebook object itself. - */ - public Facebook withLogin(LoginScopes login) { - this.login = login; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (registration() != null) { - registration().validate(); - } - if (login() != null) { - login().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeJsonField("registration", this.registration); - jsonWriter.writeStringField("graphApiVersion", this.graphApiVersion); - jsonWriter.writeJsonField("login", this.login); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Facebook from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Facebook if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the Facebook. - */ - public static Facebook fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Facebook deserializedFacebook = new Facebook(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedFacebook.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("registration".equals(fieldName)) { - deserializedFacebook.registration = AppRegistration.fromJson(reader); - } else if ("graphApiVersion".equals(fieldName)) { - deserializedFacebook.graphApiVersion = reader.getString(); - } else if ("login".equals(fieldName)) { - deserializedFacebook.login = LoginScopes.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedFacebook; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxy.java deleted file mode 100644 index e801d06ae074..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxy.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of a forward proxy used to make the requests. - */ -@Fluent -public final class ForwardProxy implements JsonSerializable { - /* - * The convention used to determine the url of the request made. - */ - private ForwardProxyConvention convention; - - /* - * The name of the header containing the host of the request. - */ - private String customHostHeaderName; - - /* - * The name of the header containing the scheme of the request. - */ - private String customProtoHeaderName; - - /** - * Creates an instance of ForwardProxy class. - */ - public ForwardProxy() { - } - - /** - * Get the convention property: The convention used to determine the url of the request made. - * - * @return the convention value. - */ - public ForwardProxyConvention convention() { - return this.convention; - } - - /** - * Set the convention property: The convention used to determine the url of the request made. - * - * @param convention the convention value to set. - * @return the ForwardProxy object itself. - */ - public ForwardProxy withConvention(ForwardProxyConvention convention) { - this.convention = convention; - return this; - } - - /** - * Get the customHostHeaderName property: The name of the header containing the host of the request. - * - * @return the customHostHeaderName value. - */ - public String customHostHeaderName() { - return this.customHostHeaderName; - } - - /** - * Set the customHostHeaderName property: The name of the header containing the host of the request. - * - * @param customHostHeaderName the customHostHeaderName value to set. - * @return the ForwardProxy object itself. - */ - public ForwardProxy withCustomHostHeaderName(String customHostHeaderName) { - this.customHostHeaderName = customHostHeaderName; - return this; - } - - /** - * Get the customProtoHeaderName property: The name of the header containing the scheme of the request. - * - * @return the customProtoHeaderName value. - */ - public String customProtoHeaderName() { - return this.customProtoHeaderName; - } - - /** - * Set the customProtoHeaderName property: The name of the header containing the scheme of the request. - * - * @param customProtoHeaderName the customProtoHeaderName value to set. - * @return the ForwardProxy object itself. - */ - public ForwardProxy withCustomProtoHeaderName(String customProtoHeaderName) { - this.customProtoHeaderName = customProtoHeaderName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("convention", this.convention == null ? null : this.convention.toString()); - jsonWriter.writeStringField("customHostHeaderName", this.customHostHeaderName); - jsonWriter.writeStringField("customProtoHeaderName", this.customProtoHeaderName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ForwardProxy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ForwardProxy if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ForwardProxy. - */ - public static ForwardProxy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ForwardProxy deserializedForwardProxy = new ForwardProxy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("convention".equals(fieldName)) { - deserializedForwardProxy.convention = ForwardProxyConvention.fromString(reader.getString()); - } else if ("customHostHeaderName".equals(fieldName)) { - deserializedForwardProxy.customHostHeaderName = reader.getString(); - } else if ("customProtoHeaderName".equals(fieldName)) { - deserializedForwardProxy.customProtoHeaderName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedForwardProxy; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxyConvention.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxyConvention.java deleted file mode 100644 index 09328d7ffc58..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxyConvention.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.models; - -/** - * The convention used to determine the url of the request made. - */ -public enum ForwardProxyConvention { - /** - * Enum value NoProxy. - */ - NO_PROXY("NoProxy"), - - /** - * Enum value Standard. - */ - STANDARD("Standard"), - - /** - * Enum value Custom. - */ - CUSTOM("Custom"); - - /** - * The actual serialized value for a ForwardProxyConvention instance. - */ - private final String value; - - ForwardProxyConvention(String value) { - this.value = value; - } - - /** - * Parses a serialized value to a ForwardProxyConvention instance. - * - * @param value the serialized value to parse. - * @return the parsed ForwardProxyConvention object, or null if unable to parse. - */ - public static ForwardProxyConvention fromString(String value) { - if (value == null) { - return null; - } - ForwardProxyConvention[] items = ForwardProxyConvention.values(); - for (ForwardProxyConvention item : items) { - if (item.toString().equalsIgnoreCase(value)) { - return item; - } - } - return null; - } - - /** - * {@inheritDoc} - */ - @Override - public String toString() { - return this.value; - } -} 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 deleted file mode 100644 index 3a5584b9d59a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/FunctionsExtensions.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.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 deleted file mode 100644 index 7b8bffb3e23d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GitHub.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the GitHub provider. - */ -@Fluent -public final class GitHub implements JsonSerializable { - /* - * false if the GitHub provider should not be enabled despite the set registration; otherwise, - * true. - */ - private Boolean enabled; - - /* - * The configuration settings of the app registration for the GitHub provider. - */ - private ClientRegistration registration; - - /* - * The configuration settings of the login flow. - */ - private LoginScopes login; - - /** - * Creates an instance of GitHub class. - */ - 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>. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * 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. - */ - public GitHub withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the registration property: The configuration settings of the app registration for the GitHub provider. - * - * @return the registration value. - */ - public ClientRegistration registration() { - return this.registration; - } - - /** - * Set the registration property: The configuration settings of the app registration for the GitHub provider. - * - * @param registration the registration value to set. - * @return the GitHub object itself. - */ - public GitHub withRegistration(ClientRegistration registration) { - this.registration = registration; - return this; - } - - /** - * Get the login property: The configuration settings of the login flow. - * - * @return the login value. - */ - public LoginScopes login() { - return this.login; - } - - /** - * Set the login property: The configuration settings of the login flow. - * - * @param login the login value to set. - * @return the GitHub object itself. - */ - public GitHub withLogin(LoginScopes login) { - this.login = login; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (registration() != null) { - registration().validate(); - } - if (login() != null) { - login().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeJsonField("registration", this.registration); - jsonWriter.writeJsonField("login", this.login); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GitHub from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GitHub if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the GitHub. - */ - public static GitHub fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - GitHub deserializedGitHub = new GitHub(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedGitHub.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("registration".equals(fieldName)) { - deserializedGitHub.registration = ClientRegistration.fromJson(reader); - } else if ("login".equals(fieldName)) { - deserializedGitHub.login = LoginScopes.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedGitHub; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GithubActionConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GithubActionConfiguration.java deleted file mode 100644 index dc17112b6d6d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GithubActionConfiguration.java +++ /dev/null @@ -1,387 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Configuration properties that define the mutable settings of a Container App SourceControl. - */ -@Fluent -public final class GithubActionConfiguration implements JsonSerializable { - /* - * Registry configurations. - */ - private RegistryInfo registryInfo; - - /* - * AzureCredentials configurations. - */ - private AzureCredentials azureCredentials; - - /* - * Context path - */ - private String contextPath; - - /* - * Dockerfile path - */ - private String dockerfilePath; - - /* - * One time Github PAT to configure github environment - */ - private String githubPersonalAccessToken; - - /* - * Image name - */ - private String image; - - /* - * Code or Image - */ - private String publishType; - - /* - * Operation system - */ - private String os; - - /* - * Runtime stack - */ - private String runtimeStack; - - /* - * Runtime version - */ - private String runtimeVersion; - - /* - * List of environment variables to be passed to the build. - */ - private List buildEnvironmentVariables; - - /** - * Creates an instance of GithubActionConfiguration class. - */ - public GithubActionConfiguration() { - } - - /** - * Get the registryInfo property: Registry configurations. - * - * @return the registryInfo value. - */ - public RegistryInfo registryInfo() { - return this.registryInfo; - } - - /** - * Set the registryInfo property: Registry configurations. - * - * @param registryInfo the registryInfo value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration withRegistryInfo(RegistryInfo registryInfo) { - this.registryInfo = registryInfo; - return this; - } - - /** - * Get the azureCredentials property: AzureCredentials configurations. - * - * @return the azureCredentials value. - */ - public AzureCredentials azureCredentials() { - return this.azureCredentials; - } - - /** - * Set the azureCredentials property: AzureCredentials configurations. - * - * @param azureCredentials the azureCredentials value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration withAzureCredentials(AzureCredentials azureCredentials) { - this.azureCredentials = azureCredentials; - return this; - } - - /** - * Get the contextPath property: Context path. - * - * @return the contextPath value. - */ - public String contextPath() { - return this.contextPath; - } - - /** - * Set the contextPath property: Context path. - * - * @param contextPath the contextPath value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration withContextPath(String contextPath) { - this.contextPath = contextPath; - return this; - } - - /** - * Get the dockerfilePath property: Dockerfile path. - * - * @return the dockerfilePath value. - */ - public String dockerfilePath() { - return this.dockerfilePath; - } - - /** - * Set the dockerfilePath property: Dockerfile path. - * - * @param dockerfilePath the dockerfilePath value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration withDockerfilePath(String dockerfilePath) { - this.dockerfilePath = dockerfilePath; - return this; - } - - /** - * Get the githubPersonalAccessToken property: One time Github PAT to configure github environment. - * - * @return the githubPersonalAccessToken value. - */ - public String githubPersonalAccessToken() { - return this.githubPersonalAccessToken; - } - - /** - * Set the githubPersonalAccessToken property: One time Github PAT to configure github environment. - * - * @param githubPersonalAccessToken the githubPersonalAccessToken value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration withGithubPersonalAccessToken(String githubPersonalAccessToken) { - this.githubPersonalAccessToken = githubPersonalAccessToken; - return this; - } - - /** - * Get the image property: Image name. - * - * @return the image value. - */ - public String image() { - return this.image; - } - - /** - * Set the image property: Image name. - * - * @param image the image value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration withImage(String image) { - this.image = image; - return this; - } - - /** - * Get the publishType property: Code or Image. - * - * @return the publishType value. - */ - public String publishType() { - return this.publishType; - } - - /** - * Set the publishType property: Code or Image. - * - * @param publishType the publishType value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration withPublishType(String publishType) { - this.publishType = publishType; - return this; - } - - /** - * Get the os property: Operation system. - * - * @return the os value. - */ - public String os() { - return this.os; - } - - /** - * Set the os property: Operation system. - * - * @param os the os value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration withOs(String os) { - this.os = os; - return this; - } - - /** - * Get the runtimeStack property: Runtime stack. - * - * @return the runtimeStack value. - */ - public String runtimeStack() { - return this.runtimeStack; - } - - /** - * Set the runtimeStack property: Runtime stack. - * - * @param runtimeStack the runtimeStack value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration withRuntimeStack(String runtimeStack) { - this.runtimeStack = runtimeStack; - return this; - } - - /** - * Get the runtimeVersion property: Runtime version. - * - * @return the runtimeVersion value. - */ - public String runtimeVersion() { - return this.runtimeVersion; - } - - /** - * Set the runtimeVersion property: Runtime version. - * - * @param runtimeVersion the runtimeVersion value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration withRuntimeVersion(String runtimeVersion) { - this.runtimeVersion = runtimeVersion; - return this; - } - - /** - * Get the buildEnvironmentVariables property: List of environment variables to be passed to the build. - * - * @return the buildEnvironmentVariables value. - */ - public List buildEnvironmentVariables() { - return this.buildEnvironmentVariables; - } - - /** - * Set the buildEnvironmentVariables property: List of environment variables to be passed to the build. - * - * @param buildEnvironmentVariables the buildEnvironmentVariables value to set. - * @return the GithubActionConfiguration object itself. - */ - public GithubActionConfiguration - withBuildEnvironmentVariables(List buildEnvironmentVariables) { - this.buildEnvironmentVariables = buildEnvironmentVariables; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (registryInfo() != null) { - registryInfo().validate(); - } - if (azureCredentials() != null) { - azureCredentials().validate(); - } - if (buildEnvironmentVariables() != null) { - buildEnvironmentVariables().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("registryInfo", this.registryInfo); - jsonWriter.writeJsonField("azureCredentials", this.azureCredentials); - jsonWriter.writeStringField("contextPath", this.contextPath); - jsonWriter.writeStringField("dockerfilePath", this.dockerfilePath); - jsonWriter.writeStringField("githubPersonalAccessToken", this.githubPersonalAccessToken); - jsonWriter.writeStringField("image", this.image); - jsonWriter.writeStringField("publishType", this.publishType); - jsonWriter.writeStringField("os", this.os); - jsonWriter.writeStringField("runtimeStack", this.runtimeStack); - jsonWriter.writeStringField("runtimeVersion", this.runtimeVersion); - jsonWriter.writeArrayField("buildEnvironmentVariables", this.buildEnvironmentVariables, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GithubActionConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GithubActionConfiguration if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the GithubActionConfiguration. - */ - public static GithubActionConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - GithubActionConfiguration deserializedGithubActionConfiguration = new GithubActionConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("registryInfo".equals(fieldName)) { - deserializedGithubActionConfiguration.registryInfo = RegistryInfo.fromJson(reader); - } else if ("azureCredentials".equals(fieldName)) { - deserializedGithubActionConfiguration.azureCredentials = AzureCredentials.fromJson(reader); - } else if ("contextPath".equals(fieldName)) { - deserializedGithubActionConfiguration.contextPath = reader.getString(); - } else if ("dockerfilePath".equals(fieldName)) { - deserializedGithubActionConfiguration.dockerfilePath = reader.getString(); - } else if ("githubPersonalAccessToken".equals(fieldName)) { - deserializedGithubActionConfiguration.githubPersonalAccessToken = reader.getString(); - } else if ("image".equals(fieldName)) { - deserializedGithubActionConfiguration.image = reader.getString(); - } else if ("publishType".equals(fieldName)) { - deserializedGithubActionConfiguration.publishType = reader.getString(); - } else if ("os".equals(fieldName)) { - deserializedGithubActionConfiguration.os = reader.getString(); - } else if ("runtimeStack".equals(fieldName)) { - deserializedGithubActionConfiguration.runtimeStack = reader.getString(); - } else if ("runtimeVersion".equals(fieldName)) { - deserializedGithubActionConfiguration.runtimeVersion = reader.getString(); - } else if ("buildEnvironmentVariables".equals(fieldName)) { - List buildEnvironmentVariables - = reader.readArray(reader1 -> EnvironmentVariable.fromJson(reader1)); - deserializedGithubActionConfiguration.buildEnvironmentVariables = buildEnvironmentVariables; - } else { - reader.skipChildren(); - } - } - - return deserializedGithubActionConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GlobalValidation.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GlobalValidation.java deleted file mode 100644 index 6038833d1ef3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GlobalValidation.java +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The configuration settings that determines the validation flow of users using ContainerApp Service - * Authentication/Authorization. - */ -@Fluent -public final class GlobalValidation implements JsonSerializable { - /* - * The action to take when an unauthenticated client attempts to access the app. - */ - private UnauthenticatedClientActionV2 unauthenticatedClientAction; - - /* - * The default authentication provider to use when multiple providers are configured. - * This setting is only needed if multiple providers are configured and the unauthenticated client - * action is set to "RedirectToLoginPage". - */ - private String redirectToProvider; - - /* - * The paths for which unauthenticated flow would not be redirected to the login page. - */ - private List excludedPaths; - - /** - * Creates an instance of GlobalValidation class. - */ - public GlobalValidation() { - } - - /** - * Get the unauthenticatedClientAction property: The action to take when an unauthenticated client attempts to - * access the app. - * - * @return the unauthenticatedClientAction value. - */ - public UnauthenticatedClientActionV2 unauthenticatedClientAction() { - return this.unauthenticatedClientAction; - } - - /** - * Set the unauthenticatedClientAction property: The action to take when an unauthenticated client attempts to - * access the app. - * - * @param unauthenticatedClientAction the unauthenticatedClientAction value to set. - * @return the GlobalValidation object itself. - */ - public GlobalValidation withUnauthenticatedClientAction(UnauthenticatedClientActionV2 unauthenticatedClientAction) { - this.unauthenticatedClientAction = unauthenticatedClientAction; - return this; - } - - /** - * Get the redirectToProvider property: The default authentication provider to use when multiple providers are - * configured. - * This setting is only needed if multiple providers are configured and the unauthenticated client - * action is set to "RedirectToLoginPage". - * - * @return the redirectToProvider value. - */ - public String redirectToProvider() { - return this.redirectToProvider; - } - - /** - * Set the redirectToProvider property: The default authentication provider to use when multiple providers are - * configured. - * This setting is only needed if multiple providers are configured and the unauthenticated client - * action is set to "RedirectToLoginPage". - * - * @param redirectToProvider the redirectToProvider value to set. - * @return the GlobalValidation object itself. - */ - public GlobalValidation withRedirectToProvider(String redirectToProvider) { - this.redirectToProvider = redirectToProvider; - return this; - } - - /** - * Get the excludedPaths property: The paths for which unauthenticated flow would not be redirected to the login - * page. - * - * @return the excludedPaths value. - */ - public List excludedPaths() { - return this.excludedPaths; - } - - /** - * Set the excludedPaths property: The paths for which unauthenticated flow would not be redirected to the login - * page. - * - * @param excludedPaths the excludedPaths value to set. - * @return the GlobalValidation object itself. - */ - public GlobalValidation withExcludedPaths(List excludedPaths) { - this.excludedPaths = excludedPaths; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("unauthenticatedClientAction", - this.unauthenticatedClientAction == null ? null : this.unauthenticatedClientAction.toString()); - jsonWriter.writeStringField("redirectToProvider", this.redirectToProvider); - jsonWriter.writeArrayField("excludedPaths", this.excludedPaths, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of GlobalValidation from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of GlobalValidation if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the GlobalValidation. - */ - public static GlobalValidation fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - GlobalValidation deserializedGlobalValidation = new GlobalValidation(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("unauthenticatedClientAction".equals(fieldName)) { - deserializedGlobalValidation.unauthenticatedClientAction - = UnauthenticatedClientActionV2.fromString(reader.getString()); - } else if ("redirectToProvider".equals(fieldName)) { - deserializedGlobalValidation.redirectToProvider = reader.getString(); - } else if ("excludedPaths".equals(fieldName)) { - List excludedPaths = reader.readArray(reader1 -> reader1.getString()); - deserializedGlobalValidation.excludedPaths = excludedPaths; - } else { - reader.skipChildren(); - } - } - - return deserializedGlobalValidation; - }); - } -} 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 deleted file mode 100644 index dd44d71ca9ea..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Google.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the Google provider. - */ -@Fluent -public final class Google implements JsonSerializable { - /* - * false if the Google provider should not be enabled despite the set registration; otherwise, - * true. - */ - private Boolean enabled; - - /* - * The configuration settings of the app registration for the Google provider. - */ - private ClientRegistration registration; - - /* - * The configuration settings of the login flow. - */ - private LoginScopes login; - - /* - * The configuration settings of the Azure Active Directory token validation flow. - */ - private AllowedAudiencesValidation validation; - - /** - * Creates an instance of Google class. - */ - 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>. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * 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. - */ - public Google withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the registration property: The configuration settings of the app registration for the Google provider. - * - * @return the registration value. - */ - public ClientRegistration registration() { - return this.registration; - } - - /** - * Set the registration property: The configuration settings of the app registration for the Google provider. - * - * @param registration the registration value to set. - * @return the Google object itself. - */ - public Google withRegistration(ClientRegistration registration) { - this.registration = registration; - return this; - } - - /** - * Get the login property: The configuration settings of the login flow. - * - * @return the login value. - */ - public LoginScopes login() { - return this.login; - } - - /** - * Set the login property: The configuration settings of the login flow. - * - * @param login the login value to set. - * @return the Google object itself. - */ - public Google withLogin(LoginScopes login) { - this.login = login; - return this; - } - - /** - * Get the validation property: The configuration settings of the Azure Active Directory token validation flow. - * - * @return the validation value. - */ - public AllowedAudiencesValidation validation() { - return this.validation; - } - - /** - * Set the validation property: The configuration settings of the Azure Active Directory token validation flow. - * - * @param validation the validation value to set. - * @return the Google object itself. - */ - public Google withValidation(AllowedAudiencesValidation validation) { - this.validation = validation; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (registration() != null) { - registration().validate(); - } - if (login() != null) { - login().validate(); - } - if (validation() != null) { - validation().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeJsonField("registration", this.registration); - jsonWriter.writeJsonField("login", this.login); - jsonWriter.writeJsonField("validation", this.validation); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Google from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Google if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Google. - */ - public static Google fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Google deserializedGoogle = new Google(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedGoogle.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("registration".equals(fieldName)) { - deserializedGoogle.registration = ClientRegistration.fromJson(reader); - } else if ("login".equals(fieldName)) { - deserializedGoogle.login = LoginScopes.fromJson(reader); - } else if ("validation".equals(fieldName)) { - deserializedGoogle.validation = AllowedAudiencesValidation.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedGoogle; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Header.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Header.java deleted file mode 100644 index daa4078204fd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Header.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Header of otlp configuration. - */ -@Fluent -public final class Header implements JsonSerializable
{ - /* - * The key of otlp configuration header - */ - private String key; - - /* - * The value of otlp configuration header - */ - private String value; - - /** - * Creates an instance of Header class. - */ - public Header() { - } - - /** - * Get the key property: The key of otlp configuration header. - * - * @return the key value. - */ - public String key() { - return this.key; - } - - /** - * Set the key property: The key of otlp configuration header. - * - * @param key the key value to set. - * @return the Header object itself. - */ - public Header withKey(String key) { - this.key = key; - return this; - } - - /** - * Get the value property: The value of otlp configuration header. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: The value of otlp configuration header. - * - * @param value the value value to set. - * @return the Header object itself. - */ - public Header withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("key", this.key); - jsonWriter.writeStringField("value", this.value); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Header from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Header if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Header. - */ - public static Header fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Header deserializedHeader = new Header(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("key".equals(fieldName)) { - deserializedHeader.key = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedHeader.value = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHeader; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HeaderMatch.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HeaderMatch.java deleted file mode 100644 index 91f50b3a4234..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HeaderMatch.java +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.HeaderMatchMatch; -import java.io.IOException; - -/** - * Conditions required to match a header. - */ -@Fluent -public final class HeaderMatch implements JsonSerializable { - /* - * Name of the header - */ - private String headerProperty; - - /* - * Type of match to perform - */ - private HeaderMatchMatch innerMatch; - - /** - * Creates an instance of HeaderMatch class. - */ - public HeaderMatch() { - } - - /** - * Get the headerProperty property: Name of the header. - * - * @return the headerProperty value. - */ - public String headerProperty() { - return this.headerProperty; - } - - /** - * Set the headerProperty property: Name of the header. - * - * @param headerProperty the headerProperty value to set. - * @return the HeaderMatch object itself. - */ - public HeaderMatch withHeaderProperty(String headerProperty) { - this.headerProperty = headerProperty; - return this; - } - - /** - * Get the innerMatch property: Type of match to perform. - * - * @return the innerMatch value. - */ - private HeaderMatchMatch innerMatch() { - return this.innerMatch; - } - - /** - * Get the exactMatch property: Exact value of the header. - * - * @return the exactMatch value. - */ - public String exactMatch() { - return this.innerMatch() == null ? null : this.innerMatch().exactMatch(); - } - - /** - * Set the exactMatch property: Exact value of the header. - * - * @param exactMatch the exactMatch value to set. - * @return the HeaderMatch object itself. - */ - public HeaderMatch withExactMatch(String exactMatch) { - if (this.innerMatch() == null) { - this.innerMatch = new HeaderMatchMatch(); - } - this.innerMatch().withExactMatch(exactMatch); - return this; - } - - /** - * Get the prefixMatch property: Prefix value of the header. - * - * @return the prefixMatch value. - */ - public String prefixMatch() { - return this.innerMatch() == null ? null : this.innerMatch().prefixMatch(); - } - - /** - * Set the prefixMatch property: Prefix value of the header. - * - * @param prefixMatch the prefixMatch value to set. - * @return the HeaderMatch object itself. - */ - public HeaderMatch withPrefixMatch(String prefixMatch) { - if (this.innerMatch() == null) { - this.innerMatch = new HeaderMatchMatch(); - } - this.innerMatch().withPrefixMatch(prefixMatch); - return this; - } - - /** - * Get the suffixMatch property: Suffix value of the header. - * - * @return the suffixMatch value. - */ - public String suffixMatch() { - return this.innerMatch() == null ? null : this.innerMatch().suffixMatch(); - } - - /** - * Set the suffixMatch property: Suffix value of the header. - * - * @param suffixMatch the suffixMatch value to set. - * @return the HeaderMatch object itself. - */ - public HeaderMatch withSuffixMatch(String suffixMatch) { - if (this.innerMatch() == null) { - this.innerMatch = new HeaderMatchMatch(); - } - this.innerMatch().withSuffixMatch(suffixMatch); - return this; - } - - /** - * Get the regexMatch property: Regex value of the header. - * - * @return the regexMatch value. - */ - public String regexMatch() { - return this.innerMatch() == null ? null : this.innerMatch().regexMatch(); - } - - /** - * Set the regexMatch property: Regex value of the header. - * - * @param regexMatch the regexMatch value to set. - * @return the HeaderMatch object itself. - */ - public HeaderMatch withRegexMatch(String regexMatch) { - if (this.innerMatch() == null) { - this.innerMatch = new HeaderMatchMatch(); - } - this.innerMatch().withRegexMatch(regexMatch); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerMatch() != null) { - innerMatch().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("header", this.headerProperty); - jsonWriter.writeJsonField("match", this.innerMatch); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HeaderMatch from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HeaderMatch if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the HeaderMatch. - */ - public static HeaderMatch fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HeaderMatch deserializedHeaderMatch = new HeaderMatch(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("header".equals(fieldName)) { - deserializedHeaderMatch.headerProperty = reader.getString(); - } else if ("match".equals(fieldName)) { - deserializedHeaderMatch.innerMatch = HeaderMatchMatch.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedHeaderMatch; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpConnectionPool.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpConnectionPool.java deleted file mode 100644 index 1bab688679cb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpConnectionPool.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Defines parameters for http connection pooling. - */ -@Fluent -public final class HttpConnectionPool implements JsonSerializable { - /* - * Maximum number of pending http1 requests allowed - */ - private Integer http1MaxPendingRequests; - - /* - * Maximum number of http2 requests allowed - */ - private Integer http2MaxRequests; - - /** - * Creates an instance of HttpConnectionPool class. - */ - public HttpConnectionPool() { - } - - /** - * Get the http1MaxPendingRequests property: Maximum number of pending http1 requests allowed. - * - * @return the http1MaxPendingRequests value. - */ - public Integer http1MaxPendingRequests() { - return this.http1MaxPendingRequests; - } - - /** - * Set the http1MaxPendingRequests property: Maximum number of pending http1 requests allowed. - * - * @param http1MaxPendingRequests the http1MaxPendingRequests value to set. - * @return the HttpConnectionPool object itself. - */ - public HttpConnectionPool withHttp1MaxPendingRequests(Integer http1MaxPendingRequests) { - this.http1MaxPendingRequests = http1MaxPendingRequests; - return this; - } - - /** - * Get the http2MaxRequests property: Maximum number of http2 requests allowed. - * - * @return the http2MaxRequests value. - */ - public Integer http2MaxRequests() { - return this.http2MaxRequests; - } - - /** - * Set the http2MaxRequests property: Maximum number of http2 requests allowed. - * - * @param http2MaxRequests the http2MaxRequests value to set. - * @return the HttpConnectionPool object itself. - */ - public HttpConnectionPool withHttp2MaxRequests(Integer http2MaxRequests) { - this.http2MaxRequests = http2MaxRequests; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("http1MaxPendingRequests", this.http1MaxPendingRequests); - jsonWriter.writeNumberField("http2MaxRequests", this.http2MaxRequests); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HttpConnectionPool from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HttpConnectionPool if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the HttpConnectionPool. - */ - public static HttpConnectionPool fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HttpConnectionPool deserializedHttpConnectionPool = new HttpConnectionPool(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("http1MaxPendingRequests".equals(fieldName)) { - deserializedHttpConnectionPool.http1MaxPendingRequests = reader.getNullable(JsonReader::getInt); - } else if ("http2MaxRequests".equals(fieldName)) { - deserializedHttpConnectionPool.http2MaxRequests = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedHttpConnectionPool; - }); - } -} 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 deleted file mode 100644 index 5579b4b5dfbb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpGet.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Model representing a http get request. - */ -@Fluent -public final class HttpGet implements JsonSerializable { - /* - * URL to make HTTP GET request against. - */ - private String url; - - /* - * Name of the file that the request should be saved to. - */ - private String fileName; - - /* - * List of headers to send with the request. - */ - private List headers; - - /** - * Creates an instance of HttpGet class. - */ - public HttpGet() { - } - - /** - * Get the url property: URL to make HTTP GET request against. - * - * @return the url value. - */ - public String url() { - return this.url; - } - - /** - * Set the url property: URL to make HTTP GET request against. - * - * @param url the url value to set. - * @return the HttpGet object itself. - */ - public HttpGet withUrl(String url) { - this.url = url; - return this; - } - - /** - * Get the fileName property: Name of the file that the request should be saved to. - * - * @return the fileName value. - */ - public String fileName() { - return this.fileName; - } - - /** - * Set the fileName property: Name of the file that the request should be saved to. - * - * @param fileName the fileName value to set. - * @return the HttpGet object itself. - */ - public HttpGet withFileName(String fileName) { - this.fileName = fileName; - return this; - } - - /** - * Get the headers property: List of headers to send with the request. - * - * @return the headers value. - */ - public List headers() { - return this.headers; - } - - /** - * Set the headers property: List of headers to send with the request. - * - * @param headers the headers value to set. - * @return the HttpGet object itself. - */ - public HttpGet withHeaders(List headers) { - this.headers = headers; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (url() == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Missing required property url in model HttpGet")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(HttpGet.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("url", this.url); - jsonWriter.writeStringField("fileName", this.fileName); - jsonWriter.writeArrayField("headers", this.headers, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HttpGet from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HttpGet if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the HttpGet. - */ - public static HttpGet fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HttpGet deserializedHttpGet = new HttpGet(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("url".equals(fieldName)) { - deserializedHttpGet.url = reader.getString(); - } else if ("fileName".equals(fieldName)) { - deserializedHttpGet.fileName = reader.getString(); - } else if ("headers".equals(fieldName)) { - List headers = reader.readArray(reader1 -> reader1.getString()); - deserializedHttpGet.headers = headers; - } else { - reader.skipChildren(); - } - } - - return deserializedHttpGet; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRetryPolicy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRetryPolicy.java deleted file mode 100644 index 2c4c1eee0e96..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRetryPolicy.java +++ /dev/null @@ -1,251 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.HttpRetryPolicyMatches; -import com.azure.resourcemanager.appcontainers.fluent.models.HttpRetryPolicyRetryBackOff; -import java.io.IOException; -import java.util.List; - -/** - * Policy that defines http request retry conditions. - */ -@Fluent -public final class HttpRetryPolicy implements JsonSerializable { - /* - * Maximum number of times a request will retry - */ - private Integer maxRetries; - - /* - * Settings for retry backoff characteristics - */ - private HttpRetryPolicyRetryBackOff innerRetryBackOff; - - /* - * Conditions that must be met for a request to be retried - */ - private HttpRetryPolicyMatches innerMatches; - - /** - * Creates an instance of HttpRetryPolicy class. - */ - public HttpRetryPolicy() { - } - - /** - * Get the maxRetries property: Maximum number of times a request will retry. - * - * @return the maxRetries value. - */ - public Integer maxRetries() { - return this.maxRetries; - } - - /** - * Set the maxRetries property: Maximum number of times a request will retry. - * - * @param maxRetries the maxRetries value to set. - * @return the HttpRetryPolicy object itself. - */ - public HttpRetryPolicy withMaxRetries(Integer maxRetries) { - this.maxRetries = maxRetries; - return this; - } - - /** - * Get the innerRetryBackOff property: Settings for retry backoff characteristics. - * - * @return the innerRetryBackOff value. - */ - private HttpRetryPolicyRetryBackOff innerRetryBackOff() { - return this.innerRetryBackOff; - } - - /** - * Get the innerMatches property: Conditions that must be met for a request to be retried. - * - * @return the innerMatches value. - */ - private HttpRetryPolicyMatches innerMatches() { - return this.innerMatches; - } - - /** - * Get the initialDelayInMilliseconds property: Initial delay, in milliseconds, before retrying a request. - * - * @return the initialDelayInMilliseconds value. - */ - public Long initialDelayInMilliseconds() { - return this.innerRetryBackOff() == null ? null : this.innerRetryBackOff().initialDelayInMilliseconds(); - } - - /** - * Set the initialDelayInMilliseconds property: Initial delay, in milliseconds, before retrying a request. - * - * @param initialDelayInMilliseconds the initialDelayInMilliseconds value to set. - * @return the HttpRetryPolicy object itself. - */ - public HttpRetryPolicy withInitialDelayInMilliseconds(Long initialDelayInMilliseconds) { - if (this.innerRetryBackOff() == null) { - this.innerRetryBackOff = new HttpRetryPolicyRetryBackOff(); - } - this.innerRetryBackOff().withInitialDelayInMilliseconds(initialDelayInMilliseconds); - return this; - } - - /** - * Get the maxIntervalInMilliseconds property: Maximum interval, in milliseconds, between retries. - * - * @return the maxIntervalInMilliseconds value. - */ - public Long maxIntervalInMilliseconds() { - return this.innerRetryBackOff() == null ? null : this.innerRetryBackOff().maxIntervalInMilliseconds(); - } - - /** - * Set the maxIntervalInMilliseconds property: Maximum interval, in milliseconds, between retries. - * - * @param maxIntervalInMilliseconds the maxIntervalInMilliseconds value to set. - * @return the HttpRetryPolicy object itself. - */ - public HttpRetryPolicy withMaxIntervalInMilliseconds(Long maxIntervalInMilliseconds) { - if (this.innerRetryBackOff() == null) { - this.innerRetryBackOff = new HttpRetryPolicyRetryBackOff(); - } - this.innerRetryBackOff().withMaxIntervalInMilliseconds(maxIntervalInMilliseconds); - return this; - } - - /** - * Get the headers property: Headers that must be present for a request to be retried. - * - * @return the headers value. - */ - public List headers() { - return this.innerMatches() == null ? null : this.innerMatches().headers(); - } - - /** - * Set the headers property: Headers that must be present for a request to be retried. - * - * @param headers the headers value to set. - * @return the HttpRetryPolicy object itself. - */ - public HttpRetryPolicy withHeaders(List headers) { - if (this.innerMatches() == null) { - this.innerMatches = new HttpRetryPolicyMatches(); - } - this.innerMatches().withHeaders(headers); - return this; - } - - /** - * Get the httpStatusCodes property: Additional http status codes that can trigger a retry. - * - * @return the httpStatusCodes value. - */ - public List httpStatusCodes() { - return this.innerMatches() == null ? null : this.innerMatches().httpStatusCodes(); - } - - /** - * Set the httpStatusCodes property: Additional http status codes that can trigger a retry. - * - * @param httpStatusCodes the httpStatusCodes value to set. - * @return the HttpRetryPolicy object itself. - */ - public HttpRetryPolicy withHttpStatusCodes(List httpStatusCodes) { - if (this.innerMatches() == null) { - this.innerMatches = new HttpRetryPolicyMatches(); - } - this.innerMatches().withHttpStatusCodes(httpStatusCodes); - return this; - } - - /** - * Get the errors property: Errors that can trigger a retry. - * - * @return the errors value. - */ - public List errors() { - return this.innerMatches() == null ? null : this.innerMatches().errors(); - } - - /** - * Set the errors property: Errors that can trigger a retry. - * - * @param errors the errors value to set. - * @return the HttpRetryPolicy object itself. - */ - public HttpRetryPolicy withErrors(List errors) { - if (this.innerMatches() == null) { - this.innerMatches = new HttpRetryPolicyMatches(); - } - this.innerMatches().withErrors(errors); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (innerRetryBackOff() != null) { - innerRetryBackOff().validate(); - } - if (innerMatches() != null) { - innerMatches().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("maxRetries", this.maxRetries); - jsonWriter.writeJsonField("retryBackOff", this.innerRetryBackOff); - jsonWriter.writeJsonField("matches", this.innerMatches); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HttpRetryPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HttpRetryPolicy if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the HttpRetryPolicy. - */ - public static HttpRetryPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HttpRetryPolicy deserializedHttpRetryPolicy = new HttpRetryPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maxRetries".equals(fieldName)) { - deserializedHttpRetryPolicy.maxRetries = reader.getNullable(JsonReader::getInt); - } else if ("retryBackOff".equals(fieldName)) { - deserializedHttpRetryPolicy.innerRetryBackOff = HttpRetryPolicyRetryBackOff.fromJson(reader); - } else if ("matches".equals(fieldName)) { - deserializedHttpRetryPolicy.innerMatches = HttpRetryPolicyMatches.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedHttpRetryPolicy; - }); - } -} 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 deleted file mode 100644 index 9624ae09d213..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Container App container Http scaling rule. - */ -@Fluent -public final class HttpScaleRule implements JsonSerializable { - /* - * Metadata properties to describe http scale rule. - */ - private Map metadata; - - /* - * Authentication secrets for the custom scale rule. - */ - 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. - */ - private String identity; - - /** - * Creates an instance of HttpScaleRule class. - */ - public HttpScaleRule() { - } - - /** - * Get the metadata property: Metadata properties to describe http scale rule. - * - * @return the metadata value. - */ - public Map metadata() { - return this.metadata; - } - - /** - * Set the metadata property: Metadata properties to describe http scale rule. - * - * @param metadata the metadata value to set. - * @return the HttpScaleRule object itself. - */ - public HttpScaleRule withMetadata(Map metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the auth property: Authentication secrets for the custom scale rule. - * - * @return the auth value. - */ - public List auth() { - return this.auth; - } - - /** - * Set the auth property: Authentication secrets for the custom scale rule. - * - * @param auth the auth value to set. - * @return the HttpScaleRule object itself. - */ - public HttpScaleRule withAuth(List auth) { - this.auth = 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. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (auth() != null) { - auth().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("auth", this.auth, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HttpScaleRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HttpScaleRule if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the HttpScaleRule. - */ - public static HttpScaleRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HttpScaleRule deserializedHttpScaleRule = new HttpScaleRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("metadata".equals(fieldName)) { - Map metadata = reader.readMap(reader1 -> reader1.getString()); - deserializedHttpScaleRule.metadata = metadata; - } else if ("auth".equals(fieldName)) { - List auth = reader.readArray(reader1 -> ScaleRuleAuth.fromJson(reader1)); - deserializedHttpScaleRule.auth = auth; - } else if ("identity".equals(fieldName)) { - deserializedHttpScaleRule.identity = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHttpScaleRule; - }); - } -} 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 deleted file mode 100644 index b886a17dfa2e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettings.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the HTTP requests for authentication and authorization requests made against - * ContainerApp Service Authentication/Authorization. - */ -@Fluent -public final class HttpSettings implements JsonSerializable { - /* - * false if the authentication/authorization responses not having the HTTPS scheme are permissible; - * otherwise, true. - */ - private Boolean requireHttps; - - /* - * The configuration settings of the paths HTTP requests. - */ - private HttpSettingsRoutes routes; - - /* - * The configuration settings of a forward proxy used to make the requests. - */ - private ForwardProxy forwardProxy; - - /** - * Creates an instance of HttpSettings class. - */ - public HttpSettings() { - } - - /** - * Get the requireHttps property: <code>false</code> if the authentication/authorization responses not - * having the HTTPS scheme are permissible; otherwise, <code>true</code>. - * - * @return the requireHttps value. - */ - public Boolean requireHttps() { - return this.requireHttps; - } - - /** - * Set the requireHttps property: <code>false</code> if the authentication/authorization responses not - * having the HTTPS scheme are permissible; otherwise, <code>true</code>. - * - * @param requireHttps the requireHttps value to set. - * @return the HttpSettings object itself. - */ - public HttpSettings withRequireHttps(Boolean requireHttps) { - this.requireHttps = requireHttps; - return this; - } - - /** - * Get the routes property: The configuration settings of the paths HTTP requests. - * - * @return the routes value. - */ - public HttpSettingsRoutes routes() { - return this.routes; - } - - /** - * Set the routes property: The configuration settings of the paths HTTP requests. - * - * @param routes the routes value to set. - * @return the HttpSettings object itself. - */ - public HttpSettings withRoutes(HttpSettingsRoutes routes) { - this.routes = routes; - return this; - } - - /** - * Get the forwardProxy property: The configuration settings of a forward proxy used to make the requests. - * - * @return the forwardProxy value. - */ - public ForwardProxy forwardProxy() { - return this.forwardProxy; - } - - /** - * Set the forwardProxy property: The configuration settings of a forward proxy used to make the requests. - * - * @param forwardProxy the forwardProxy value to set. - * @return the HttpSettings object itself. - */ - public HttpSettings withForwardProxy(ForwardProxy forwardProxy) { - this.forwardProxy = forwardProxy; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (routes() != null) { - routes().validate(); - } - if (forwardProxy() != null) { - forwardProxy().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("requireHttps", this.requireHttps); - jsonWriter.writeJsonField("routes", this.routes); - jsonWriter.writeJsonField("forwardProxy", this.forwardProxy); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HttpSettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HttpSettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the HttpSettings. - */ - public static HttpSettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HttpSettings deserializedHttpSettings = new HttpSettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("requireHttps".equals(fieldName)) { - deserializedHttpSettings.requireHttps = reader.getNullable(JsonReader::getBoolean); - } else if ("routes".equals(fieldName)) { - deserializedHttpSettings.routes = HttpSettingsRoutes.fromJson(reader); - } else if ("forwardProxy".equals(fieldName)) { - deserializedHttpSettings.forwardProxy = ForwardProxy.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedHttpSettings; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettingsRoutes.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettingsRoutes.java deleted file mode 100644 index f37d6f68d3e0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettingsRoutes.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the paths HTTP requests. - */ -@Fluent -public final class HttpSettingsRoutes implements JsonSerializable { - /* - * The prefix that should precede all the authentication/authorization paths. - */ - private String apiPrefix; - - /** - * Creates an instance of HttpSettingsRoutes class. - */ - public HttpSettingsRoutes() { - } - - /** - * Get the apiPrefix property: The prefix that should precede all the authentication/authorization paths. - * - * @return the apiPrefix value. - */ - public String apiPrefix() { - return this.apiPrefix; - } - - /** - * Set the apiPrefix property: The prefix that should precede all the authentication/authorization paths. - * - * @param apiPrefix the apiPrefix value to set. - * @return the HttpSettingsRoutes object itself. - */ - public HttpSettingsRoutes withApiPrefix(String apiPrefix) { - this.apiPrefix = apiPrefix; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("apiPrefix", this.apiPrefix); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of HttpSettingsRoutes from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of HttpSettingsRoutes if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the HttpSettingsRoutes. - */ - public static HttpSettingsRoutes fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - HttpSettingsRoutes deserializedHttpSettingsRoutes = new HttpSettingsRoutes(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("apiPrefix".equals(fieldName)) { - deserializedHttpSettingsRoutes.apiPrefix = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedHttpSettingsRoutes; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentityProviders.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentityProviders.java deleted file mode 100644 index ae59391c0d2d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentityProviders.java +++ /dev/null @@ -1,328 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * The configuration settings of each of the identity providers used to configure ContainerApp Service - * Authentication/Authorization. - */ -@Fluent -public final class IdentityProviders implements JsonSerializable { - /* - * The configuration settings of the Azure Active directory provider. - */ - private AzureActiveDirectory azureActiveDirectory; - - /* - * The configuration settings of the Facebook provider. - */ - private Facebook facebook; - - /* - * The configuration settings of the GitHub provider. - */ - private GitHub gitHub; - - /* - * The configuration settings of the Google provider. - */ - private Google google; - - /* - * The configuration settings of the Twitter provider. - */ - private Twitter twitter; - - /* - * The configuration settings of the Apple provider. - */ - private Apple apple; - - /* - * The configuration settings of the Azure Static Web Apps provider. - */ - private AzureStaticWebApps azureStaticWebApps; - - /* - * The map of the name of the alias of each custom Open ID Connect provider to the - * configuration settings of the custom Open ID Connect provider. - */ - private Map customOpenIdConnectProviders; - - /** - * Creates an instance of IdentityProviders class. - */ - public IdentityProviders() { - } - - /** - * Get the azureActiveDirectory property: The configuration settings of the Azure Active directory provider. - * - * @return the azureActiveDirectory value. - */ - public AzureActiveDirectory azureActiveDirectory() { - return this.azureActiveDirectory; - } - - /** - * Set the azureActiveDirectory property: The configuration settings of the Azure Active directory provider. - * - * @param azureActiveDirectory the azureActiveDirectory value to set. - * @return the IdentityProviders object itself. - */ - public IdentityProviders withAzureActiveDirectory(AzureActiveDirectory azureActiveDirectory) { - this.azureActiveDirectory = azureActiveDirectory; - return this; - } - - /** - * Get the facebook property: The configuration settings of the Facebook provider. - * - * @return the facebook value. - */ - public Facebook facebook() { - return this.facebook; - } - - /** - * Set the facebook property: The configuration settings of the Facebook provider. - * - * @param facebook the facebook value to set. - * @return the IdentityProviders object itself. - */ - public IdentityProviders withFacebook(Facebook facebook) { - this.facebook = facebook; - return this; - } - - /** - * Get the gitHub property: The configuration settings of the GitHub provider. - * - * @return the gitHub value. - */ - public GitHub gitHub() { - return this.gitHub; - } - - /** - * Set the gitHub property: The configuration settings of the GitHub provider. - * - * @param gitHub the gitHub value to set. - * @return the IdentityProviders object itself. - */ - public IdentityProviders withGitHub(GitHub gitHub) { - this.gitHub = gitHub; - return this; - } - - /** - * Get the google property: The configuration settings of the Google provider. - * - * @return the google value. - */ - public Google google() { - return this.google; - } - - /** - * Set the google property: The configuration settings of the Google provider. - * - * @param google the google value to set. - * @return the IdentityProviders object itself. - */ - public IdentityProviders withGoogle(Google google) { - this.google = google; - return this; - } - - /** - * Get the twitter property: The configuration settings of the Twitter provider. - * - * @return the twitter value. - */ - public Twitter twitter() { - return this.twitter; - } - - /** - * Set the twitter property: The configuration settings of the Twitter provider. - * - * @param twitter the twitter value to set. - * @return the IdentityProviders object itself. - */ - public IdentityProviders withTwitter(Twitter twitter) { - this.twitter = twitter; - return this; - } - - /** - * Get the apple property: The configuration settings of the Apple provider. - * - * @return the apple value. - */ - public Apple apple() { - return this.apple; - } - - /** - * Set the apple property: The configuration settings of the Apple provider. - * - * @param apple the apple value to set. - * @return the IdentityProviders object itself. - */ - public IdentityProviders withApple(Apple apple) { - this.apple = apple; - return this; - } - - /** - * Get the azureStaticWebApps property: The configuration settings of the Azure Static Web Apps provider. - * - * @return the azureStaticWebApps value. - */ - public AzureStaticWebApps azureStaticWebApps() { - return this.azureStaticWebApps; - } - - /** - * Set the azureStaticWebApps property: The configuration settings of the Azure Static Web Apps provider. - * - * @param azureStaticWebApps the azureStaticWebApps value to set. - * @return the IdentityProviders object itself. - */ - public IdentityProviders withAzureStaticWebApps(AzureStaticWebApps azureStaticWebApps) { - this.azureStaticWebApps = azureStaticWebApps; - return this; - } - - /** - * Get the customOpenIdConnectProviders property: The map of the name of the alias of each custom Open ID Connect - * provider to the - * configuration settings of the custom Open ID Connect provider. - * - * @return the customOpenIdConnectProviders value. - */ - public Map customOpenIdConnectProviders() { - return this.customOpenIdConnectProviders; - } - - /** - * Set the customOpenIdConnectProviders property: The map of the name of the alias of each custom Open ID Connect - * provider to the - * configuration settings of the custom Open ID Connect provider. - * - * @param customOpenIdConnectProviders the customOpenIdConnectProviders value to set. - * @return the IdentityProviders object itself. - */ - public IdentityProviders - withCustomOpenIdConnectProviders(Map customOpenIdConnectProviders) { - this.customOpenIdConnectProviders = customOpenIdConnectProviders; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (azureActiveDirectory() != null) { - azureActiveDirectory().validate(); - } - if (facebook() != null) { - facebook().validate(); - } - if (gitHub() != null) { - gitHub().validate(); - } - if (google() != null) { - google().validate(); - } - if (twitter() != null) { - twitter().validate(); - } - if (apple() != null) { - apple().validate(); - } - if (azureStaticWebApps() != null) { - azureStaticWebApps().validate(); - } - if (customOpenIdConnectProviders() != null) { - customOpenIdConnectProviders().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("azureActiveDirectory", this.azureActiveDirectory); - jsonWriter.writeJsonField("facebook", this.facebook); - jsonWriter.writeJsonField("gitHub", this.gitHub); - jsonWriter.writeJsonField("google", this.google); - jsonWriter.writeJsonField("twitter", this.twitter); - jsonWriter.writeJsonField("apple", this.apple); - jsonWriter.writeJsonField("azureStaticWebApps", this.azureStaticWebApps); - jsonWriter.writeMapField("customOpenIdConnectProviders", this.customOpenIdConnectProviders, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IdentityProviders from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IdentityProviders if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the IdentityProviders. - */ - public static IdentityProviders fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IdentityProviders deserializedIdentityProviders = new IdentityProviders(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("azureActiveDirectory".equals(fieldName)) { - deserializedIdentityProviders.azureActiveDirectory = AzureActiveDirectory.fromJson(reader); - } else if ("facebook".equals(fieldName)) { - deserializedIdentityProviders.facebook = Facebook.fromJson(reader); - } else if ("gitHub".equals(fieldName)) { - deserializedIdentityProviders.gitHub = GitHub.fromJson(reader); - } else if ("google".equals(fieldName)) { - deserializedIdentityProviders.google = Google.fromJson(reader); - } else if ("twitter".equals(fieldName)) { - deserializedIdentityProviders.twitter = Twitter.fromJson(reader); - } else if ("apple".equals(fieldName)) { - deserializedIdentityProviders.apple = Apple.fromJson(reader); - } else if ("azureStaticWebApps".equals(fieldName)) { - deserializedIdentityProviders.azureStaticWebApps = AzureStaticWebApps.fromJson(reader); - } else if ("customOpenIdConnectProviders".equals(fieldName)) { - Map customOpenIdConnectProviders - = reader.readMap(reader1 -> CustomOpenIdConnectProvider.fromJson(reader1)); - deserializedIdentityProviders.customOpenIdConnectProviders = customOpenIdConnectProviders; - } else { - reader.skipChildren(); - } - } - - return deserializedIdentityProviders; - }); - } -} 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 deleted file mode 100644 index 700777e85038..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentitySettings.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Optional settings for a Managed Identity that is assigned to the Container App. - */ -@Fluent -public final class IdentitySettings implements JsonSerializable { - /* - * The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for - * system-assigned identity. - */ - private String identity; - - /* - * Use to select the lifecycle stages of a Container App during which the Managed Identity should be available. - */ - 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); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("identity", this.identity); - jsonWriter.writeStringField("lifecycle", this.lifecycle == null ? null : this.lifecycle.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IdentitySettings from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IdentitySettings if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the IdentitySettings. - */ - public static IdentitySettings fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IdentitySettings deserializedIdentitySettings = new IdentitySettings(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("identity".equals(fieldName)) { - deserializedIdentitySettings.identity = reader.getString(); - } else if ("lifecycle".equals(fieldName)) { - deserializedIdentitySettings.lifecycle = IdentitySettingsLifeCycle.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedIdentitySettings; - }); - } -} 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 deleted file mode 100644 index 3df9c4c12245..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentitySettingsLifeCycle.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.models; - -import com.azure.core.util.ExpandableStringEnum; -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. - */ - 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 deleted file mode 100644 index 968fafc226f6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ImageType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -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. - */ - 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 deleted file mode 100644 index bcfe8ad33e0c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java +++ /dev/null @@ -1,485 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Container App Ingress configuration. - */ -@Fluent -public final class Ingress implements JsonSerializable { - /* - * Hostname. - */ - private String fqdn; - - /* - * Bool indicating if app exposes an external http endpoint - */ - private Boolean external; - - /* - * Target Port in containers for traffic from ingress - */ - private Integer targetPort; - - /* - * Exposed Port in containers for TCP traffic from ingress - */ - private Integer exposedPort; - - /* - * Ingress transport protocol - */ - private IngressTransportMethod transport; - - /* - * Traffic weights for app's revisions - */ - private List traffic; - - /* - * custom domain bindings for Container Apps' hostnames. - */ - private List customDomains; - - /* - * Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected - * to HTTPS connections - */ - private Boolean allowInsecure; - - /* - * Rules to restrict incoming IP address. - */ - private List ipSecurityRestrictions; - - /* - * Sticky Sessions for Single Revision Mode - */ - 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. - */ - private IngressClientCertificateMode clientCertificateMode; - - /* - * CORS policy for container app - */ - private CorsPolicy corsPolicy; - - /* - * Settings to expose additional ports on container app - */ - private List additionalPortMappings; - - /* - * Whether an http app listens on http or https - */ - private IngressTargetPortHttpScheme targetPortHttpScheme; - - /** - * Creates an instance of Ingress class. - */ - public Ingress() { - } - - /** - * Get the fqdn property: Hostname. - * - * @return the fqdn value. - */ - public String fqdn() { - return this.fqdn; - } - - /** - * Get the external property: Bool indicating if app exposes an external http endpoint. - * - * @return the external value. - */ - public Boolean external() { - return this.external; - } - - /** - * Set the external property: Bool indicating if app exposes an external http endpoint. - * - * @param external the external value to set. - * @return the Ingress object itself. - */ - public Ingress withExternal(Boolean external) { - this.external = external; - return this; - } - - /** - * 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 Ingress object itself. - */ - public Ingress withTargetPort(Integer targetPort) { - this.targetPort = targetPort; - return this; - } - - /** - * Get the exposedPort property: Exposed Port in containers for TCP traffic from ingress. - * - * @return the exposedPort value. - */ - public Integer exposedPort() { - return this.exposedPort; - } - - /** - * Set the exposedPort property: Exposed Port in containers for TCP traffic from ingress. - * - * @param exposedPort the exposedPort value to set. - * @return the Ingress object itself. - */ - public Ingress withExposedPort(Integer exposedPort) { - this.exposedPort = exposedPort; - return this; - } - - /** - * Get the transport property: Ingress transport protocol. - * - * @return the transport value. - */ - public IngressTransportMethod transport() { - return this.transport; - } - - /** - * Set the transport property: Ingress transport protocol. - * - * @param transport the transport value to set. - * @return the Ingress object itself. - */ - public Ingress withTransport(IngressTransportMethod transport) { - this.transport = transport; - return this; - } - - /** - * Get the traffic property: Traffic weights for app's revisions. - * - * @return the traffic value. - */ - public List traffic() { - return this.traffic; - } - - /** - * Set the traffic property: Traffic weights for app's revisions. - * - * @param traffic the traffic value to set. - * @return the Ingress object itself. - */ - public Ingress withTraffic(List traffic) { - this.traffic = traffic; - return this; - } - - /** - * Get the customDomains property: custom domain bindings for Container Apps' hostnames. - * - * @return the customDomains value. - */ - public List customDomains() { - return this.customDomains; - } - - /** - * Set the customDomains property: custom domain bindings for Container Apps' hostnames. - * - * @param customDomains the customDomains value to set. - * @return the Ingress object itself. - */ - public Ingress withCustomDomains(List customDomains) { - this.customDomains = customDomains; - return this; - } - - /** - * Get the allowInsecure property: Bool indicating if HTTP connections to is allowed. If set to false HTTP - * connections are automatically redirected to HTTPS connections. - * - * @return the allowInsecure value. - */ - public Boolean allowInsecure() { - return this.allowInsecure; - } - - /** - * Set the allowInsecure property: Bool indicating if HTTP connections to is allowed. If set to false HTTP - * connections are automatically redirected to HTTPS connections. - * - * @param allowInsecure the allowInsecure value to set. - * @return the Ingress object itself. - */ - public Ingress withAllowInsecure(Boolean allowInsecure) { - this.allowInsecure = allowInsecure; - return this; - } - - /** - * Get the ipSecurityRestrictions property: Rules to restrict incoming IP address. - * - * @return the ipSecurityRestrictions value. - */ - public List ipSecurityRestrictions() { - return this.ipSecurityRestrictions; - } - - /** - * Set the ipSecurityRestrictions property: Rules to restrict incoming IP address. - * - * @param ipSecurityRestrictions the ipSecurityRestrictions value to set. - * @return the Ingress object itself. - */ - public Ingress withIpSecurityRestrictions(List ipSecurityRestrictions) { - this.ipSecurityRestrictions = ipSecurityRestrictions; - return this; - } - - /** - * Get the stickySessions property: Sticky Sessions for Single Revision Mode. - * - * @return the stickySessions value. - */ - public IngressStickySessions stickySessions() { - return this.stickySessions; - } - - /** - * Set the stickySessions property: Sticky Sessions for Single Revision Mode. - * - * @param stickySessions the stickySessions value to set. - * @return the Ingress object itself. - */ - public Ingress withStickySessions(IngressStickySessions stickySessions) { - this.stickySessions = stickySessions; - return this; - } - - /** - * Get the clientCertificateMode property: 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. - * - * @return the clientCertificateMode value. - */ - public IngressClientCertificateMode clientCertificateMode() { - return this.clientCertificateMode; - } - - /** - * Set the clientCertificateMode property: 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. - * - * @param clientCertificateMode the clientCertificateMode value to set. - * @return the Ingress object itself. - */ - public Ingress withClientCertificateMode(IngressClientCertificateMode clientCertificateMode) { - this.clientCertificateMode = clientCertificateMode; - return this; - } - - /** - * Get the corsPolicy property: CORS policy for container app. - * - * @return the corsPolicy value. - */ - public CorsPolicy corsPolicy() { - return this.corsPolicy; - } - - /** - * Set the corsPolicy property: CORS policy for container app. - * - * @param corsPolicy the corsPolicy value to set. - * @return the Ingress object itself. - */ - public Ingress withCorsPolicy(CorsPolicy corsPolicy) { - this.corsPolicy = corsPolicy; - return this; - } - - /** - * Get the additionalPortMappings property: Settings to expose additional ports on container app. - * - * @return the additionalPortMappings value. - */ - public List additionalPortMappings() { - return this.additionalPortMappings; - } - - /** - * Set the additionalPortMappings property: Settings to expose additional ports on container app. - * - * @param additionalPortMappings the additionalPortMappings value to set. - * @return the Ingress object itself. - */ - public Ingress withAdditionalPortMappings(List additionalPortMappings) { - this.additionalPortMappings = additionalPortMappings; - return this; - } - - /** - * Get the targetPortHttpScheme property: Whether an http app listens on http or https. - * - * @return the targetPortHttpScheme value. - */ - public IngressTargetPortHttpScheme targetPortHttpScheme() { - return this.targetPortHttpScheme; - } - - /** - * Set the targetPortHttpScheme property: Whether an http app listens on http or https. - * - * @param targetPortHttpScheme the targetPortHttpScheme value to set. - * @return the Ingress object itself. - */ - public Ingress withTargetPortHttpScheme(IngressTargetPortHttpScheme targetPortHttpScheme) { - this.targetPortHttpScheme = targetPortHttpScheme; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (traffic() != null) { - traffic().forEach(e -> e.validate()); - } - if (customDomains() != null) { - customDomains().forEach(e -> e.validate()); - } - if (ipSecurityRestrictions() != null) { - ipSecurityRestrictions().forEach(e -> e.validate()); - } - if (stickySessions() != null) { - stickySessions().validate(); - } - if (corsPolicy() != null) { - corsPolicy().validate(); - } - if (additionalPortMappings() != null) { - additionalPortMappings().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("external", this.external); - jsonWriter.writeNumberField("targetPort", this.targetPort); - jsonWriter.writeNumberField("exposedPort", this.exposedPort); - jsonWriter.writeStringField("transport", this.transport == null ? null : this.transport.toString()); - jsonWriter.writeArrayField("traffic", this.traffic, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("customDomains", this.customDomains, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeBooleanField("allowInsecure", this.allowInsecure); - jsonWriter.writeArrayField("ipSecurityRestrictions", this.ipSecurityRestrictions, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("stickySessions", this.stickySessions); - jsonWriter.writeStringField("clientCertificateMode", - this.clientCertificateMode == null ? null : this.clientCertificateMode.toString()); - jsonWriter.writeJsonField("corsPolicy", this.corsPolicy); - jsonWriter.writeArrayField("additionalPortMappings", this.additionalPortMappings, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("targetPortHttpScheme", - this.targetPortHttpScheme == null ? null : this.targetPortHttpScheme.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Ingress from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Ingress if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Ingress. - */ - public static Ingress fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Ingress deserializedIngress = new Ingress(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fqdn".equals(fieldName)) { - deserializedIngress.fqdn = reader.getString(); - } else if ("external".equals(fieldName)) { - deserializedIngress.external = reader.getNullable(JsonReader::getBoolean); - } else if ("targetPort".equals(fieldName)) { - deserializedIngress.targetPort = reader.getNullable(JsonReader::getInt); - } else if ("exposedPort".equals(fieldName)) { - deserializedIngress.exposedPort = reader.getNullable(JsonReader::getInt); - } else if ("transport".equals(fieldName)) { - deserializedIngress.transport = IngressTransportMethod.fromString(reader.getString()); - } else if ("traffic".equals(fieldName)) { - List traffic = reader.readArray(reader1 -> TrafficWeight.fromJson(reader1)); - deserializedIngress.traffic = traffic; - } else if ("customDomains".equals(fieldName)) { - List customDomains = reader.readArray(reader1 -> CustomDomain.fromJson(reader1)); - deserializedIngress.customDomains = customDomains; - } else if ("allowInsecure".equals(fieldName)) { - deserializedIngress.allowInsecure = reader.getNullable(JsonReader::getBoolean); - } else if ("ipSecurityRestrictions".equals(fieldName)) { - List ipSecurityRestrictions - = reader.readArray(reader1 -> IpSecurityRestrictionRule.fromJson(reader1)); - deserializedIngress.ipSecurityRestrictions = ipSecurityRestrictions; - } else if ("stickySessions".equals(fieldName)) { - deserializedIngress.stickySessions = IngressStickySessions.fromJson(reader); - } else if ("clientCertificateMode".equals(fieldName)) { - deserializedIngress.clientCertificateMode - = IngressClientCertificateMode.fromString(reader.getString()); - } else if ("corsPolicy".equals(fieldName)) { - deserializedIngress.corsPolicy = CorsPolicy.fromJson(reader); - } else if ("additionalPortMappings".equals(fieldName)) { - List additionalPortMappings - = reader.readArray(reader1 -> IngressPortMapping.fromJson(reader1)); - deserializedIngress.additionalPortMappings = additionalPortMappings; - } else if ("targetPortHttpScheme".equals(fieldName)) { - deserializedIngress.targetPortHttpScheme - = IngressTargetPortHttpScheme.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedIngress; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressClientCertificateMode.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressClientCertificateMode.java deleted file mode 100644 index f5608a399d61..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressClientCertificateMode.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * 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. - */ -public final class IngressClientCertificateMode extends ExpandableStringEnum { - /** - * Static value ignore for IngressClientCertificateMode. - */ - public static final IngressClientCertificateMode IGNORE = fromString("ignore"); - - /** - * Static value accept for IngressClientCertificateMode. - */ - public static final IngressClientCertificateMode ACCEPT = fromString("accept"); - - /** - * Static value require for IngressClientCertificateMode. - */ - public static final IngressClientCertificateMode REQUIRE = fromString("require"); - - /** - * Creates a new instance of IngressClientCertificateMode value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IngressClientCertificateMode() { - } - - /** - * Creates or finds a IngressClientCertificateMode from its string representation. - * - * @param name a name to look for. - * @return the corresponding IngressClientCertificateMode. - */ - public static IngressClientCertificateMode fromString(String name) { - return fromString(name, IngressClientCertificateMode.class); - } - - /** - * Gets known IngressClientCertificateMode values. - * - * @return known IngressClientCertificateMode values. - */ - public static Collection values() { - return values(IngressClientCertificateMode.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressPortMapping.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressPortMapping.java deleted file mode 100644 index a63a4cc5c689..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressPortMapping.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Port mappings of container app ingress. - */ -@Fluent -public final class IngressPortMapping implements JsonSerializable { - /* - * Specifies whether the app port is accessible outside of the environment - */ - private boolean external; - - /* - * Specifies the port user's container listens on - */ - private int targetPort; - - /* - * Specifies the exposed port for the target port. If not specified, it defaults to target port - */ - private Integer exposedPort; - - /** - * Creates an instance of IngressPortMapping class. - */ - public IngressPortMapping() { - } - - /** - * Get the external property: Specifies whether the app port is accessible outside of the environment. - * - * @return the external value. - */ - public boolean external() { - return this.external; - } - - /** - * Set the external property: Specifies whether the app port is accessible outside of the environment. - * - * @param external the external value to set. - * @return the IngressPortMapping object itself. - */ - public IngressPortMapping withExternal(boolean external) { - this.external = external; - return this; - } - - /** - * Get the targetPort property: Specifies the port user's container listens on. - * - * @return the targetPort value. - */ - public int targetPort() { - return this.targetPort; - } - - /** - * Set the targetPort property: Specifies the port user's container listens on. - * - * @param targetPort the targetPort value to set. - * @return the IngressPortMapping object itself. - */ - public IngressPortMapping withTargetPort(int targetPort) { - this.targetPort = targetPort; - return this; - } - - /** - * Get the exposedPort property: Specifies the exposed port for the target port. If not specified, it defaults to - * target port. - * - * @return the exposedPort value. - */ - public Integer exposedPort() { - return this.exposedPort; - } - - /** - * Set the exposedPort property: Specifies the exposed port for the target port. If not specified, it defaults to - * target port. - * - * @param exposedPort the exposedPort value to set. - * @return the IngressPortMapping object itself. - */ - public IngressPortMapping withExposedPort(Integer exposedPort) { - this.exposedPort = exposedPort; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("external", this.external); - jsonWriter.writeIntField("targetPort", this.targetPort); - jsonWriter.writeNumberField("exposedPort", this.exposedPort); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IngressPortMapping from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IngressPortMapping if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the IngressPortMapping. - */ - public static IngressPortMapping fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IngressPortMapping deserializedIngressPortMapping = new IngressPortMapping(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("external".equals(fieldName)) { - deserializedIngressPortMapping.external = reader.getBoolean(); - } else if ("targetPort".equals(fieldName)) { - deserializedIngressPortMapping.targetPort = reader.getInt(); - } else if ("exposedPort".equals(fieldName)) { - deserializedIngressPortMapping.exposedPort = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedIngressPortMapping; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressStickySessions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressStickySessions.java deleted file mode 100644 index 7db79d0ba2d7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressStickySessions.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Sticky Sessions for Single Revision Mode. - */ -@Fluent -public final class IngressStickySessions implements JsonSerializable { - /* - * Sticky Session Affinity - */ - private Affinity affinity; - - /** - * Creates an instance of IngressStickySessions class. - */ - public IngressStickySessions() { - } - - /** - * Get the affinity property: Sticky Session Affinity. - * - * @return the affinity value. - */ - public Affinity affinity() { - return this.affinity; - } - - /** - * Set the affinity property: Sticky Session Affinity. - * - * @param affinity the affinity value to set. - * @return the IngressStickySessions object itself. - */ - public IngressStickySessions withAffinity(Affinity affinity) { - this.affinity = affinity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("affinity", this.affinity == null ? null : this.affinity.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IngressStickySessions from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IngressStickySessions if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the IngressStickySessions. - */ - public static IngressStickySessions fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IngressStickySessions deserializedIngressStickySessions = new IngressStickySessions(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("affinity".equals(fieldName)) { - deserializedIngressStickySessions.affinity = Affinity.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedIngressStickySessions; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTargetPortHttpScheme.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTargetPortHttpScheme.java deleted file mode 100644 index 2a165d3bcd0b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTargetPortHttpScheme.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Whether an http app listens on http or https. - */ -public final class IngressTargetPortHttpScheme extends ExpandableStringEnum { - /** - * Static value http for IngressTargetPortHttpScheme. - */ - public static final IngressTargetPortHttpScheme HTTP = fromString("http"); - - /** - * Static value https for IngressTargetPortHttpScheme. - */ - public static final IngressTargetPortHttpScheme HTTPS = fromString("https"); - - /** - * Creates a new instance of IngressTargetPortHttpScheme value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IngressTargetPortHttpScheme() { - } - - /** - * Creates or finds a IngressTargetPortHttpScheme from its string representation. - * - * @param name a name to look for. - * @return the corresponding IngressTargetPortHttpScheme. - */ - public static IngressTargetPortHttpScheme fromString(String name) { - return fromString(name, IngressTargetPortHttpScheme.class); - } - - /** - * Gets known IngressTargetPortHttpScheme values. - * - * @return known IngressTargetPortHttpScheme values. - */ - public static Collection values() { - return values(IngressTargetPortHttpScheme.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTransportMethod.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTransportMethod.java deleted file mode 100644 index b8c6fd366086..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTransportMethod.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Ingress transport protocol. - */ -public final class IngressTransportMethod extends ExpandableStringEnum { - /** - * Static value auto for IngressTransportMethod. - */ - public static final IngressTransportMethod AUTO = fromString("auto"); - - /** - * Static value http for IngressTransportMethod. - */ - public static final IngressTransportMethod HTTP = fromString("http"); - - /** - * Static value http2 for IngressTransportMethod. - */ - public static final IngressTransportMethod HTTP2 = fromString("http2"); - - /** - * Static value tcp for IngressTransportMethod. - */ - public static final IngressTransportMethod TCP = fromString("tcp"); - - /** - * Creates a new instance of IngressTransportMethod value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public IngressTransportMethod() { - } - - /** - * Creates or finds a IngressTransportMethod from its string representation. - * - * @param name a name to look for. - * @return the corresponding IngressTransportMethod. - */ - public static IngressTransportMethod fromString(String name) { - return fromString(name, IngressTransportMethod.class); - } - - /** - * Gets known IngressTransportMethod values. - * - * @return known IngressTransportMethod values. - */ - public static Collection values() { - return values(IngressTransportMethod.class); - } -} 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 deleted file mode 100644 index 83304b0ad6a8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Container App init container definition. - */ -@Fluent -public final class InitContainer extends BaseContainer { - /** - * Creates an instance of InitContainer class. - */ - public InitContainer() { - } - - /** - * {@inheritDoc} - */ - @Override - public InitContainer withImage(String image) { - super.withImage(image); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public InitContainer withImageType(ImageType imageType) { - super.withImageType(imageType); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public InitContainer withName(String name) { - super.withName(name); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public InitContainer withCommand(List command) { - super.withCommand(command); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public InitContainer withArgs(List args) { - super.withArgs(args); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public InitContainer withEnv(List env) { - super.withEnv(env); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public InitContainer withResources(ContainerResources resources) { - super.withResources(resources); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public InitContainer withVolumeMounts(List volumeMounts) { - super.withVolumeMounts(volumeMounts); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (env() != null) { - env().forEach(e -> e.validate()); - } - if (resources() != null) { - resources().validate(); - } - if (volumeMounts() != null) { - volumeMounts().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("image", image()); - jsonWriter.writeStringField("imageType", imageType() == null ? null : imageType().toString()); - jsonWriter.writeStringField("name", name()); - jsonWriter.writeArrayField("command", command(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("args", args(), (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("env", env(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("resources", resources()); - jsonWriter.writeArrayField("volumeMounts", volumeMounts(), (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of InitContainer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of InitContainer if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the InitContainer. - */ - public static InitContainer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - InitContainer deserializedInitContainer = new InitContainer(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("image".equals(fieldName)) { - deserializedInitContainer.withImage(reader.getString()); - } else if ("imageType".equals(fieldName)) { - deserializedInitContainer.withImageType(ImageType.fromString(reader.getString())); - } else if ("name".equals(fieldName)) { - deserializedInitContainer.withName(reader.getString()); - } else if ("command".equals(fieldName)) { - List command = reader.readArray(reader1 -> reader1.getString()); - deserializedInitContainer.withCommand(command); - } else if ("args".equals(fieldName)) { - List args = reader.readArray(reader1 -> reader1.getString()); - deserializedInitContainer.withArgs(args); - } else if ("env".equals(fieldName)) { - List env = reader.readArray(reader1 -> EnvironmentVar.fromJson(reader1)); - deserializedInitContainer.withEnv(env); - } else if ("resources".equals(fieldName)) { - deserializedInitContainer.withResources(ContainerResources.fromJson(reader)); - } else if ("volumeMounts".equals(fieldName)) { - List volumeMounts = reader.readArray(reader1 -> VolumeMount.fromJson(reader1)); - deserializedInitContainer.withVolumeMounts(volumeMounts); - } else { - reader.skipChildren(); - } - } - - return deserializedInitContainer; - }); - } -} 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 deleted file mode 100644 index 26c3df77d00e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IpSecurityRestrictionRule.java +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Rule to restrict incoming IP address. - */ -@Fluent -public final class IpSecurityRestrictionRule implements JsonSerializable { - /* - * Name for the IP restriction rule. - */ - private String name; - - /* - * Describe the IP restriction rule that is being sent to the container-app. This is an optional field. - */ - private String description; - - /* - * CIDR notation to match incoming IP address - */ - private String ipAddressRange; - - /* - * Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny - */ - private Action action; - - /** - * Creates an instance of IpSecurityRestrictionRule class. - */ - public IpSecurityRestrictionRule() { - } - - /** - * Get the name property: Name for the IP restriction rule. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name for the IP restriction rule. - * - * @param name the name value to set. - * @return the IpSecurityRestrictionRule object itself. - */ - public IpSecurityRestrictionRule withName(String name) { - this.name = name; - return this; - } - - /** - * Get the description property: Describe the IP restriction rule that is being sent to the container-app. This is - * an optional field. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Describe the IP restriction rule that is being sent to the container-app. This is - * an optional field. - * - * @param description the description value to set. - * @return the IpSecurityRestrictionRule object itself. - */ - public IpSecurityRestrictionRule withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the ipAddressRange property: CIDR notation to match incoming IP address. - * - * @return the ipAddressRange value. - */ - public String ipAddressRange() { - return this.ipAddressRange; - } - - /** - * Set the ipAddressRange property: CIDR notation to match incoming IP address. - * - * @param ipAddressRange the ipAddressRange value to set. - * @return the IpSecurityRestrictionRule object itself. - */ - public IpSecurityRestrictionRule withIpAddressRange(String ipAddressRange) { - this.ipAddressRange = ipAddressRange; - return this; - } - - /** - * Get the action property: Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL - * Allow or ALL Deny. - * - * @return the action value. - */ - public Action action() { - return this.action; - } - - /** - * Set the action property: Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL - * Allow or ALL Deny. - * - * @param action the action value to set. - * @return the IpSecurityRestrictionRule object itself. - */ - public IpSecurityRestrictionRule withAction(Action action) { - this.action = action; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (name() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property name in model IpSecurityRestrictionRule")); - } - if (ipAddressRange() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property ipAddressRange in model IpSecurityRestrictionRule")); - } - if (action() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property action in model IpSecurityRestrictionRule")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(IpSecurityRestrictionRule.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("ipAddressRange", this.ipAddressRange); - jsonWriter.writeStringField("action", this.action == null ? null : this.action.toString()); - jsonWriter.writeStringField("description", this.description); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of IpSecurityRestrictionRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of IpSecurityRestrictionRule if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the IpSecurityRestrictionRule. - */ - public static IpSecurityRestrictionRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - IpSecurityRestrictionRule deserializedIpSecurityRestrictionRule = new IpSecurityRestrictionRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedIpSecurityRestrictionRule.name = reader.getString(); - } else if ("ipAddressRange".equals(fieldName)) { - deserializedIpSecurityRestrictionRule.ipAddressRange = reader.getString(); - } else if ("action".equals(fieldName)) { - deserializedIpSecurityRestrictionRule.action = Action.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedIpSecurityRestrictionRule.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedIpSecurityRestrictionRule; - }); - } -} 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 deleted file mode 100644 index 0faa35c4e557..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponent.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (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.JavaComponentInner; - -/** - * An immutable client-side representation of JavaComponent. - */ -public interface JavaComponent { - /** - * 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: Java Component resource specific properties. - * - * @return the properties value. - */ - JavaComponentProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner object. - * - * @return the inner object. - */ - JavaComponentInner innerModel(); - - /** - * The entirety of the JavaComponent definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The JavaComponent definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the JavaComponent definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the JavaComponent 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 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.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - JavaComponent create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - JavaComponent create(Context context); - } - - /** - * The stage of the JavaComponent definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Java Component resource specific properties. - * - * @param properties Java Component resource specific properties. - * @return the next definition stage. - */ - WithCreate withProperties(JavaComponentProperties properties); - } - } - - /** - * Begins update for the JavaComponent resource. - * - * @return the stage of resource update. - */ - JavaComponent.Update update(); - - /** - * The template for JavaComponent update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - JavaComponent apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - JavaComponent apply(Context context); - } - - /** - * The JavaComponent update stages. - */ - interface UpdateStages { - /** - * The stage of the JavaComponent update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Java Component resource specific properties. - * - * @param properties Java Component resource specific properties. - * @return the next definition stage. - */ - Update withProperties(JavaComponentProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - JavaComponent refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - JavaComponent refresh(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentConfigurationProperty.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentConfigurationProperty.java deleted file mode 100644 index 923aae747536..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentConfigurationProperty.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Configuration properties for a Java Component. - */ -@Fluent -public final class JavaComponentConfigurationProperty implements JsonSerializable { - /* - * The name of the property - */ - private String propertyName; - - /* - * The value of the property - */ - private String value; - - /** - * Creates an instance of JavaComponentConfigurationProperty class. - */ - public JavaComponentConfigurationProperty() { - } - - /** - * Get the propertyName property: The name of the property. - * - * @return the propertyName value. - */ - public String propertyName() { - return this.propertyName; - } - - /** - * Set the propertyName property: The name of the property. - * - * @param propertyName the propertyName value to set. - * @return the JavaComponentConfigurationProperty object itself. - */ - public JavaComponentConfigurationProperty withPropertyName(String propertyName) { - this.propertyName = propertyName; - return this; - } - - /** - * Get the value property: The value of the property. - * - * @return the value value. - */ - public String value() { - return this.value; - } - - /** - * Set the value property: The value of the property. - * - * @param value the value value to set. - * @return the JavaComponentConfigurationProperty object itself. - */ - public JavaComponentConfigurationProperty withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("propertyName", this.propertyName); - jsonWriter.writeStringField("value", this.value); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JavaComponentConfigurationProperty from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JavaComponentConfigurationProperty if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the JavaComponentConfigurationProperty. - */ - public static JavaComponentConfigurationProperty fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JavaComponentConfigurationProperty deserializedJavaComponentConfigurationProperty - = new JavaComponentConfigurationProperty(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("propertyName".equals(fieldName)) { - deserializedJavaComponentConfigurationProperty.propertyName = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedJavaComponentConfigurationProperty.value = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJavaComponentConfigurationProperty; - }); - } -} 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 deleted file mode 100644 index bf0d5ec6b725..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentIngress.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container App Ingress configuration. - */ -@Immutable -public final class JavaComponentIngress implements JsonSerializable { - /* - * Hostname of the Java Component endpoint - */ - 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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JavaComponentIngress from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JavaComponentIngress if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the JavaComponentIngress. - */ - public static JavaComponentIngress fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JavaComponentIngress deserializedJavaComponentIngress = new JavaComponentIngress(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("fqdn".equals(fieldName)) { - deserializedJavaComponentIngress.fqdn = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJavaComponentIngress; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProperties.java deleted file mode 100644 index 6de48a551d17..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProperties.java +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Java Component common properties. - */ -@Fluent -public class JavaComponentProperties implements JsonSerializable { - /* - * Type of the Java Component. - */ - private JavaComponentType componentType = JavaComponentType.fromString("JavaComponentProperties"); - - /* - * Provisioning state of the Java Component. - */ - private JavaComponentProvisioningState provisioningState; - - /* - * List of Java Components configuration properties - */ - private List configurations; - - /* - * Java component scaling configurations - */ - private JavaComponentPropertiesScale scale; - - /* - * List of Java Components that are bound to the Java component - */ - private List serviceBinds; - - /** - * Creates an instance of JavaComponentProperties class. - */ - public JavaComponentProperties() { - } - - /** - * Get the componentType property: Type of the Java Component. - * - * @return the componentType value. - */ - public JavaComponentType componentType() { - return this.componentType; - } - - /** - * Get the provisioningState property: Provisioning state of the Java Component. - * - * @return the provisioningState value. - */ - public JavaComponentProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: Provisioning state of the Java Component. - * - * @param provisioningState the provisioningState value to set. - * @return the JavaComponentProperties object itself. - */ - JavaComponentProperties withProvisioningState(JavaComponentProvisioningState provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the configurations property: List of Java Components configuration properties. - * - * @return the configurations value. - */ - public List configurations() { - return this.configurations; - } - - /** - * Set the configurations property: List of Java Components configuration properties. - * - * @param configurations the configurations value to set. - * @return the JavaComponentProperties object itself. - */ - public JavaComponentProperties withConfigurations(List configurations) { - this.configurations = configurations; - return this; - } - - /** - * Get the scale property: Java component scaling configurations. - * - * @return the scale value. - */ - public JavaComponentPropertiesScale scale() { - return this.scale; - } - - /** - * Set the scale property: Java component scaling configurations. - * - * @param scale the scale value to set. - * @return the JavaComponentProperties object itself. - */ - public JavaComponentProperties withScale(JavaComponentPropertiesScale scale) { - this.scale = scale; - 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.serviceBinds; - } - - /** - * Set the serviceBinds property: List of Java Components that are bound to the Java component. - * - * @param serviceBinds the serviceBinds value to set. - * @return the JavaComponentProperties object itself. - */ - public JavaComponentProperties withServiceBinds(List serviceBinds) { - this.serviceBinds = serviceBinds; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (configurations() != null) { - configurations().forEach(e -> e.validate()); - } - if (scale() != null) { - scale().validate(); - } - if (serviceBinds() != null) { - serviceBinds().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("componentType", this.componentType == null ? null : this.componentType.toString()); - jsonWriter.writeArrayField("configurations", this.configurations, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("scale", this.scale); - jsonWriter.writeArrayField("serviceBinds", this.serviceBinds, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JavaComponentProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JavaComponentProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the JavaComponentProperties. - */ - public static JavaComponentProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - String discriminatorValue = null; - try (JsonReader readerToUse = reader.bufferObject()) { - readerToUse.nextToken(); // Prepare for reading - while (readerToUse.nextToken() != JsonToken.END_OBJECT) { - String fieldName = readerToUse.getFieldName(); - readerToUse.nextToken(); - if ("componentType".equals(fieldName)) { - discriminatorValue = readerToUse.getString(); - break; - } else { - readerToUse.skipChildren(); - } - } - // Use the discriminator value to determine which subtype should be deserialized. - if ("SpringCloudGateway".equals(discriminatorValue)) { - return SpringCloudGatewayComponent.fromJson(readerToUse.reset()); - } else if ("SpringBootAdmin".equals(discriminatorValue)) { - return SpringBootAdminComponent.fromJson(readerToUse.reset()); - } else if ("Nacos".equals(discriminatorValue)) { - return NacosComponent.fromJson(readerToUse.reset()); - } else if ("SpringCloudEureka".equals(discriminatorValue)) { - return SpringCloudEurekaComponent.fromJson(readerToUse.reset()); - } else if ("SpringCloudConfig".equals(discriminatorValue)) { - return SpringCloudConfigComponent.fromJson(readerToUse.reset()); - } else { - return fromJsonKnownDiscriminator(readerToUse.reset()); - } - } - }); - } - - static JavaComponentProperties fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JavaComponentProperties deserializedJavaComponentProperties = new JavaComponentProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("componentType".equals(fieldName)) { - deserializedJavaComponentProperties.componentType - = JavaComponentType.fromString(reader.getString()); - } else if ("provisioningState".equals(fieldName)) { - deserializedJavaComponentProperties.provisioningState - = JavaComponentProvisioningState.fromString(reader.getString()); - } else if ("configurations".equals(fieldName)) { - List configurations - = reader.readArray(reader1 -> JavaComponentConfigurationProperty.fromJson(reader1)); - deserializedJavaComponentProperties.configurations = configurations; - } else if ("scale".equals(fieldName)) { - deserializedJavaComponentProperties.scale = JavaComponentPropertiesScale.fromJson(reader); - } else if ("serviceBinds".equals(fieldName)) { - List serviceBinds - = reader.readArray(reader1 -> JavaComponentServiceBind.fromJson(reader1)); - deserializedJavaComponentProperties.serviceBinds = serviceBinds; - } else { - reader.skipChildren(); - } - } - - return deserializedJavaComponentProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentPropertiesScale.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentPropertiesScale.java deleted file mode 100644 index 52f374b5767e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentPropertiesScale.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Java component scaling configurations. - */ -@Fluent -public final class JavaComponentPropertiesScale implements JsonSerializable { - /* - * Optional. Minimum number of Java component replicas. Defaults to 1 if not set - */ - private Integer minReplicas; - - /* - * Optional. Maximum number of Java component replicas - */ - private Integer maxReplicas; - - /** - * Creates an instance of JavaComponentPropertiesScale class. - */ - public JavaComponentPropertiesScale() { - } - - /** - * Get the minReplicas property: Optional. Minimum number of Java component replicas. Defaults to 1 if not set. - * - * @return the minReplicas value. - */ - public Integer minReplicas() { - return this.minReplicas; - } - - /** - * Set the minReplicas property: Optional. Minimum number of Java component replicas. Defaults to 1 if not set. - * - * @param minReplicas the minReplicas value to set. - * @return the JavaComponentPropertiesScale object itself. - */ - public JavaComponentPropertiesScale withMinReplicas(Integer minReplicas) { - this.minReplicas = minReplicas; - return this; - } - - /** - * Get the maxReplicas property: Optional. Maximum number of Java component replicas. - * - * @return the maxReplicas value. - */ - public Integer maxReplicas() { - return this.maxReplicas; - } - - /** - * Set the maxReplicas property: Optional. Maximum number of Java component replicas. - * - * @param maxReplicas the maxReplicas value to set. - * @return the JavaComponentPropertiesScale object itself. - */ - public JavaComponentPropertiesScale withMaxReplicas(Integer maxReplicas) { - this.maxReplicas = maxReplicas; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("minReplicas", this.minReplicas); - jsonWriter.writeNumberField("maxReplicas", this.maxReplicas); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JavaComponentPropertiesScale from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JavaComponentPropertiesScale if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the JavaComponentPropertiesScale. - */ - public static JavaComponentPropertiesScale fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JavaComponentPropertiesScale deserializedJavaComponentPropertiesScale = new JavaComponentPropertiesScale(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("minReplicas".equals(fieldName)) { - deserializedJavaComponentPropertiesScale.minReplicas = reader.getNullable(JsonReader::getInt); - } else if ("maxReplicas".equals(fieldName)) { - deserializedJavaComponentPropertiesScale.maxReplicas = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedJavaComponentPropertiesScale; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProvisioningState.java deleted file mode 100644 index 74f85932f5fa..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProvisioningState.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Provisioning state of the Java Component. - */ -public final class JavaComponentProvisioningState extends ExpandableStringEnum { - /** - * Static value Succeeded for JavaComponentProvisioningState. - */ - public static final JavaComponentProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for JavaComponentProvisioningState. - */ - public static final JavaComponentProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for JavaComponentProvisioningState. - */ - public static final JavaComponentProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Deleting for JavaComponentProvisioningState. - */ - public static final JavaComponentProvisioningState DELETING = fromString("Deleting"); - - /** - * Static value InProgress for JavaComponentProvisioningState. - */ - public static final JavaComponentProvisioningState IN_PROGRESS = fromString("InProgress"); - - /** - * Creates a new instance of JavaComponentProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public JavaComponentProvisioningState() { - } - - /** - * Creates or finds a JavaComponentProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding JavaComponentProvisioningState. - */ - public static JavaComponentProvisioningState fromString(String name) { - return fromString(name, JavaComponentProvisioningState.class); - } - - /** - * Gets known JavaComponentProvisioningState values. - * - * @return known JavaComponentProvisioningState values. - */ - public static Collection values() { - return values(JavaComponentProvisioningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentServiceBind.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentServiceBind.java deleted file mode 100644 index d09561fc2907..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentServiceBind.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Configuration to bind a Java Component to another Java Component. - */ -@Fluent -public final class JavaComponentServiceBind implements JsonSerializable { - /* - * Name of the service bind - */ - private String name; - - /* - * Resource id of the target service - */ - private String serviceId; - - /** - * Creates an instance of JavaComponentServiceBind class. - */ - public JavaComponentServiceBind() { - } - - /** - * Get the name property: Name of the service bind. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the service bind. - * - * @param name the name value to set. - * @return the JavaComponentServiceBind object itself. - */ - public JavaComponentServiceBind withName(String name) { - this.name = name; - return this; - } - - /** - * Get the serviceId property: Resource id of the target service. - * - * @return the serviceId value. - */ - public String serviceId() { - return this.serviceId; - } - - /** - * Set the serviceId property: Resource id of the target service. - * - * @param serviceId the serviceId value to set. - * @return the JavaComponentServiceBind object itself. - */ - public JavaComponentServiceBind withServiceId(String serviceId) { - this.serviceId = serviceId; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("serviceId", this.serviceId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JavaComponentServiceBind from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JavaComponentServiceBind if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the JavaComponentServiceBind. - */ - public static JavaComponentServiceBind fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JavaComponentServiceBind deserializedJavaComponentServiceBind = new JavaComponentServiceBind(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedJavaComponentServiceBind.name = reader.getString(); - } else if ("serviceId".equals(fieldName)) { - deserializedJavaComponentServiceBind.serviceId = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJavaComponentServiceBind; - }); - } -} 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 deleted file mode 100644 index d53349332fe6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of the Java Component. - */ -public final class JavaComponentType extends ExpandableStringEnum { - /** - * Static value SpringBootAdmin for JavaComponentType. - */ - public static final JavaComponentType SPRING_BOOT_ADMIN = fromString("SpringBootAdmin"); - - /** - * Static value SpringCloudEureka for JavaComponentType. - */ - public static final JavaComponentType SPRING_CLOUD_EUREKA = fromString("SpringCloudEureka"); - - /** - * Static value SpringCloudConfig for JavaComponentType. - */ - public static final JavaComponentType SPRING_CLOUD_CONFIG = fromString("SpringCloudConfig"); - - /** - * Static value SpringCloudGateway for JavaComponentType. - */ - public static final JavaComponentType SPRING_CLOUD_GATEWAY = fromString("SpringCloudGateway"); - - /** - * Static value Nacos for JavaComponentType. - */ - public static final JavaComponentType NACOS = fromString("Nacos"); - - /** - * Creates a new instance of JavaComponentType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public JavaComponentType() { - } - - /** - * Creates or finds a JavaComponentType from its string representation. - * - * @param name a name to look for. - * @return the corresponding JavaComponentType. - */ - public static JavaComponentType fromString(String name) { - return fromString(name, JavaComponentType.class); - } - - /** - * Gets known JavaComponentType values. - * - * @return known JavaComponentType values. - */ - public static Collection values() { - return values(JavaComponentType.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponents.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponents.java deleted file mode 100644 index 3f27736d5a73..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponents.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.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 JavaComponents. - */ -public interface JavaComponents { - /** - * Get the Java Components for a 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 the Java Components for a managed environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Get the Java Components for a 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 the Java Components for a managed environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName, Context context); - - /** - * Get a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 Java Component along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String environmentName, String name, - Context context); - - /** - * Get a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 Java Component. - */ - JavaComponent get(String resourceGroupName, String environmentName, String name); - - /** - * Delete a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 name); - - /** - * Delete a Java Component. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param name Name of the Java Component. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.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 name, Context context); - - /** - * Get a Java Component. - * - * @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 Java Component along with {@link Response}. - */ - JavaComponent getById(String id); - - /** - * Get a Java Component. - * - * @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 Java Component along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Java Component. - * - * @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 Java Component. - * - * @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 JavaComponent resource. - * - * @param name resource name. - * @return the first stage of the new JavaComponent definition. - */ - JavaComponent.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentsCollection.java deleted file mode 100644 index 78466a48e7e6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentsCollection.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner; -import java.io.IOException; -import java.util.List; - -/** - * Java Components ARM resource. - */ -@Fluent -public final class JavaComponentsCollection implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of JavaComponentsCollection class. - */ - public JavaComponentsCollection() { - } - - /** - * 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 JavaComponentsCollection object itself. - */ - public JavaComponentsCollection 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 JavaComponentsCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JavaComponentsCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JavaComponentsCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JavaComponentsCollection if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the JavaComponentsCollection. - */ - public static JavaComponentsCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JavaComponentsCollection deserializedJavaComponentsCollection = new JavaComponentsCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> JavaComponentInner.fromJson(reader1)); - deserializedJavaComponentsCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedJavaComponentsCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJavaComponentsCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Job.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Job.java deleted file mode 100644 index 3c867ad96ea8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Job.java +++ /dev/null @@ -1,537 +0,0 @@ -// Copyright (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.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.JobInner; -import java.util.List; -import java.util.Map; - -/** - * An immutable client-side representation of Job. - */ -public interface Job { - /** - * 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 extendedLocation property: The complex type of the extended location. - * - * @return the extendedLocation value. - */ - ExtendedLocation extendedLocation(); - - /** - * Gets 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. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the provisioningState property: Provisioning state of the Container Apps Job. - * - * @return the provisioningState value. - */ - JobProvisioningState provisioningState(); - - /** - * Gets the runningState property: Current running state of the job. - * - * @return the runningState value. - */ - JobRunningState runningState(); - - /** - * Gets the environmentId property: Resource ID of environment. - * - * @return the environmentId value. - */ - String environmentId(); - - /** - * Gets the workloadProfileName property: Workload profile name to pin for container apps job execution. - * - * @return the workloadProfileName value. - */ - String workloadProfileName(); - - /** - * Gets the configuration property: Container Apps Job configuration properties. - * - * @return the configuration value. - */ - JobConfiguration configuration(); - - /** - * Gets the template property: Container Apps job definition. - * - * @return the template value. - */ - JobTemplate template(); - - /** - * Gets the outboundIpAddresses property: Outbound IP Addresses of a container apps job. - * - * @return the outboundIpAddresses value. - */ - List outboundIpAddresses(); - - /** - * Gets the eventStreamEndpoint property: The endpoint of the eventstream of the container apps job. - * - * @return the eventStreamEndpoint value. - */ - String eventStreamEndpoint(); - - /** - * 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.JobInner object. - * - * @return the inner object. - */ - JobInner innerModel(); - - /** - * The entirety of the Job definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The Job definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the Job definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the Job 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 Job 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 Job 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.WithExtendedLocation, - DefinitionStages.WithIdentity, DefinitionStages.WithEnvironmentId, DefinitionStages.WithWorkloadProfileName, - DefinitionStages.WithConfiguration, DefinitionStages.WithTemplate { - /** - * Executes the create request. - * - * @return the created resource. - */ - Job create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - Job create(Context context); - } - - /** - * The stage of the Job 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 Job definition allowing to specify extendedLocation. - */ - interface WithExtendedLocation { - /** - * Specifies the extendedLocation property: The complex type of the extended location.. - * - * @param extendedLocation The complex type of the extended location. - * @return the next definition stage. - */ - WithCreate withExtendedLocation(ExtendedLocation extendedLocation); - } - - /** - * The stage of the Job definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies 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 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 next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the Job definition allowing to specify environmentId. - */ - interface WithEnvironmentId { - /** - * Specifies the environmentId property: Resource ID of environment.. - * - * @param environmentId Resource ID of environment. - * @return the next definition stage. - */ - WithCreate withEnvironmentId(String environmentId); - } - - /** - * The stage of the Job definition allowing to specify workloadProfileName. - */ - interface WithWorkloadProfileName { - /** - * Specifies the workloadProfileName property: Workload profile name to pin for container apps job - * execution.. - * - * @param workloadProfileName Workload profile name to pin for container apps job execution. - * @return the next definition stage. - */ - WithCreate withWorkloadProfileName(String workloadProfileName); - } - - /** - * The stage of the Job definition allowing to specify configuration. - */ - interface WithConfiguration { - /** - * Specifies the configuration property: Container Apps Job configuration properties.. - * - * @param configuration Container Apps Job configuration properties. - * @return the next definition stage. - */ - WithCreate withConfiguration(JobConfiguration configuration); - } - - /** - * The stage of the Job definition allowing to specify template. - */ - interface WithTemplate { - /** - * Specifies the template property: Container Apps job definition.. - * - * @param template Container Apps job definition. - * @return the next definition stage. - */ - WithCreate withTemplate(JobTemplate template); - } - } - - /** - * Begins update for the Job resource. - * - * @return the stage of resource update. - */ - Job.Update update(); - - /** - * The template for Job update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithExtendedLocation, UpdateStages.WithIdentity, - UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - Job apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - Job apply(Context context); - } - - /** - * The Job update stages. - */ - interface UpdateStages { - /** - * The stage of the Job update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the Job update allowing to specify extendedLocation. - */ - interface WithExtendedLocation { - /** - * Specifies the extendedLocation property: The complex type of the extended location.. - * - * @param extendedLocation The complex type of the extended location. - * @return the next definition stage. - */ - Update withExtendedLocation(ExtendedLocation extendedLocation); - } - - /** - * The stage of the Job update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies 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 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 next definition stage. - */ - Update withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the Job update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The properties property.. - * - * @param properties The properties property. - * @return the next definition stage. - */ - Update withProperties(JobPatchPropertiesProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - Job refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - Job refresh(Context context); - - /** - * Start a Container Apps Job. - * - * @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's Job execution name. - */ - JobExecutionBase start(); - - /** - * Start a Container Apps Job. - * - * @param template Properties used to start a job execution. - * @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's Job execution name. - */ - JobExecutionBase start(JobExecutionTemplate template, Context context); - - /** - * Terminates execution of a running container apps job. - * - * @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 executions collection ARM resource. - */ - ContainerAppJobExecutions stopMultipleExecutions(); - - /** - * Terminates execution of a running container apps job. - * - * @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 executions collection ARM resource. - */ - ContainerAppJobExecutions stopMultipleExecutions(Context context); - - /** - * List secrets for a container apps job. - * - * @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 Apps Job Secrets Collection ARM resource along with {@link Response}. - */ - Response listSecretsWithResponse(Context context); - - /** - * List secrets for a container apps job. - * - * @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 Apps Job Secrets Collection ARM resource. - */ - JobSecretsCollection listSecrets(); - - /** - * Resumes a suspended job. - * - * @throws com.azure.core.management.exception.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 Job. - */ - Job resume(); - - /** - * Resumes a suspended job. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 Job. - */ - Job resume(Context context); - - /** - * Suspends a job. - * - * @throws com.azure.core.management.exception.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 Job. - */ - Job suspend(); - - /** - * Suspends a job. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 Job. - */ - Job suspend(Context context); -} 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 deleted file mode 100644 index 5f8e8c2f509a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfiguration.java +++ /dev/null @@ -1,362 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Non versioned Container Apps Job configuration properties. - */ -@Fluent -public final class JobConfiguration implements JsonSerializable { - /* - * Collection of secrets used by a Container Apps Job - */ - private List secrets; - - /* - * Trigger type of the job - */ - private TriggerType triggerType; - - /* - * Maximum number of seconds a replica is allowed to run. - */ - private int replicaTimeout; - - /* - * Maximum number of retries before failing the job. - */ - private Integer replicaRetryLimit; - - /* - * Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would - * be set to 1 by default - */ - private JobConfigurationManualTriggerConfig manualTriggerConfig; - - /* - * Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism - * would be set to 1 by default - */ - private JobConfigurationScheduleTriggerConfig scheduleTriggerConfig; - - /* - * Trigger configuration of an event driven job. - */ - private JobConfigurationEventTriggerConfig eventTriggerConfig; - - /* - * Collection of private container registry credentials used by a Container apps job - */ - 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. - */ - private List identitySettings; - - /** - * Creates an instance of JobConfiguration class. - */ - public JobConfiguration() { - } - - /** - * Get the secrets property: Collection of secrets used by a Container Apps Job. - * - * @return the secrets value. - */ - public List secrets() { - return this.secrets; - } - - /** - * Set the secrets property: Collection of secrets used by a Container Apps Job. - * - * @param secrets the secrets value to set. - * @return the JobConfiguration object itself. - */ - public JobConfiguration withSecrets(List secrets) { - this.secrets = secrets; - return this; - } - - /** - * Get the triggerType property: Trigger type of the job. - * - * @return the triggerType value. - */ - public TriggerType triggerType() { - return this.triggerType; - } - - /** - * Set the triggerType property: Trigger type of the job. - * - * @param triggerType the triggerType value to set. - * @return the JobConfiguration object itself. - */ - public JobConfiguration withTriggerType(TriggerType triggerType) { - this.triggerType = triggerType; - return this; - } - - /** - * Get the replicaTimeout property: Maximum number of seconds a replica is allowed to run. - * - * @return the replicaTimeout value. - */ - public int replicaTimeout() { - return this.replicaTimeout; - } - - /** - * Set the replicaTimeout property: Maximum number of seconds a replica is allowed to run. - * - * @param replicaTimeout the replicaTimeout value to set. - * @return the JobConfiguration object itself. - */ - public JobConfiguration withReplicaTimeout(int replicaTimeout) { - this.replicaTimeout = replicaTimeout; - return this; - } - - /** - * Get the replicaRetryLimit property: Maximum number of retries before failing the job. - * - * @return the replicaRetryLimit value. - */ - public Integer replicaRetryLimit() { - return this.replicaRetryLimit; - } - - /** - * Set the replicaRetryLimit property: Maximum number of retries before failing the job. - * - * @param replicaRetryLimit the replicaRetryLimit value to set. - * @return the JobConfiguration object itself. - */ - public JobConfiguration withReplicaRetryLimit(Integer replicaRetryLimit) { - this.replicaRetryLimit = replicaRetryLimit; - return this; - } - - /** - * Get the manualTriggerConfig property: Manual trigger configuration for a single execution job. Properties - * replicaCompletionCount and parallelism would be set to 1 by default. - * - * @return the manualTriggerConfig value. - */ - public JobConfigurationManualTriggerConfig manualTriggerConfig() { - return this.manualTriggerConfig; - } - - /** - * Set the manualTriggerConfig property: Manual trigger configuration for a single execution job. Properties - * replicaCompletionCount and parallelism would be set to 1 by default. - * - * @param manualTriggerConfig the manualTriggerConfig value to set. - * @return the JobConfiguration object itself. - */ - public JobConfiguration withManualTriggerConfig(JobConfigurationManualTriggerConfig manualTriggerConfig) { - this.manualTriggerConfig = manualTriggerConfig; - return this; - } - - /** - * Get the scheduleTriggerConfig property: Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. - * Properties completions and parallelism would be set to 1 by default. - * - * @return the scheduleTriggerConfig value. - */ - public JobConfigurationScheduleTriggerConfig scheduleTriggerConfig() { - return this.scheduleTriggerConfig; - } - - /** - * Set the scheduleTriggerConfig property: Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. - * Properties completions and parallelism would be set to 1 by default. - * - * @param scheduleTriggerConfig the scheduleTriggerConfig value to set. - * @return the JobConfiguration object itself. - */ - public JobConfiguration withScheduleTriggerConfig(JobConfigurationScheduleTriggerConfig scheduleTriggerConfig) { - this.scheduleTriggerConfig = scheduleTriggerConfig; - return this; - } - - /** - * Get the eventTriggerConfig property: Trigger configuration of an event driven job. - * - * @return the eventTriggerConfig value. - */ - public JobConfigurationEventTriggerConfig eventTriggerConfig() { - return this.eventTriggerConfig; - } - - /** - * Set the eventTriggerConfig property: Trigger configuration of an event driven job. - * - * @param eventTriggerConfig the eventTriggerConfig value to set. - * @return the JobConfiguration object itself. - */ - public JobConfiguration withEventTriggerConfig(JobConfigurationEventTriggerConfig eventTriggerConfig) { - this.eventTriggerConfig = eventTriggerConfig; - return this; - } - - /** - * Get the registries property: Collection of private container registry credentials used by a Container apps job. - * - * @return the registries value. - */ - public List registries() { - return this.registries; - } - - /** - * Set the registries property: Collection of private container registry credentials used by a Container apps job. - * - * @param registries the registries value to set. - * @return the JobConfiguration object itself. - */ - public JobConfiguration withRegistries(List registries) { - this.registries = 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. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (secrets() != null) { - secrets().forEach(e -> e.validate()); - } - if (triggerType() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property triggerType in model JobConfiguration")); - } - if (manualTriggerConfig() != null) { - manualTriggerConfig().validate(); - } - if (scheduleTriggerConfig() != null) { - scheduleTriggerConfig().validate(); - } - if (eventTriggerConfig() != null) { - eventTriggerConfig().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); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("triggerType", this.triggerType == null ? null : this.triggerType.toString()); - jsonWriter.writeIntField("replicaTimeout", this.replicaTimeout); - jsonWriter.writeArrayField("secrets", this.secrets, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeNumberField("replicaRetryLimit", this.replicaRetryLimit); - jsonWriter.writeJsonField("manualTriggerConfig", this.manualTriggerConfig); - jsonWriter.writeJsonField("scheduleTriggerConfig", this.scheduleTriggerConfig); - jsonWriter.writeJsonField("eventTriggerConfig", this.eventTriggerConfig); - jsonWriter.writeArrayField("registries", this.registries, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("identitySettings", this.identitySettings, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobConfiguration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the JobConfiguration. - */ - public static JobConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobConfiguration deserializedJobConfiguration = new JobConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("triggerType".equals(fieldName)) { - deserializedJobConfiguration.triggerType = TriggerType.fromString(reader.getString()); - } else if ("replicaTimeout".equals(fieldName)) { - deserializedJobConfiguration.replicaTimeout = reader.getInt(); - } else if ("secrets".equals(fieldName)) { - List secrets = reader.readArray(reader1 -> Secret.fromJson(reader1)); - deserializedJobConfiguration.secrets = secrets; - } else if ("replicaRetryLimit".equals(fieldName)) { - deserializedJobConfiguration.replicaRetryLimit = reader.getNullable(JsonReader::getInt); - } else if ("manualTriggerConfig".equals(fieldName)) { - deserializedJobConfiguration.manualTriggerConfig - = JobConfigurationManualTriggerConfig.fromJson(reader); - } else if ("scheduleTriggerConfig".equals(fieldName)) { - deserializedJobConfiguration.scheduleTriggerConfig - = JobConfigurationScheduleTriggerConfig.fromJson(reader); - } else if ("eventTriggerConfig".equals(fieldName)) { - deserializedJobConfiguration.eventTriggerConfig - = JobConfigurationEventTriggerConfig.fromJson(reader); - } else if ("registries".equals(fieldName)) { - List registries - = reader.readArray(reader1 -> RegistryCredentials.fromJson(reader1)); - deserializedJobConfiguration.registries = registries; - } else if ("identitySettings".equals(fieldName)) { - List identitySettings - = reader.readArray(reader1 -> IdentitySettings.fromJson(reader1)); - deserializedJobConfiguration.identitySettings = identitySettings; - } else { - reader.skipChildren(); - } - } - - return deserializedJobConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationEventTriggerConfig.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationEventTriggerConfig.java deleted file mode 100644 index 583fc0410cf3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationEventTriggerConfig.java +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Trigger configuration of an event driven job. - */ -@Fluent -public final class JobConfigurationEventTriggerConfig implements JsonSerializable { - /* - * Minimum number of successful replica completions before overall job completion. - */ - private Integer replicaCompletionCount; - - /* - * Number of parallel replicas of a job that can run at a given time. - */ - private Integer parallelism; - - /* - * Scaling configurations for event driven jobs. - */ - private JobScale scale; - - /** - * Creates an instance of JobConfigurationEventTriggerConfig class. - */ - public JobConfigurationEventTriggerConfig() { - } - - /** - * Get the replicaCompletionCount property: Minimum number of successful replica completions before overall job - * completion. - * - * @return the replicaCompletionCount value. - */ - public Integer replicaCompletionCount() { - return this.replicaCompletionCount; - } - - /** - * Set the replicaCompletionCount property: Minimum number of successful replica completions before overall job - * completion. - * - * @param replicaCompletionCount the replicaCompletionCount value to set. - * @return the JobConfigurationEventTriggerConfig object itself. - */ - public JobConfigurationEventTriggerConfig withReplicaCompletionCount(Integer replicaCompletionCount) { - this.replicaCompletionCount = replicaCompletionCount; - return this; - } - - /** - * Get the parallelism property: Number of parallel replicas of a job that can run at a given time. - * - * @return the parallelism value. - */ - public Integer parallelism() { - return this.parallelism; - } - - /** - * Set the parallelism property: Number of parallel replicas of a job that can run at a given time. - * - * @param parallelism the parallelism value to set. - * @return the JobConfigurationEventTriggerConfig object itself. - */ - public JobConfigurationEventTriggerConfig withParallelism(Integer parallelism) { - this.parallelism = parallelism; - return this; - } - - /** - * Get the scale property: Scaling configurations for event driven jobs. - * - * @return the scale value. - */ - public JobScale scale() { - return this.scale; - } - - /** - * Set the scale property: Scaling configurations for event driven jobs. - * - * @param scale the scale value to set. - * @return the JobConfigurationEventTriggerConfig object itself. - */ - public JobConfigurationEventTriggerConfig withScale(JobScale scale) { - this.scale = scale; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (scale() != null) { - scale().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("replicaCompletionCount", this.replicaCompletionCount); - jsonWriter.writeNumberField("parallelism", this.parallelism); - jsonWriter.writeJsonField("scale", this.scale); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobConfigurationEventTriggerConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobConfigurationEventTriggerConfig if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the JobConfigurationEventTriggerConfig. - */ - public static JobConfigurationEventTriggerConfig fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobConfigurationEventTriggerConfig deserializedJobConfigurationEventTriggerConfig - = new JobConfigurationEventTriggerConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("replicaCompletionCount".equals(fieldName)) { - deserializedJobConfigurationEventTriggerConfig.replicaCompletionCount - = reader.getNullable(JsonReader::getInt); - } else if ("parallelism".equals(fieldName)) { - deserializedJobConfigurationEventTriggerConfig.parallelism = reader.getNullable(JsonReader::getInt); - } else if ("scale".equals(fieldName)) { - deserializedJobConfigurationEventTriggerConfig.scale = JobScale.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedJobConfigurationEventTriggerConfig; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationManualTriggerConfig.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationManualTriggerConfig.java deleted file mode 100644 index 70349f5ae83c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationManualTriggerConfig.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be - * set to 1 by default. - */ -@Fluent -public final class JobConfigurationManualTriggerConfig - implements JsonSerializable { - /* - * Minimum number of successful replica completions before overall job completion. - */ - private Integer replicaCompletionCount; - - /* - * Number of parallel replicas of a job that can run at a given time. - */ - private Integer parallelism; - - /** - * Creates an instance of JobConfigurationManualTriggerConfig class. - */ - public JobConfigurationManualTriggerConfig() { - } - - /** - * Get the replicaCompletionCount property: Minimum number of successful replica completions before overall job - * completion. - * - * @return the replicaCompletionCount value. - */ - public Integer replicaCompletionCount() { - return this.replicaCompletionCount; - } - - /** - * Set the replicaCompletionCount property: Minimum number of successful replica completions before overall job - * completion. - * - * @param replicaCompletionCount the replicaCompletionCount value to set. - * @return the JobConfigurationManualTriggerConfig object itself. - */ - public JobConfigurationManualTriggerConfig withReplicaCompletionCount(Integer replicaCompletionCount) { - this.replicaCompletionCount = replicaCompletionCount; - return this; - } - - /** - * Get the parallelism property: Number of parallel replicas of a job that can run at a given time. - * - * @return the parallelism value. - */ - public Integer parallelism() { - return this.parallelism; - } - - /** - * Set the parallelism property: Number of parallel replicas of a job that can run at a given time. - * - * @param parallelism the parallelism value to set. - * @return the JobConfigurationManualTriggerConfig object itself. - */ - public JobConfigurationManualTriggerConfig withParallelism(Integer parallelism) { - this.parallelism = parallelism; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("replicaCompletionCount", this.replicaCompletionCount); - jsonWriter.writeNumberField("parallelism", this.parallelism); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobConfigurationManualTriggerConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobConfigurationManualTriggerConfig if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the JobConfigurationManualTriggerConfig. - */ - public static JobConfigurationManualTriggerConfig fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobConfigurationManualTriggerConfig deserializedJobConfigurationManualTriggerConfig - = new JobConfigurationManualTriggerConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("replicaCompletionCount".equals(fieldName)) { - deserializedJobConfigurationManualTriggerConfig.replicaCompletionCount - = reader.getNullable(JsonReader::getInt); - } else if ("parallelism".equals(fieldName)) { - deserializedJobConfigurationManualTriggerConfig.parallelism - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedJobConfigurationManualTriggerConfig; - }); - } -} 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 deleted file mode 100644 index 935e05c9fca0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationScheduleTriggerConfig.java +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be - * set to 1 by default. - */ -@Fluent -public final class JobConfigurationScheduleTriggerConfig - implements JsonSerializable { - /* - * Minimum number of successful replica completions before overall job completion. - */ - private Integer replicaCompletionCount; - - /* - * Cron formatted repeating schedule ("* * * * *") of a Cron Job. - */ - private String cronExpression; - - /* - * Number of parallel replicas of a job that can run at a given time. - */ - private Integer parallelism; - - /** - * Creates an instance of JobConfigurationScheduleTriggerConfig class. - */ - public JobConfigurationScheduleTriggerConfig() { - } - - /** - * Get the replicaCompletionCount property: Minimum number of successful replica completions before overall job - * completion. - * - * @return the replicaCompletionCount value. - */ - public Integer replicaCompletionCount() { - return this.replicaCompletionCount; - } - - /** - * Set the replicaCompletionCount property: Minimum number of successful replica completions before overall job - * completion. - * - * @param replicaCompletionCount the replicaCompletionCount value to set. - * @return the JobConfigurationScheduleTriggerConfig object itself. - */ - public JobConfigurationScheduleTriggerConfig withReplicaCompletionCount(Integer replicaCompletionCount) { - this.replicaCompletionCount = replicaCompletionCount; - return this; - } - - /** - * Get the cronExpression property: Cron formatted repeating schedule ("* * * * *") of a Cron Job. - * - * @return the cronExpression value. - */ - public String cronExpression() { - return this.cronExpression; - } - - /** - * Set the cronExpression property: Cron formatted repeating schedule ("* * * * *") of a Cron Job. - * - * @param cronExpression the cronExpression value to set. - * @return the JobConfigurationScheduleTriggerConfig object itself. - */ - public JobConfigurationScheduleTriggerConfig withCronExpression(String cronExpression) { - this.cronExpression = cronExpression; - return this; - } - - /** - * Get the parallelism property: Number of parallel replicas of a job that can run at a given time. - * - * @return the parallelism value. - */ - public Integer parallelism() { - return this.parallelism; - } - - /** - * Set the parallelism property: Number of parallel replicas of a job that can run at a given time. - * - * @param parallelism the parallelism value to set. - * @return the JobConfigurationScheduleTriggerConfig object itself. - */ - public JobConfigurationScheduleTriggerConfig withParallelism(Integer parallelism) { - this.parallelism = parallelism; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (cronExpression() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException( - "Missing required property cronExpression in model JobConfigurationScheduleTriggerConfig")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JobConfigurationScheduleTriggerConfig.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("cronExpression", this.cronExpression); - jsonWriter.writeNumberField("replicaCompletionCount", this.replicaCompletionCount); - jsonWriter.writeNumberField("parallelism", this.parallelism); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobConfigurationScheduleTriggerConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobConfigurationScheduleTriggerConfig if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the JobConfigurationScheduleTriggerConfig. - */ - public static JobConfigurationScheduleTriggerConfig fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobConfigurationScheduleTriggerConfig deserializedJobConfigurationScheduleTriggerConfig - = new JobConfigurationScheduleTriggerConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("cronExpression".equals(fieldName)) { - deserializedJobConfigurationScheduleTriggerConfig.cronExpression = reader.getString(); - } else if ("replicaCompletionCount".equals(fieldName)) { - deserializedJobConfigurationScheduleTriggerConfig.replicaCompletionCount - = reader.getNullable(JsonReader::getInt); - } else if ("parallelism".equals(fieldName)) { - deserializedJobConfigurationScheduleTriggerConfig.parallelism - = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedJobConfigurationScheduleTriggerConfig; - }); - } -} 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 deleted file mode 100644 index 86f5654629d5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecution.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; -import java.time.OffsetDateTime; - -/** - * An immutable client-side representation of JobExecution. - */ -public interface JobExecution { - /** - * Gets the name property: Job execution Name. - * - * @return the name value. - */ - String name(); - - /** - * Gets the id property: Job execution Id. - * - * @return the id value. - */ - String id(); - - /** - * Gets the type property: Job execution type. - * - * @return the type value. - */ - String type(); - - /** - * Gets the status property: Current running State of the job. - * - * @return the status value. - */ - JobExecutionRunningState status(); - - /** - * Gets the startTime property: Job execution start time. - * - * @return the startTime value. - */ - OffsetDateTime startTime(); - - /** - * Gets the endTime property: Job execution end time. - * - * @return the endTime value. - */ - OffsetDateTime endTime(); - - /** - * Gets the template property: Job's execution container. - * - * @return the template value. - */ - 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. - * - * @return the inner object. - */ - JobExecutionInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionBase.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionBase.java deleted file mode 100644 index 9a987dc30d60..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionBase.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.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner; - -/** - * An immutable client-side representation of JobExecutionBase. - */ -public interface JobExecutionBase { - /** - * Gets the name property: Job execution name. - * - * @return the name value. - */ - String name(); - - /** - * Gets the id property: Job execution Id. - * - * @return the id value. - */ - String id(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner object. - * - * @return the inner object. - */ - JobExecutionBaseInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionContainer.java deleted file mode 100644 index 483f1ddc4b94..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionContainer.java +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Container Apps Jobs execution container definition. - */ -@Fluent -public final class JobExecutionContainer implements JsonSerializable { - /* - * Container image tag. - */ - private String image; - - /* - * Custom container name. - */ - private String name; - - /* - * Container start command. - */ - private List command; - - /* - * Container start command arguments. - */ - private List args; - - /* - * Container environment variables. - */ - private List env; - - /* - * Container resource requirements. - */ - private ContainerResources resources; - - /** - * Creates an instance of JobExecutionContainer class. - */ - public JobExecutionContainer() { - } - - /** - * 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 JobExecutionContainer object itself. - */ - public JobExecutionContainer 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 JobExecutionContainer object itself. - */ - public JobExecutionContainer 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 JobExecutionContainer object itself. - */ - public JobExecutionContainer 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 JobExecutionContainer object itself. - */ - public JobExecutionContainer 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 JobExecutionContainer object itself. - */ - public JobExecutionContainer withEnv(List env) { - this.env = env; - return this; - } - - /** - * Get the resources property: Container resource requirements. - * - * @return the resources value. - */ - public ContainerResources resources() { - return this.resources; - } - - /** - * Set the resources property: Container resource requirements. - * - * @param resources the resources value to set. - * @return the JobExecutionContainer object itself. - */ - public JobExecutionContainer withResources(ContainerResources 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(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("image", this.image); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeArrayField("command", this.command, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("args", this.args, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("env", this.env, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("resources", this.resources); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobExecutionContainer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobExecutionContainer if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the JobExecutionContainer. - */ - public static JobExecutionContainer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobExecutionContainer deserializedJobExecutionContainer = new JobExecutionContainer(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("image".equals(fieldName)) { - deserializedJobExecutionContainer.image = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedJobExecutionContainer.name = reader.getString(); - } else if ("command".equals(fieldName)) { - List command = reader.readArray(reader1 -> reader1.getString()); - deserializedJobExecutionContainer.command = command; - } else if ("args".equals(fieldName)) { - List args = reader.readArray(reader1 -> reader1.getString()); - deserializedJobExecutionContainer.args = args; - } else if ("env".equals(fieldName)) { - List env = reader.readArray(reader1 -> EnvironmentVar.fromJson(reader1)); - deserializedJobExecutionContainer.env = env; - } else if ("resources".equals(fieldName)) { - deserializedJobExecutionContainer.resources = ContainerResources.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedJobExecutionContainer; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionRunningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionRunningState.java deleted file mode 100644 index c8f20477420e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionRunningState.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Current running State of the job. - */ -public final class JobExecutionRunningState extends ExpandableStringEnum { - /** - * Static value Running for JobExecutionRunningState. - */ - public static final JobExecutionRunningState RUNNING = fromString("Running"); - - /** - * Static value Processing for JobExecutionRunningState. - */ - public static final JobExecutionRunningState PROCESSING = fromString("Processing"); - - /** - * Static value Stopped for JobExecutionRunningState. - */ - public static final JobExecutionRunningState STOPPED = fromString("Stopped"); - - /** - * Static value Degraded for JobExecutionRunningState. - */ - public static final JobExecutionRunningState DEGRADED = fromString("Degraded"); - - /** - * Static value Failed for JobExecutionRunningState. - */ - public static final JobExecutionRunningState FAILED = fromString("Failed"); - - /** - * Static value Unknown for JobExecutionRunningState. - */ - public static final JobExecutionRunningState UNKNOWN = fromString("Unknown"); - - /** - * Static value Succeeded for JobExecutionRunningState. - */ - public static final JobExecutionRunningState SUCCEEDED = fromString("Succeeded"); - - /** - * Creates a new instance of JobExecutionRunningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public JobExecutionRunningState() { - } - - /** - * Creates or finds a JobExecutionRunningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobExecutionRunningState. - */ - public static JobExecutionRunningState fromString(String name) { - return fromString(name, JobExecutionRunningState.class); - } - - /** - * Gets known JobExecutionRunningState values. - * - * @return known JobExecutionRunningState values. - */ - public static Collection values() { - return values(JobExecutionRunningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionTemplate.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionTemplate.java deleted file mode 100644 index 1bb37ef45909..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionTemplate.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Job's execution template, containing container configuration for a job's execution. - */ -@Fluent -public final class JobExecutionTemplate implements JsonSerializable { - /* - * List of container definitions for the Container Apps Job. - */ - private List containers; - - /* - * List of specialized containers that run before job containers. - */ - private List initContainers; - - /** - * Creates an instance of JobExecutionTemplate class. - */ - public JobExecutionTemplate() { - } - - /** - * Get the containers property: List of container definitions for the Container Apps Job. - * - * @return the containers value. - */ - public List containers() { - return this.containers; - } - - /** - * Set the containers property: List of container definitions for the Container Apps Job. - * - * @param containers the containers value to set. - * @return the JobExecutionTemplate object itself. - */ - public JobExecutionTemplate withContainers(List containers) { - this.containers = containers; - return this; - } - - /** - * Get the initContainers property: List of specialized containers that run before job containers. - * - * @return the initContainers value. - */ - public List initContainers() { - return this.initContainers; - } - - /** - * Set the initContainers property: List of specialized containers that run before job containers. - * - * @param initContainers the initContainers value to set. - * @return the JobExecutionTemplate object itself. - */ - public JobExecutionTemplate withInitContainers(List initContainers) { - this.initContainers = initContainers; - 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()); - } - if (initContainers() != null) { - initContainers().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("containers", this.containers, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("initContainers", this.initContainers, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobExecutionTemplate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobExecutionTemplate if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the JobExecutionTemplate. - */ - public static JobExecutionTemplate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobExecutionTemplate deserializedJobExecutionTemplate = new JobExecutionTemplate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("containers".equals(fieldName)) { - List containers - = reader.readArray(reader1 -> JobExecutionContainer.fromJson(reader1)); - deserializedJobExecutionTemplate.containers = containers; - } else if ("initContainers".equals(fieldName)) { - List initContainers - = reader.readArray(reader1 -> JobExecutionContainer.fromJson(reader1)); - deserializedJobExecutionTemplate.initContainers = initContainers; - } else { - reader.skipChildren(); - } - } - - return deserializedJobExecutionTemplate; - }); - } -} 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 deleted file mode 100644 index 5ee1158155f0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchProperties.java +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Container Apps Job resource specific properties. - */ -@Fluent -public final class JobPatchProperties implements JsonSerializable { - /* - * The complex type of the extended location. - */ - 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. - */ - private ManagedServiceIdentity identity; - - /* - * Resource tags. - */ - private Map tags; - - /* - * The properties property. - */ - private JobPatchPropertiesProperties properties; - - /** - * Creates an instance of JobPatchProperties class. - */ - public JobPatchProperties() { - } - - /** - * Get the extendedLocation property: The complex type of the extended location. - * - * @return the extendedLocation value. - */ - public ExtendedLocation extendedLocation() { - return this.extendedLocation; - } - - /** - * Set the extendedLocation property: The complex type of the extended location. - * - * @param extendedLocation the extendedLocation value to set. - * @return the JobPatchProperties object itself. - */ - public JobPatchProperties withExtendedLocation(ExtendedLocation extendedLocation) { - this.extendedLocation = extendedLocation; - return this; - } - - /** - * 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. - */ - public ManagedServiceIdentity identity() { - return this.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. - * - * @param identity the identity value to set. - * @return the JobPatchProperties object itself. - */ - public JobPatchProperties withIdentity(ManagedServiceIdentity identity) { - this.identity = identity; - return this; - } - - /** - * Get the tags property: Resource tags. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Resource tags. - * - * @param tags the tags value to set. - * @return the JobPatchProperties object itself. - */ - public JobPatchProperties withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Get the properties property: The properties property. - * - * @return the properties value. - */ - public JobPatchPropertiesProperties properties() { - return this.properties; - } - - /** - * Set the properties property: The properties property. - * - * @param properties the properties value to set. - * @return the JobPatchProperties object itself. - */ - public JobPatchProperties withProperties(JobPatchPropertiesProperties properties) { - this.properties = properties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (extendedLocation() != null) { - extendedLocation().validate(); - } - if (identity() != null) { - identity().validate(); - } - if (properties() != null) { - properties().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("extendedLocation", this.extendedLocation); - jsonWriter.writeJsonField("identity", this.identity); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("properties", this.properties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobPatchProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobPatchProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the JobPatchProperties. - */ - public static JobPatchProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobPatchProperties deserializedJobPatchProperties = new JobPatchProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("extendedLocation".equals(fieldName)) { - deserializedJobPatchProperties.extendedLocation = ExtendedLocation.fromJson(reader); - } else if ("identity".equals(fieldName)) { - deserializedJobPatchProperties.identity = ManagedServiceIdentity.fromJson(reader); - } else if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedJobPatchProperties.tags = tags; - } else if ("properties".equals(fieldName)) { - deserializedJobPatchProperties.properties = JobPatchPropertiesProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedJobPatchProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchPropertiesProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchPropertiesProperties.java deleted file mode 100644 index 3fb56c96772f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchPropertiesProperties.java +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The JobPatchPropertiesProperties model. - */ -@Fluent -public final class JobPatchPropertiesProperties implements JsonSerializable { - /* - * Resource ID of environment. - */ - private String environmentId; - - /* - * Container Apps Job configuration properties. - */ - private JobConfiguration configuration; - - /* - * Container Apps job definition. - */ - private JobTemplate template; - - /* - * Outbound IP Addresses of a container apps job. - */ - private List outboundIpAddresses; - - /* - * The endpoint of the eventstream of the container apps job. - */ - private String eventStreamEndpoint; - - /** - * Creates an instance of JobPatchPropertiesProperties class. - */ - public JobPatchPropertiesProperties() { - } - - /** - * Get the environmentId property: Resource ID of environment. - * - * @return the environmentId value. - */ - public String environmentId() { - return this.environmentId; - } - - /** - * Set the environmentId property: Resource ID of environment. - * - * @param environmentId the environmentId value to set. - * @return the JobPatchPropertiesProperties object itself. - */ - public JobPatchPropertiesProperties withEnvironmentId(String environmentId) { - this.environmentId = environmentId; - return this; - } - - /** - * Get the configuration property: Container Apps Job configuration properties. - * - * @return the configuration value. - */ - public JobConfiguration configuration() { - return this.configuration; - } - - /** - * Set the configuration property: Container Apps Job configuration properties. - * - * @param configuration the configuration value to set. - * @return the JobPatchPropertiesProperties object itself. - */ - public JobPatchPropertiesProperties withConfiguration(JobConfiguration configuration) { - this.configuration = configuration; - return this; - } - - /** - * Get the template property: Container Apps job definition. - * - * @return the template value. - */ - public JobTemplate template() { - return this.template; - } - - /** - * Set the template property: Container Apps job definition. - * - * @param template the template value to set. - * @return the JobPatchPropertiesProperties object itself. - */ - public JobPatchPropertiesProperties withTemplate(JobTemplate template) { - this.template = template; - return this; - } - - /** - * Get the outboundIpAddresses property: Outbound IP Addresses of a container apps job. - * - * @return the outboundIpAddresses value. - */ - public List outboundIpAddresses() { - return this.outboundIpAddresses; - } - - /** - * Set the outboundIpAddresses property: Outbound IP Addresses of a container apps job. - * - * @param outboundIpAddresses the outboundIpAddresses value to set. - * @return the JobPatchPropertiesProperties object itself. - */ - public JobPatchPropertiesProperties withOutboundIpAddresses(List outboundIpAddresses) { - this.outboundIpAddresses = outboundIpAddresses; - return this; - } - - /** - * Get the eventStreamEndpoint property: The endpoint of the eventstream of the container apps job. - * - * @return the eventStreamEndpoint value. - */ - public String eventStreamEndpoint() { - return this.eventStreamEndpoint; - } - - /** - * Set the eventStreamEndpoint property: The endpoint of the eventstream of the container apps job. - * - * @param eventStreamEndpoint the eventStreamEndpoint value to set. - * @return the JobPatchPropertiesProperties object itself. - */ - public JobPatchPropertiesProperties withEventStreamEndpoint(String eventStreamEndpoint) { - this.eventStreamEndpoint = eventStreamEndpoint; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (configuration() != null) { - configuration().validate(); - } - if (template() != null) { - template().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("environmentId", this.environmentId); - jsonWriter.writeJsonField("configuration", this.configuration); - jsonWriter.writeJsonField("template", this.template); - jsonWriter.writeArrayField("outboundIpAddresses", this.outboundIpAddresses, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeStringField("eventStreamEndpoint", this.eventStreamEndpoint); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobPatchPropertiesProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobPatchPropertiesProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the JobPatchPropertiesProperties. - */ - public static JobPatchPropertiesProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobPatchPropertiesProperties deserializedJobPatchPropertiesProperties = new JobPatchPropertiesProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("environmentId".equals(fieldName)) { - deserializedJobPatchPropertiesProperties.environmentId = reader.getString(); - } else if ("configuration".equals(fieldName)) { - deserializedJobPatchPropertiesProperties.configuration = JobConfiguration.fromJson(reader); - } else if ("template".equals(fieldName)) { - deserializedJobPatchPropertiesProperties.template = JobTemplate.fromJson(reader); - } else if ("outboundIpAddresses".equals(fieldName)) { - List outboundIpAddresses = reader.readArray(reader1 -> reader1.getString()); - deserializedJobPatchPropertiesProperties.outboundIpAddresses = outboundIpAddresses; - } else if ("eventStreamEndpoint".equals(fieldName)) { - deserializedJobPatchPropertiesProperties.eventStreamEndpoint = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJobPatchPropertiesProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobProvisioningState.java deleted file mode 100644 index c623bfdcef2e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobProvisioningState.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Provisioning state of the Container Apps Job. - */ -public final class JobProvisioningState extends ExpandableStringEnum { - /** - * Static value InProgress for JobProvisioningState. - */ - public static final JobProvisioningState IN_PROGRESS = fromString("InProgress"); - - /** - * Static value Succeeded for JobProvisioningState. - */ - public static final JobProvisioningState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for JobProvisioningState. - */ - public static final JobProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Canceled for JobProvisioningState. - */ - public static final JobProvisioningState CANCELED = fromString("Canceled"); - - /** - * Static value Deleting for JobProvisioningState. - */ - public static final JobProvisioningState DELETING = fromString("Deleting"); - - /** - * Creates a new instance of JobProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public JobProvisioningState() { - } - - /** - * Creates or finds a JobProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobProvisioningState. - */ - public static JobProvisioningState fromString(String name) { - return fromString(name, JobProvisioningState.class); - } - - /** - * Gets known JobProvisioningState values. - * - * @return known JobProvisioningState values. - */ - public static Collection values() { - return values(JobProvisioningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobRunningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobRunningState.java deleted file mode 100644 index 382ef10f0ca7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobRunningState.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Current running state of the job. - */ -public final class JobRunningState extends ExpandableStringEnum { - /** - * Static value Ready for JobRunningState. - */ - public static final JobRunningState READY = fromString("Ready"); - - /** - * Static value Progressing for JobRunningState. - */ - public static final JobRunningState PROGRESSING = fromString("Progressing"); - - /** - * Static value Suspended for JobRunningState. - */ - public static final JobRunningState SUSPENDED = fromString("Suspended"); - - /** - * Creates a new instance of JobRunningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public JobRunningState() { - } - - /** - * Creates or finds a JobRunningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding JobRunningState. - */ - public static JobRunningState fromString(String name) { - return fromString(name, JobRunningState.class); - } - - /** - * Gets known JobRunningState values. - * - * @return known JobRunningState values. - */ - public static Collection values() { - return values(JobRunningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScale.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScale.java deleted file mode 100644 index b19d9ada4f41..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScale.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Scaling configurations for event driven jobs. - */ -@Fluent -public final class JobScale implements JsonSerializable { - /* - * Interval to check each event source in seconds. Defaults to 30s - */ - private Integer pollingInterval; - - /* - * Minimum number of job executions that are created for a trigger, default 0 - */ - private Integer minExecutions; - - /* - * Maximum number of job executions that are created for a trigger, default 100. - */ - private Integer maxExecutions; - - /* - * Scaling rules. - */ - private List rules; - - /** - * Creates an instance of JobScale class. - */ - public JobScale() { - } - - /** - * Get the pollingInterval property: Interval to check each event source in seconds. Defaults to 30s. - * - * @return the pollingInterval value. - */ - public Integer pollingInterval() { - return this.pollingInterval; - } - - /** - * Set the pollingInterval property: Interval to check each event source in seconds. Defaults to 30s. - * - * @param pollingInterval the pollingInterval value to set. - * @return the JobScale object itself. - */ - public JobScale withPollingInterval(Integer pollingInterval) { - this.pollingInterval = pollingInterval; - return this; - } - - /** - * Get the minExecutions property: Minimum number of job executions that are created for a trigger, default 0. - * - * @return the minExecutions value. - */ - public Integer minExecutions() { - return this.minExecutions; - } - - /** - * Set the minExecutions property: Minimum number of job executions that are created for a trigger, default 0. - * - * @param minExecutions the minExecutions value to set. - * @return the JobScale object itself. - */ - public JobScale withMinExecutions(Integer minExecutions) { - this.minExecutions = minExecutions; - return this; - } - - /** - * Get the maxExecutions property: Maximum number of job executions that are created for a trigger, default 100. - * - * @return the maxExecutions value. - */ - public Integer maxExecutions() { - return this.maxExecutions; - } - - /** - * Set the maxExecutions property: Maximum number of job executions that are created for a trigger, default 100. - * - * @param maxExecutions the maxExecutions value to set. - * @return the JobScale object itself. - */ - public JobScale withMaxExecutions(Integer maxExecutions) { - this.maxExecutions = maxExecutions; - return this; - } - - /** - * Get the rules property: Scaling rules. - * - * @return the rules value. - */ - public List rules() { - return this.rules; - } - - /** - * Set the rules property: Scaling rules. - * - * @param rules the rules value to set. - * @return the JobScale object itself. - */ - public JobScale withRules(List rules) { - this.rules = rules; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (rules() != null) { - rules().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("pollingInterval", this.pollingInterval); - jsonWriter.writeNumberField("minExecutions", this.minExecutions); - jsonWriter.writeNumberField("maxExecutions", this.maxExecutions); - jsonWriter.writeArrayField("rules", this.rules, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobScale from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobScale if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the JobScale. - */ - public static JobScale fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobScale deserializedJobScale = new JobScale(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("pollingInterval".equals(fieldName)) { - deserializedJobScale.pollingInterval = reader.getNullable(JsonReader::getInt); - } else if ("minExecutions".equals(fieldName)) { - deserializedJobScale.minExecutions = reader.getNullable(JsonReader::getInt); - } else if ("maxExecutions".equals(fieldName)) { - deserializedJobScale.maxExecutions = reader.getNullable(JsonReader::getInt); - } else if ("rules".equals(fieldName)) { - List rules = reader.readArray(reader1 -> JobScaleRule.fromJson(reader1)); - deserializedJobScale.rules = rules; - } else { - reader.skipChildren(); - } - } - - return deserializedJobScale; - }); - } -} 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 deleted file mode 100644 index def329453208..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScaleRule.java +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Scaling rule. - */ -@Fluent -public final class JobScaleRule implements JsonSerializable { - /* - * Scale Rule Name - */ - private String name; - - /* - * Type of the scale rule - * eg: azure-servicebus, redis etc. - */ - private String type; - - /* - * Metadata properties to describe the scale rule. - */ - private Object metadata; - - /* - * Authentication secrets for the scale rule. - */ - private List auth; - - /* - * The resource ID of a user-assigned managed identity that is assigned to the job, or 'system' for system-assigned - * identity. - */ - private String identity; - - /** - * Creates an instance of JobScaleRule class. - */ - public JobScaleRule() { - } - - /** - * Get the name property: Scale Rule Name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Scale Rule Name. - * - * @param name the name value to set. - * @return the JobScaleRule object itself. - */ - public JobScaleRule withName(String name) { - this.name = name; - return this; - } - - /** - * Get the type property: Type of the scale rule - * eg: azure-servicebus, redis etc. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: Type of the scale rule - * eg: azure-servicebus, redis etc. - * - * @param type the type value to set. - * @return the JobScaleRule object itself. - */ - public JobScaleRule withType(String type) { - this.type = type; - return this; - } - - /** - * Get the metadata property: Metadata properties to describe the scale rule. - * - * @return the metadata value. - */ - public Object metadata() { - return this.metadata; - } - - /** - * Set the metadata property: Metadata properties to describe the scale rule. - * - * @param metadata the metadata value to set. - * @return the JobScaleRule object itself. - */ - public JobScaleRule withMetadata(Object metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the auth property: Authentication secrets for the scale rule. - * - * @return the auth value. - */ - public List auth() { - return this.auth; - } - - /** - * Set the auth property: Authentication secrets for the scale rule. - * - * @param auth the auth value to set. - * @return the JobScaleRule object itself. - */ - public JobScaleRule withAuth(List auth) { - this.auth = 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. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (auth() != null) { - auth().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("type", this.type); - jsonWriter.writeUntypedField("metadata", this.metadata); - jsonWriter.writeArrayField("auth", this.auth, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobScaleRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobScaleRule if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the JobScaleRule. - */ - public static JobScaleRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobScaleRule deserializedJobScaleRule = new JobScaleRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedJobScaleRule.name = reader.getString(); - } else if ("type".equals(fieldName)) { - deserializedJobScaleRule.type = reader.getString(); - } else if ("metadata".equals(fieldName)) { - deserializedJobScaleRule.metadata = reader.readUntyped(); - } else if ("auth".equals(fieldName)) { - List auth = reader.readArray(reader1 -> ScaleRuleAuth.fromJson(reader1)); - deserializedJobScaleRule.auth = auth; - } else if ("identity".equals(fieldName)) { - deserializedJobScaleRule.identity = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJobScaleRule; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobSecretsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobSecretsCollection.java deleted file mode 100644 index d7abd9c403d6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobSecretsCollection.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.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.JobSecretsCollectionInner; -import java.util.List; - -/** - * An immutable client-side representation of JobSecretsCollection. - */ -public interface JobSecretsCollection { - /** - * Gets the value property: Collection of resources. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.JobSecretsCollectionInner object. - * - * @return the inner object. - */ - JobSecretsCollectionInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobTemplate.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobTemplate.java deleted file mode 100644 index 0ad7cf857b38..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobTemplate.java +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Container Apps Job versioned application definition. Defines the desired state of an immutable revision. Any changes - * to this section Will result in a new revision being created. - */ -@Fluent -public final class JobTemplate implements JsonSerializable { - /* - * List of specialized containers that run before app containers. - */ - private List initContainers; - - /* - * List of container definitions for the Container App. - */ - private List containers; - - /* - * List of volume definitions for the Container App. - */ - private List volumes; - - /** - * Creates an instance of JobTemplate class. - */ - public JobTemplate() { - } - - /** - * Get the initContainers property: List of specialized containers that run before app containers. - * - * @return the initContainers value. - */ - public List initContainers() { - return this.initContainers; - } - - /** - * Set the initContainers property: List of specialized containers that run before app containers. - * - * @param initContainers the initContainers value to set. - * @return the JobTemplate object itself. - */ - public JobTemplate withInitContainers(List initContainers) { - this.initContainers = initContainers; - return this; - } - - /** - * Get the containers property: List of container definitions for the Container App. - * - * @return the containers value. - */ - public List containers() { - return this.containers; - } - - /** - * Set the containers property: List of container definitions for the Container App. - * - * @param containers the containers value to set. - * @return the JobTemplate object itself. - */ - public JobTemplate withContainers(List containers) { - this.containers = containers; - return this; - } - - /** - * Get the volumes property: List of volume definitions for the Container App. - * - * @return the volumes value. - */ - public List volumes() { - return this.volumes; - } - - /** - * Set the volumes property: List of volume definitions for the Container App. - * - * @param volumes the volumes value to set. - * @return the JobTemplate object itself. - */ - public JobTemplate withVolumes(List volumes) { - this.volumes = volumes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (initContainers() != null) { - initContainers().forEach(e -> e.validate()); - } - if (containers() != null) { - containers().forEach(e -> e.validate()); - } - if (volumes() != null) { - volumes().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("initContainers", this.initContainers, - (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("containers", this.containers, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeArrayField("volumes", this.volumes, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobTemplate from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobTemplate if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the JobTemplate. - */ - public static JobTemplate fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobTemplate deserializedJobTemplate = new JobTemplate(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("initContainers".equals(fieldName)) { - List initContainers = reader.readArray(reader1 -> InitContainer.fromJson(reader1)); - deserializedJobTemplate.initContainers = initContainers; - } else if ("containers".equals(fieldName)) { - List containers = reader.readArray(reader1 -> Container.fromJson(reader1)); - deserializedJobTemplate.containers = containers; - } else if ("volumes".equals(fieldName)) { - List volumes = reader.readArray(reader1 -> Volume.fromJson(reader1)); - deserializedJobTemplate.volumes = volumes; - } else { - reader.skipChildren(); - } - } - - return deserializedJobTemplate; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Jobs.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Jobs.java deleted file mode 100644 index 709a218d0ec4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Jobs.java +++ /dev/null @@ -1,426 +0,0 @@ -// Copyright (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 Jobs. - */ -public interface Jobs { - /** - * Get the list of diagnostics for a given Container App Job. - * - * Get the list of diagnostics for a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 list of diagnostics for a Container App Job as paginated response with {@link PagedIterable}. - */ - PagedIterable listDetectors(String resourceGroupName, String jobName); - - /** - * Get the list of diagnostics for a given Container App Job. - * - * Get the list of diagnostics for a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 list of diagnostics for a Container App Job as paginated response with {@link PagedIterable}. - */ - PagedIterable listDetectors(String resourceGroupName, String jobName, Context context); - - /** - * Get the diagnostics data for a given Container App Job. - * - * Get the diagnostics data for a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param detectorName Name of the Container App Job detector. - * @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 diagnostics data for a Container App Job along with {@link Response}. - */ - Response getDetectorWithResponse(String resourceGroupName, String jobName, String detectorName, - Context context); - - /** - * Get the diagnostics data for a given Container App Job. - * - * Get the diagnostics data for a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param detectorName Name of the Container App Job detector. - * @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 diagnostics data for a Container App Job. - */ - Diagnostics getDetector(String resourceGroupName, String jobName, String detectorName); - - /** - * Get the properties for a given Container App Job. - * - * Get the properties of a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param apiName Proxy API Name for Container App Job. - * @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 Container App Job along with {@link Response}. - */ - Response proxyGetWithResponse(String resourceGroupName, String jobName, String apiName, Context context); - - /** - * Get the properties for a given Container App Job. - * - * Get the properties of a Container App Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param apiName Proxy API Name for Container App Job. - * @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 Container App Job. - */ - Job proxyGet(String resourceGroupName, String jobName, String apiName); - - /** - * Get the Container Apps Jobs 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 Container Apps Jobs in a given subscription as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Get the Container Apps Jobs 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 Container Apps Jobs in a given subscription as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * Get the Container Apps Jobs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps Jobs in a given resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get the Container Apps Jobs in a given resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container Apps Jobs in a given resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get the properties of a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 Container Apps Job along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String jobName, Context context); - - /** - * Get the properties of a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 Container Apps Job. - */ - Job getByResourceGroup(String resourceGroupName, String jobName); - - /** - * Delete a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 jobName); - - /** - * Delete a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 jobName, Context context); - - /** - * Start a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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's Job execution name. - */ - JobExecutionBase start(String resourceGroupName, String jobName); - - /** - * Start a Container Apps Job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param template Properties used to start a job execution. - * @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's Job execution name. - */ - JobExecutionBase start(String resourceGroupName, String jobName, JobExecutionTemplate template, Context context); - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @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 stopExecution(String resourceGroupName, String jobName, String jobExecutionName); - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @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 stopExecution(String resourceGroupName, String jobName, String jobExecutionName, Context context); - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 executions collection ARM resource. - */ - ContainerAppJobExecutions stopMultipleExecutions(String resourceGroupName, String jobName); - - /** - * Terminates execution of a running container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 executions collection ARM resource. - */ - ContainerAppJobExecutions stopMultipleExecutions(String resourceGroupName, String jobName, Context context); - - /** - * List secrets for a container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 Apps Job Secrets Collection ARM resource along with {@link Response}. - */ - Response listSecretsWithResponse(String resourceGroupName, String jobName, Context context); - - /** - * List secrets for a container apps job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @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 Apps Job Secrets Collection ARM resource. - */ - JobSecretsCollection listSecrets(String resourceGroupName, String jobName); - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 Job. - */ - Job resume(String resourceGroupName, String jobName); - - /** - * Resumes a suspended job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 Job. - */ - Job resume(String resourceGroupName, String jobName, Context context); - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 Job. - */ - Job suspend(String resourceGroupName, String jobName); - - /** - * Suspends a job. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Name of the Job. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.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 Job. - */ - Job suspend(String resourceGroupName, String jobName, Context context); - - /** - * Get the properties of a Container Apps Job. - * - * @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 Container Apps Job along with {@link Response}. - */ - Job getById(String id); - - /** - * Get the properties of a Container Apps Job. - * - * @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 Container Apps Job along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Container Apps Job. - * - * @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 Container Apps Job. - * - * @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 Job resource. - * - * @param name resource name. - * @return the first stage of the new Job definition. - */ - Job.DefinitionStages.Blank define(String name); -} 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 deleted file mode 100644 index f9d07fc01f73..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsCollection.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.JobInner; -import java.io.IOException; -import java.util.List; - -/** - * Container Apps Jobs collection ARM resource. - */ -@Fluent -public final class JobsCollection implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of JobsCollection class. - */ - public JobsCollection() { - } - - /** - * 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 JobsCollection object itself. - */ - public JobsCollection 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 JobsCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(JobsCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JobsCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JobsCollection if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the JobsCollection. - */ - public static JobsCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JobsCollection deserializedJobsCollection = new JobsCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> JobInner.fromJson(reader1)); - deserializedJobsCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedJobsCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedJobsCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsExecutions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsExecutions.java deleted file mode 100644 index d97086ea8549..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsExecutions.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of JobsExecutions. - */ -public interface JobsExecutions { - /** - * Get a Container Apps Job's executions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Container Apps Job's executions as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String jobName); - - /** - * Get a Container Apps Job's executions. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param filter The filter to apply on the operation. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Container Apps Job's executions as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String jobName, String filter, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JwtClaimChecks.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JwtClaimChecks.java deleted file mode 100644 index ff6540250084..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JwtClaimChecks.java +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The configuration settings of the checks that should be made while validating the JWT Claims. - */ -@Fluent -public final class JwtClaimChecks implements JsonSerializable { - /* - * The list of the allowed groups. - */ - private List allowedGroups; - - /* - * The list of the allowed client applications. - */ - private List allowedClientApplications; - - /** - * Creates an instance of JwtClaimChecks class. - */ - public JwtClaimChecks() { - } - - /** - * Get the allowedGroups property: The list of the allowed groups. - * - * @return the allowedGroups value. - */ - public List allowedGroups() { - return this.allowedGroups; - } - - /** - * Set the allowedGroups property: The list of the allowed groups. - * - * @param allowedGroups the allowedGroups value to set. - * @return the JwtClaimChecks object itself. - */ - public JwtClaimChecks withAllowedGroups(List allowedGroups) { - this.allowedGroups = allowedGroups; - return this; - } - - /** - * Get the allowedClientApplications property: The list of the allowed client applications. - * - * @return the allowedClientApplications value. - */ - public List allowedClientApplications() { - return this.allowedClientApplications; - } - - /** - * Set the allowedClientApplications property: The list of the allowed client applications. - * - * @param allowedClientApplications the allowedClientApplications value to set. - * @return the JwtClaimChecks object itself. - */ - public JwtClaimChecks withAllowedClientApplications(List allowedClientApplications) { - this.allowedClientApplications = allowedClientApplications; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("allowedGroups", this.allowedGroups, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("allowedClientApplications", this.allowedClientApplications, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of JwtClaimChecks from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of JwtClaimChecks if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the JwtClaimChecks. - */ - public static JwtClaimChecks fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - JwtClaimChecks deserializedJwtClaimChecks = new JwtClaimChecks(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("allowedGroups".equals(fieldName)) { - List allowedGroups = reader.readArray(reader1 -> reader1.getString()); - deserializedJwtClaimChecks.allowedGroups = allowedGroups; - } else if ("allowedClientApplications".equals(fieldName)) { - List allowedClientApplications = reader.readArray(reader1 -> reader1.getString()); - deserializedJwtClaimChecks.allowedClientApplications = allowedClientApplications; - } else { - reader.skipChildren(); - } - } - - return deserializedJwtClaimChecks; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/KedaConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/KedaConfiguration.java deleted file mode 100644 index efa2c552c104..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/KedaConfiguration.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Configuration properties Keda component. - */ -@Immutable -public final class KedaConfiguration implements JsonSerializable { - /* - * The version of Keda - */ - private String version; - - /** - * Creates an instance of KedaConfiguration class. - */ - public KedaConfiguration() { - } - - /** - * Get the version property: The version of Keda. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of KedaConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of KedaConfiguration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the KedaConfiguration. - */ - public static KedaConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - KedaConfiguration deserializedKedaConfiguration = new KedaConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("version".equals(fieldName)) { - deserializedKedaConfiguration.version = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedKedaConfiguration; - }); - } -} 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 deleted file mode 100644 index 6bdc6796467c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Kind.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -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. - */ - 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 deleted file mode 100644 index cb7577f3909b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Level.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.models; - -import com.azure.core.util.ExpandableStringEnum; -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. - */ - 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 deleted file mode 100644 index 7bad60f10da3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ListUsagesResult.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; -import java.io.IOException; -import java.util.List; - -/** - * The ListUsagesResult model. - */ -@Fluent -public final class ListUsagesResult implements JsonSerializable { - /* - * The list of compute resource usages. - */ - 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. - */ - private String nextLink; - - /** - * Creates an instance of ListUsagesResult class. - */ - public ListUsagesResult() { - } - - /** - * Get the value property: The list of compute resource usages. - * - * @return the value value. - */ - public List value() { - return this.value; - } - - /** - * Set the value property: The list of compute resource usages. - * - * @param value the value value to set. - * @return the ListUsagesResult object itself. - */ - public ListUsagesResult withValue(List value) { - this.value = value; - return this; - } - - /** - * Get the nextLink property: The URI to fetch the next page of compute resource usage information. Call ListNext() - * with this to fetch the next page of compute resource usage information. - * - * @return the nextLink value. - */ - public String nextLink() { - return this.nextLink; - } - - /** - * Set the nextLink property: The URI to fetch the next page of compute resource usage information. Call ListNext() - * with this to fetch the next page of compute resource usage information. - * - * @param nextLink the nextLink value to set. - * @return the ListUsagesResult object itself. - */ - public ListUsagesResult withNextLink(String nextLink) { - this.nextLink = nextLink; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (value() != null) { - value().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ListUsagesResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ListUsagesResult if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ListUsagesResult. - */ - public static ListUsagesResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ListUsagesResult deserializedListUsagesResult = new ListUsagesResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> UsageInner.fromJson(reader1)); - deserializedListUsagesResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedListUsagesResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedListUsagesResult; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogAnalyticsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogAnalyticsConfiguration.java deleted file mode 100644 index da8a3c852632..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogAnalyticsConfiguration.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Log Analytics configuration, must only be provided when destination is configured as 'log-analytics'. - */ -@Fluent -public final class LogAnalyticsConfiguration implements JsonSerializable { - /* - * Log analytics customer id - */ - private String customerId; - - /* - * Log analytics customer key - */ - private String sharedKey; - - /* - * Boolean indicating whether to parse json string log into dynamic json columns - */ - private Boolean dynamicJsonColumns; - - /** - * Creates an instance of LogAnalyticsConfiguration class. - */ - public LogAnalyticsConfiguration() { - } - - /** - * Get the customerId property: Log analytics customer id. - * - * @return the customerId value. - */ - public String customerId() { - return this.customerId; - } - - /** - * Set the customerId property: Log analytics customer id. - * - * @param customerId the customerId value to set. - * @return the LogAnalyticsConfiguration object itself. - */ - public LogAnalyticsConfiguration withCustomerId(String customerId) { - this.customerId = customerId; - return this; - } - - /** - * Get the sharedKey property: Log analytics customer key. - * - * @return the sharedKey value. - */ - public String sharedKey() { - return this.sharedKey; - } - - /** - * Set the sharedKey property: Log analytics customer key. - * - * @param sharedKey the sharedKey value to set. - * @return the LogAnalyticsConfiguration object itself. - */ - public LogAnalyticsConfiguration withSharedKey(String sharedKey) { - this.sharedKey = sharedKey; - return this; - } - - /** - * Get the dynamicJsonColumns property: Boolean indicating whether to parse json string log into dynamic json - * columns. - * - * @return the dynamicJsonColumns value. - */ - public Boolean dynamicJsonColumns() { - return this.dynamicJsonColumns; - } - - /** - * Set the dynamicJsonColumns property: Boolean indicating whether to parse json string log into dynamic json - * columns. - * - * @param dynamicJsonColumns the dynamicJsonColumns value to set. - * @return the LogAnalyticsConfiguration object itself. - */ - public LogAnalyticsConfiguration withDynamicJsonColumns(Boolean dynamicJsonColumns) { - this.dynamicJsonColumns = dynamicJsonColumns; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("customerId", this.customerId); - jsonWriter.writeStringField("sharedKey", this.sharedKey); - jsonWriter.writeBooleanField("dynamicJsonColumns", this.dynamicJsonColumns); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LogAnalyticsConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LogAnalyticsConfiguration if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the LogAnalyticsConfiguration. - */ - public static LogAnalyticsConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LogAnalyticsConfiguration deserializedLogAnalyticsConfiguration = new LogAnalyticsConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("customerId".equals(fieldName)) { - deserializedLogAnalyticsConfiguration.customerId = reader.getString(); - } else if ("sharedKey".equals(fieldName)) { - deserializedLogAnalyticsConfiguration.sharedKey = reader.getString(); - } else if ("dynamicJsonColumns".equals(fieldName)) { - deserializedLogAnalyticsConfiguration.dynamicJsonColumns - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedLogAnalyticsConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogLevel.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogLevel.java deleted file mode 100644 index 7243f9058fb1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogLevel.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. - */ -public final class LogLevel extends ExpandableStringEnum { - /** - * Static value info for LogLevel. - */ - public static final LogLevel INFO = fromString("info"); - - /** - * Static value debug for LogLevel. - */ - public static final LogLevel DEBUG = fromString("debug"); - - /** - * Static value warn for LogLevel. - */ - public static final LogLevel WARN = fromString("warn"); - - /** - * Static value error for LogLevel. - */ - public static final LogLevel ERROR = fromString("error"); - - /** - * Creates a new instance of LogLevel value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LogLevel() { - } - - /** - * Creates or finds a LogLevel from its string representation. - * - * @param name a name to look for. - * @return the corresponding LogLevel. - */ - public static LogLevel fromString(String name) { - return fromString(name, LogLevel.class); - } - - /** - * Gets known LogLevel values. - * - * @return known LogLevel values. - */ - public static Collection values() { - return values(LogLevel.class); - } -} diff --git a/sdk/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 deleted file mode 100644 index 71cec07dd77a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoggerSetting.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Logger settings for java workloads. - */ -@Fluent -public final class LoggerSetting implements JsonSerializable { - /* - * Logger name. - */ - private String logger; - - /* - * The specified logger's log level. - */ - 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); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("logger", this.logger); - jsonWriter.writeStringField("level", this.level == null ? null : this.level.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LoggerSetting from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LoggerSetting if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the LoggerSetting. - */ - public static LoggerSetting fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LoggerSetting deserializedLoggerSetting = new LoggerSetting(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("logger".equals(fieldName)) { - deserializedLoggerSetting.logger = reader.getString(); - } else if ("level".equals(fieldName)) { - deserializedLoggerSetting.level = Level.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedLoggerSetting; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicApp.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicApp.java deleted file mode 100644 index e1e846984fc1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicApp.java +++ /dev/null @@ -1,234 +0,0 @@ -// Copyright (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.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.LogicAppInner; - -/** - * An immutable client-side representation of LogicApp. - */ -public interface LogicApp { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the properties property: The resource-specific properties for this resource. - * - * @return the properties value. - */ - Object properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.LogicAppInner object. - * - * @return the inner object. - */ - LogicAppInner innerModel(); - - /** - * The entirety of the LogicApp definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The LogicApp definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the LogicApp definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the LogicApp definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, containerAppName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @return the next definition stage. - */ - WithCreate withExistingContainerApp(String resourceGroupName, String containerAppName); - } - - /** - * The stage of the LogicApp definition which contains all the minimum required properties for the resource to - * be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - LogicApp create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - LogicApp create(Context context); - } - - /** - * The stage of the LogicApp definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - WithCreate withProperties(Object properties); - } - } - - /** - * Begins update for the LogicApp resource. - * - * @return the stage of resource update. - */ - LogicApp.Update update(); - - /** - * The template for LogicApp update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - LogicApp apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - LogicApp apply(Context context); - } - - /** - * The LogicApp update stages. - */ - interface UpdateStages { - /** - * The stage of the LogicApp update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: The resource-specific properties for this resource.. - * - * @param properties The resource-specific properties for this resource. - * @return the next definition stage. - */ - Update withProperties(Object properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - LogicApp refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - LogicApp refresh(Context context); - - /** - * Creates or updates the artifacts for the logic app. - * - * @param workflowArtifacts Application settings and files of the workflow. - * @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 Response}. - */ - Response deployWorkflowArtifactsWithResponse(WorkflowArtifacts workflowArtifacts, Context context); - - /** - * Creates or updates the artifacts for the logic app. - * - * @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 deployWorkflowArtifacts(); - - /** - * Gets logic app's connections. - * - * @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 logic app's connections along with {@link Response}. - */ - Response listWorkflowsConnectionsWithResponse(Context context); - - /** - * Gets logic app's connections. - * - * @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 logic app's connections. - */ - WorkflowEnvelope listWorkflowsConnections(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicApps.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicApps.java deleted file mode 100644 index b853015478be..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicApps.java +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright (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 LogicApps. - */ -public interface LogicApps { - /** - * Gets a logic app extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 a logic app extension resource along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - Context context); - - /** - * Gets a logic app extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 a logic app extension resource. - */ - LogicApp get(String resourceGroupName, String containerAppName, String logicAppName); - - /** - * Deletes a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 {@link Response}. - */ - Response deleteWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - Context context); - - /** - * Deletes a Logic App extension resource. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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. - */ - void delete(String resourceGroupName, String containerAppName, String logicAppName); - - /** - * List the workflows for a logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 collection of workflow information elements as paginated response with {@link PagedIterable}. - */ - PagedIterable listWorkflows(String resourceGroupName, String containerAppName, - String logicAppName); - - /** - * List the workflows for a logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 collection of workflow information elements as paginated response with {@link PagedIterable}. - */ - PagedIterable listWorkflows(String resourceGroupName, String containerAppName, - String logicAppName, Context context); - - /** - * Get workflow information by its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowName Workflow name. - * @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 workflow information by its name along with {@link Response}. - */ - Response getWorkflowWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, String workflowName, Context context); - - /** - * Get workflow information by its name. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowName Workflow name. - * @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 workflow information by its name. - */ - WorkflowEnvelope getWorkflow(String resourceGroupName, String containerAppName, String logicAppName, - String workflowName); - - /** - * Creates or updates the artifacts for the logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic App, the extension resource. - * @param workflowArtifacts Application settings and files of the workflow. - * @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 Response}. - */ - Response deployWorkflowArtifactsWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, WorkflowArtifacts workflowArtifacts, Context context); - - /** - * Creates or updates the artifacts for the logic app. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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. - */ - void deployWorkflowArtifacts(String resourceGroupName, String containerAppName, String logicAppName); - - /** - * Gets logic app's connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 logic app's connections along with {@link Response}. - */ - Response listWorkflowsConnectionsWithResponse(String resourceGroupName, String containerAppName, - String logicAppName, Context context); - - /** - * Gets logic app's connections. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param logicAppName Name of the Logic 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 logic app's connections. - */ - WorkflowEnvelope listWorkflowsConnections(String resourceGroupName, String containerAppName, String logicAppName); - - /** - * Proxies a the API call to the logic 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 logicAppName Name of the LogicApp App, the extension resource. - * @param xMsLogicAppsProxyPath The proxy path for the API call. - * @param xMsLogicAppsProxyMethod The proxy method for the API call. - * @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 any object along with {@link Response}. - */ - Response invokeWithResponse(String resourceGroupName, String containerAppName, String logicAppName, - String xMsLogicAppsProxyPath, LogicAppsProxyMethod xMsLogicAppsProxyMethod, Context context); - - /** - * Proxies a the API call to the logic 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 logicAppName Name of the LogicApp App, the extension resource. - * @param xMsLogicAppsProxyPath The proxy path for the API call. - * @param xMsLogicAppsProxyMethod The proxy method for the API call. - * @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 any object. - */ - Object invoke(String resourceGroupName, String containerAppName, String logicAppName, String xMsLogicAppsProxyPath, - LogicAppsProxyMethod xMsLogicAppsProxyMethod); - - /** - * Gets a logic app extension resource. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource along with {@link Response}. - */ - LogicApp getById(String id); - - /** - * Gets a logic app extension resource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a logic app extension resource along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes a Logic App extension resource. - * - * @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); - - /** - * Deletes a Logic App extension resource. - * - * @param id the resource ID. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.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 Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new LogicApp resource. - * - * @param name resource name. - * @return the first stage of the new LogicApp definition. - */ - LogicApp.DefinitionStages.Blank define(String name); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicAppsProxyMethod.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicAppsProxyMethod.java deleted file mode 100644 index f4702aad851d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogicAppsProxyMethod.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Defines values for LogicAppsProxyMethod. - */ -public final class LogicAppsProxyMethod extends ExpandableStringEnum { - /** - * Static value GET for LogicAppsProxyMethod. - */ - public static final LogicAppsProxyMethod GET = fromString("GET"); - - /** - * Static value POST for LogicAppsProxyMethod. - */ - public static final LogicAppsProxyMethod POST = fromString("POST"); - - /** - * Creates a new instance of LogicAppsProxyMethod value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public LogicAppsProxyMethod() { - } - - /** - * Creates or finds a LogicAppsProxyMethod from its string representation. - * - * @param name a name to look for. - * @return the corresponding LogicAppsProxyMethod. - */ - public static LogicAppsProxyMethod fromString(String name) { - return fromString(name, LogicAppsProxyMethod.class); - } - - /** - * Gets known LogicAppsProxyMethod values. - * - * @return known LogicAppsProxyMethod values. - */ - public static Collection values() { - return values(LogicAppsProxyMethod.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 deleted file mode 100644 index 5ba8609f9238..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Login.java +++ /dev/null @@ -1,260 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The configuration settings of the login flow of users using ContainerApp Service Authentication/Authorization. - */ -@Fluent -public final class Login implements JsonSerializable { - /* - * The routes that specify the endpoints used for login and logout requests. - */ - private LoginRoutes routes; - - /* - * The configuration settings of the token store. - */ - private TokenStore tokenStore; - - /* - * true if the fragments from the request are preserved after the login request is made; otherwise, - * false. - */ - 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. - * This is an advanced setting typically only needed by Windows Store application backends. - * Note that URLs within the current domain are always implicitly allowed. - */ - private List allowedExternalRedirectUrls; - - /* - * The configuration settings of the session cookie's expiration. - */ - private CookieExpiration cookieExpiration; - - /* - * The configuration settings of the nonce used in the login flow. - */ - private Nonce nonce; - - /** - * Creates an instance of Login class. - */ - public Login() { - } - - /** - * Get the routes property: The routes that specify the endpoints used for login and logout requests. - * - * @return the routes value. - */ - public LoginRoutes routes() { - return this.routes; - } - - /** - * Set the routes property: The routes that specify the endpoints used for login and logout requests. - * - * @param routes the routes value to set. - * @return the Login object itself. - */ - public Login withRoutes(LoginRoutes routes) { - this.routes = routes; - return this; - } - - /** - * Get the tokenStore property: The configuration settings of the token store. - * - * @return the tokenStore value. - */ - public TokenStore tokenStore() { - return this.tokenStore; - } - - /** - * Set the tokenStore property: The configuration settings of the token store. - * - * @param tokenStore the tokenStore value to set. - * @return the Login object itself. - */ - public Login withTokenStore(TokenStore tokenStore) { - this.tokenStore = tokenStore; - return this; - } - - /** - * Get the preserveUrlFragmentsForLogins property: <code>true</code> if the fragments from the request - * are preserved after the login request is made; otherwise, <code>false</code>. - * - * @return the preserveUrlFragmentsForLogins value. - */ - public Boolean preserveUrlFragmentsForLogins() { - return this.preserveUrlFragmentsForLogins; - } - - /** - * Set the preserveUrlFragmentsForLogins property: <code>true</code> if the fragments from the request - * are preserved after the login request is made; otherwise, <code>false</code>. - * - * @param preserveUrlFragmentsForLogins the preserveUrlFragmentsForLogins value to set. - * @return the Login object itself. - */ - public Login withPreserveUrlFragmentsForLogins(Boolean preserveUrlFragmentsForLogins) { - this.preserveUrlFragmentsForLogins = preserveUrlFragmentsForLogins; - return this; - } - - /** - * Get the allowedExternalRedirectUrls property: 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. - * - * @return the allowedExternalRedirectUrls value. - */ - public List allowedExternalRedirectUrls() { - return this.allowedExternalRedirectUrls; - } - - /** - * Set the allowedExternalRedirectUrls property: 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. - * - * @param allowedExternalRedirectUrls the allowedExternalRedirectUrls value to set. - * @return the Login object itself. - */ - public Login withAllowedExternalRedirectUrls(List allowedExternalRedirectUrls) { - this.allowedExternalRedirectUrls = allowedExternalRedirectUrls; - return this; - } - - /** - * Get the cookieExpiration property: The configuration settings of the session cookie's expiration. - * - * @return the cookieExpiration value. - */ - public CookieExpiration cookieExpiration() { - return this.cookieExpiration; - } - - /** - * Set the cookieExpiration property: The configuration settings of the session cookie's expiration. - * - * @param cookieExpiration the cookieExpiration value to set. - * @return the Login object itself. - */ - public Login withCookieExpiration(CookieExpiration cookieExpiration) { - this.cookieExpiration = cookieExpiration; - return this; - } - - /** - * Get the nonce property: The configuration settings of the nonce used in the login flow. - * - * @return the nonce value. - */ - public Nonce nonce() { - return this.nonce; - } - - /** - * Set the nonce property: The configuration settings of the nonce used in the login flow. - * - * @param nonce the nonce value to set. - * @return the Login object itself. - */ - public Login withNonce(Nonce nonce) { - this.nonce = nonce; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (routes() != null) { - routes().validate(); - } - if (tokenStore() != null) { - tokenStore().validate(); - } - if (cookieExpiration() != null) { - cookieExpiration().validate(); - } - if (nonce() != null) { - nonce().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("routes", this.routes); - jsonWriter.writeJsonField("tokenStore", this.tokenStore); - jsonWriter.writeBooleanField("preserveUrlFragmentsForLogins", this.preserveUrlFragmentsForLogins); - jsonWriter.writeArrayField("allowedExternalRedirectUrls", this.allowedExternalRedirectUrls, - (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("cookieExpiration", this.cookieExpiration); - jsonWriter.writeJsonField("nonce", this.nonce); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Login from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Login if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Login. - */ - public static Login fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Login deserializedLogin = new Login(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("routes".equals(fieldName)) { - deserializedLogin.routes = LoginRoutes.fromJson(reader); - } else if ("tokenStore".equals(fieldName)) { - deserializedLogin.tokenStore = TokenStore.fromJson(reader); - } else if ("preserveUrlFragmentsForLogins".equals(fieldName)) { - deserializedLogin.preserveUrlFragmentsForLogins = reader.getNullable(JsonReader::getBoolean); - } else if ("allowedExternalRedirectUrls".equals(fieldName)) { - List allowedExternalRedirectUrls = reader.readArray(reader1 -> reader1.getString()); - deserializedLogin.allowedExternalRedirectUrls = allowedExternalRedirectUrls; - } else if ("cookieExpiration".equals(fieldName)) { - deserializedLogin.cookieExpiration = CookieExpiration.fromJson(reader); - } else if ("nonce".equals(fieldName)) { - deserializedLogin.nonce = Nonce.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedLogin; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginRoutes.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginRoutes.java deleted file mode 100644 index 0cf8abaaa2af..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginRoutes.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The routes that specify the endpoints used for login and logout requests. - */ -@Fluent -public final class LoginRoutes implements JsonSerializable { - /* - * The endpoint at which a logout request should be made. - */ - private String logoutEndpoint; - - /** - * Creates an instance of LoginRoutes class. - */ - public LoginRoutes() { - } - - /** - * Get the logoutEndpoint property: The endpoint at which a logout request should be made. - * - * @return the logoutEndpoint value. - */ - public String logoutEndpoint() { - return this.logoutEndpoint; - } - - /** - * Set the logoutEndpoint property: The endpoint at which a logout request should be made. - * - * @param logoutEndpoint the logoutEndpoint value to set. - * @return the LoginRoutes object itself. - */ - public LoginRoutes withLogoutEndpoint(String logoutEndpoint) { - this.logoutEndpoint = logoutEndpoint; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("logoutEndpoint", this.logoutEndpoint); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LoginRoutes from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LoginRoutes if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the LoginRoutes. - */ - public static LoginRoutes fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LoginRoutes deserializedLoginRoutes = new LoginRoutes(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("logoutEndpoint".equals(fieldName)) { - deserializedLoginRoutes.logoutEndpoint = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedLoginRoutes; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginScopes.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginScopes.java deleted file mode 100644 index f35b2f4abad4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginScopes.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The configuration settings of the login flow, including the scopes that should be requested. - */ -@Fluent -public final class LoginScopes implements JsonSerializable { - /* - * A list of the scopes that should be requested while authenticating. - */ - private List scopes; - - /** - * Creates an instance of LoginScopes class. - */ - public LoginScopes() { - } - - /** - * Get the scopes property: A list of the scopes that should be requested while authenticating. - * - * @return the scopes value. - */ - public List scopes() { - return this.scopes; - } - - /** - * Set the scopes property: A list of the scopes that should be requested while authenticating. - * - * @param scopes the scopes value to set. - * @return the LoginScopes object itself. - */ - public LoginScopes withScopes(List scopes) { - this.scopes = scopes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("scopes", this.scopes, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LoginScopes from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LoginScopes if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the LoginScopes. - */ - public static LoginScopes fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LoginScopes deserializedLoginScopes = new LoginScopes(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("scopes".equals(fieldName)) { - List scopes = reader.readArray(reader1 -> reader1.getString()); - deserializedLoginScopes.scopes = scopes; - } else { - reader.skipChildren(); - } - } - - return deserializedLoginScopes; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogsConfiguration.java deleted file mode 100644 index eb495caff890..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogsConfiguration.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Configuration of Open Telemetry logs. - */ -@Fluent -public final class LogsConfiguration implements JsonSerializable { - /* - * Open telemetry logs destinations - */ - private List destinations; - - /** - * Creates an instance of LogsConfiguration class. - */ - public LogsConfiguration() { - } - - /** - * Get the destinations property: Open telemetry logs destinations. - * - * @return the destinations value. - */ - public List destinations() { - return this.destinations; - } - - /** - * Set the destinations property: Open telemetry logs destinations. - * - * @param destinations the destinations value to set. - * @return the LogsConfiguration object itself. - */ - public LogsConfiguration withDestinations(List destinations) { - this.destinations = destinations; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("destinations", this.destinations, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of LogsConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of LogsConfiguration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the LogsConfiguration. - */ - public static LogsConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - LogsConfiguration deserializedLogsConfiguration = new LogsConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("destinations".equals(fieldName)) { - List destinations = reader.readArray(reader1 -> reader1.getString()); - deserializedLogsConfiguration.destinations = destinations; - } else { - reader.skipChildren(); - } - } - - return deserializedLogsConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificate.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificate.java deleted file mode 100644 index d3863e678425..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificate.java +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright (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.ManagedCertificateInner; -import java.util.Map; - -/** - * An immutable client-side representation of ManagedCertificate. - */ -public interface ManagedCertificate { - /** - * Gets the id property: Fully qualified resource Id for the resource. - * - * @return the id value. - */ - String id(); - - /** - * Gets the name property: The name of the resource. - * - * @return the name value. - */ - String name(); - - /** - * Gets the type property: The type of the resource. - * - * @return the type value. - */ - String type(); - - /** - * Gets the location property: The geo-location where the resource lives. - * - * @return the location value. - */ - String location(); - - /** - * Gets the tags property: Resource tags. - * - * @return the tags value. - */ - Map tags(); - - /** - * Gets the properties property: Certificate resource specific properties. - * - * @return the properties value. - */ - ManagedCertificateProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the region of the resource. - * - * @return the region of the resource. - */ - Region region(); - - /** - * Gets the name of the resource region. - * - * @return the name of the resource region. - */ - String regionName(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ManagedCertificateInner object. - * - * @return the inner object. - */ - ManagedCertificateInner innerModel(); - - /** - * The entirety of the ManagedCertificate definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The ManagedCertificate definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ManagedCertificate definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the ManagedCertificate definition allowing to specify location. - */ - interface WithLocation { - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(Region location); - - /** - * Specifies the region for the resource. - * - * @param location The geo-location where the resource lives. - * @return the next definition stage. - */ - WithParentResource withRegion(String location); - } - - /** - * The stage of the ManagedCertificate 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 ManagedCertificate definition which contains all the minimum required properties for the - * resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - ManagedCertificate create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ManagedCertificate create(Context context); - } - - /** - * The stage of the ManagedCertificate 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 ManagedCertificate definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Certificate resource specific properties. - * - * @param properties Certificate resource specific properties. - * @return the next definition stage. - */ - WithCreate withProperties(ManagedCertificateProperties properties); - } - } - - /** - * Begins update for the ManagedCertificate resource. - * - * @return the stage of resource update. - */ - ManagedCertificate.Update update(); - - /** - * The template for ManagedCertificate update. - */ - interface Update extends UpdateStages.WithTags { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ManagedCertificate apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ManagedCertificate apply(Context context); - } - - /** - * The ManagedCertificate update stages. - */ - interface UpdateStages { - /** - * The stage of the ManagedCertificate update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Application-specific metadata in the form of key-value pairs.. - * - * @param tags Application-specific metadata in the form of key-value pairs. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ManagedCertificate refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ManagedCertificate refresh(Context context); -} 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 deleted file mode 100644 index 840749f6ffbb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateCollection.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedCertificateInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of Managed Certificates. - */ -@Fluent -public final class ManagedCertificateCollection implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of ManagedCertificateCollection class. - */ - public ManagedCertificateCollection() { - } - - /** - * 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 ManagedCertificateCollection object itself. - */ - public ManagedCertificateCollection 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 ManagedCertificateCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedCertificateCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedCertificateCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedCertificateCollection if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ManagedCertificateCollection. - */ - public static ManagedCertificateCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedCertificateCollection deserializedManagedCertificateCollection = new ManagedCertificateCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ManagedCertificateInner.fromJson(reader1)); - deserializedManagedCertificateCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedManagedCertificateCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedCertificateCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateDomainControlValidation.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateDomainControlValidation.java deleted file mode 100644 index bcab6ba0fdbb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateDomainControlValidation.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Selected type of domain control validation for managed certificates. - */ -public final class ManagedCertificateDomainControlValidation - extends ExpandableStringEnum { - /** - * Static value CNAME for ManagedCertificateDomainControlValidation. - */ - public static final ManagedCertificateDomainControlValidation CNAME = fromString("CNAME"); - - /** - * Static value HTTP for ManagedCertificateDomainControlValidation. - */ - public static final ManagedCertificateDomainControlValidation HTTP = fromString("HTTP"); - - /** - * Static value TXT for ManagedCertificateDomainControlValidation. - */ - public static final ManagedCertificateDomainControlValidation TXT = fromString("TXT"); - - /** - * Creates a new instance of ManagedCertificateDomainControlValidation value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ManagedCertificateDomainControlValidation() { - } - - /** - * Creates or finds a ManagedCertificateDomainControlValidation from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedCertificateDomainControlValidation. - */ - public static ManagedCertificateDomainControlValidation fromString(String name) { - return fromString(name, ManagedCertificateDomainControlValidation.class); - } - - /** - * Gets known ManagedCertificateDomainControlValidation values. - * - * @return known ManagedCertificateDomainControlValidation values. - */ - public static Collection values() { - return values(ManagedCertificateDomainControlValidation.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificatePatch.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificatePatch.java deleted file mode 100644 index a42c2bde29e2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificatePatch.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * A managed certificate to update. - */ -@Fluent -public final class ManagedCertificatePatch implements JsonSerializable { - /* - * Application-specific metadata in the form of key-value pairs. - */ - private Map tags; - - /** - * Creates an instance of ManagedCertificatePatch class. - */ - public ManagedCertificatePatch() { - } - - /** - * Get the tags property: Application-specific metadata in the form of key-value pairs. - * - * @return the tags value. - */ - public Map tags() { - return this.tags; - } - - /** - * Set the tags property: Application-specific metadata in the form of key-value pairs. - * - * @param tags the tags value to set. - * @return the ManagedCertificatePatch object itself. - */ - public ManagedCertificatePatch withTags(Map tags) { - this.tags = tags; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedCertificatePatch from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedCertificatePatch if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedCertificatePatch. - */ - public static ManagedCertificatePatch fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedCertificatePatch deserializedManagedCertificatePatch = new ManagedCertificatePatch(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("tags".equals(fieldName)) { - Map tags = reader.readMap(reader1 -> reader1.getString()); - deserializedManagedCertificatePatch.tags = tags; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedCertificatePatch; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateProperties.java deleted file mode 100644 index 1670c52f5f6b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateProperties.java +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Certificate resource specific properties. - */ -@Fluent -public final class ManagedCertificateProperties implements JsonSerializable { - /* - * Provisioning state of the certificate. - */ - private CertificateProvisioningState provisioningState; - - /* - * Subject name of the certificate. - */ - private String subjectName; - - /* - * Any error occurred during the certificate provision. - */ - private String error; - - /* - * Selected type of domain control validation for managed certificates. - */ - private ManagedCertificateDomainControlValidation domainControlValidation; - - /* - * A TXT token used for DNS TXT domain control validation when issuing this type of managed certificates. - */ - private String validationToken; - - /** - * Creates an instance of ManagedCertificateProperties class. - */ - public ManagedCertificateProperties() { - } - - /** - * Get the provisioningState property: Provisioning state of the certificate. - * - * @return the provisioningState value. - */ - public CertificateProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * Get the subjectName property: Subject name of the certificate. - * - * @return the subjectName value. - */ - public String subjectName() { - return this.subjectName; - } - - /** - * Set the subjectName property: Subject name of the certificate. - * - * @param subjectName the subjectName value to set. - * @return the ManagedCertificateProperties object itself. - */ - public ManagedCertificateProperties withSubjectName(String subjectName) { - this.subjectName = subjectName; - return this; - } - - /** - * Get the error property: Any error occurred during the certificate provision. - * - * @return the error value. - */ - public String error() { - return this.error; - } - - /** - * Get the domainControlValidation property: Selected type of domain control validation for managed certificates. - * - * @return the domainControlValidation value. - */ - public ManagedCertificateDomainControlValidation domainControlValidation() { - return this.domainControlValidation; - } - - /** - * Set the domainControlValidation property: Selected type of domain control validation for managed certificates. - * - * @param domainControlValidation the domainControlValidation value to set. - * @return the ManagedCertificateProperties object itself. - */ - public ManagedCertificateProperties - withDomainControlValidation(ManagedCertificateDomainControlValidation domainControlValidation) { - this.domainControlValidation = domainControlValidation; - return this; - } - - /** - * Get the validationToken property: A TXT token used for DNS TXT domain control validation when issuing this type - * of managed certificates. - * - * @return the validationToken value. - */ - public String validationToken() { - return this.validationToken; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("subjectName", this.subjectName); - jsonWriter.writeStringField("domainControlValidation", - this.domainControlValidation == null ? null : this.domainControlValidation.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedCertificateProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedCertificateProperties if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedCertificateProperties. - */ - public static ManagedCertificateProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedCertificateProperties deserializedManagedCertificateProperties = new ManagedCertificateProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedManagedCertificateProperties.provisioningState - = CertificateProvisioningState.fromString(reader.getString()); - } else if ("subjectName".equals(fieldName)) { - deserializedManagedCertificateProperties.subjectName = reader.getString(); - } else if ("error".equals(fieldName)) { - deserializedManagedCertificateProperties.error = reader.getString(); - } else if ("domainControlValidation".equals(fieldName)) { - deserializedManagedCertificateProperties.domainControlValidation - = ManagedCertificateDomainControlValidation.fromString(reader.getString()); - } else if ("validationToken".equals(fieldName)) { - deserializedManagedCertificateProperties.validationToken = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedCertificateProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificates.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificates.java deleted file mode 100644 index 6a41e1d6758c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificates.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (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 ManagedCertificates. - */ -public interface ManagedCertificates { - /** - * Get the specified Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @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 specified Managed Certificate along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String environmentName, - String managedCertificateName, Context context); - - /** - * Get the specified Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @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 specified Managed Certificate. - */ - ManagedCertificate get(String resourceGroupName, String environmentName, String managedCertificateName); - - /** - * Deletes the specified Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @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 Response}. - */ - Response deleteWithResponse(String resourceGroupName, String environmentName, String managedCertificateName, - Context context); - - /** - * Deletes the specified Managed Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param managedCertificateName Name of the Managed Certificate. - * @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 environmentName, String managedCertificateName); - - /** - * Get the Managed Certificates in 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.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 Managed Certificates in a given managed environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Get the Managed Certificates in 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.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 Managed Certificates in a given managed environment as paginated response with {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName, Context context); - - /** - * Get the specified Managed Certificate. - * - * @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 specified Managed Certificate along with {@link Response}. - */ - ManagedCertificate getById(String id); - - /** - * Get the specified Managed Certificate. - * - * @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 specified Managed Certificate along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Deletes the specified Managed Certificate. - * - * @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); - - /** - * Deletes the specified Managed Certificate. - * - * @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 {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ManagedCertificate resource. - * - * @param name resource name. - * @return the first stage of the new ManagedCertificate definition. - */ - ManagedCertificate.DefinitionStages.Blank define(String name); -} 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 deleted file mode 100644 index 116461604263..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironment.java +++ /dev/null @@ -1,889 +0,0 @@ -// Copyright (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.management.Region; -import com.azure.core.management.SystemData; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; -import java.util.List; -import java.util.Map; - -/** - * An immutable client-side representation of ManagedEnvironment. - */ -public interface ManagedEnvironment { - /** - * 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 kind property: Kind of the Environment. - * - * @return the kind value. - */ - String kind(); - - /** - * Gets the identity property: Managed identities for the Managed Environment to interact with other Azure services - * without maintaining any secrets or credentials in code. - * - * @return the identity value. - */ - ManagedServiceIdentity identity(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the provisioningState property: Provisioning state of the Environment. - * - * @return the provisioningState value. - */ - EnvironmentProvisioningState provisioningState(); - - /** - * Gets the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export Service to - * Service communication telemetry. - * - * @return the daprAIInstrumentationKey value. - */ - String daprAIInstrumentationKey(); - - /** - * Gets the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service - * to Service communication telemetry. - * - * @return the daprAIConnectionString value. - */ - String daprAIConnectionString(); - - /** - * Gets the vnetConfiguration property: Vnet configuration for the environment. - * - * @return the vnetConfiguration value. - */ - VnetConfiguration vnetConfiguration(); - - /** - * Gets the deploymentErrors property: Any errors that occurred during deployment or deployment validation. - * - * @return the deploymentErrors value. - */ - String deploymentErrors(); - - /** - * Gets the defaultDomain property: Default Domain Name for the cluster. - * - * @return the defaultDomain value. - */ - String defaultDomain(); - - /** - * Gets the staticIp property: Static IP of the Environment. - * - * @return the staticIp value. - */ - String staticIp(); - - /** - * Gets the appLogsConfiguration property: Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported. - * - * @return the appLogsConfiguration value. - */ - AppLogsConfiguration appLogsConfiguration(); - - /** - * Gets the appInsightsConfiguration property: Environment level Application Insights configuration. - * - * @return the appInsightsConfiguration value. - */ - AppInsightsConfiguration appInsightsConfiguration(); - - /** - * Gets the openTelemetryConfiguration property: Environment Open Telemetry configuration. - * - * @return the openTelemetryConfiguration value. - */ - OpenTelemetryConfiguration openTelemetryConfiguration(); - - /** - * Gets the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. - * - * @return the zoneRedundant value. - */ - Boolean zoneRedundant(); - - /** - * Gets the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @return the customDomainConfiguration value. - */ - CustomDomainConfiguration customDomainConfiguration(); - - /** - * Gets the eventStreamEndpoint property: The endpoint of the eventstream of the Environment. - * - * @return the eventStreamEndpoint value. - */ - String eventStreamEndpoint(); - - /** - * Gets the workloadProfiles property: Workload profiles configured for the Managed Environment. - * - * @return the workloadProfiles value. - */ - List workloadProfiles(); - - /** - * Gets the kedaConfiguration property: The configuration of Keda component. - * - * @return the kedaConfiguration value. - */ - KedaConfiguration kedaConfiguration(); - - /** - * Gets the daprConfiguration property: The configuration of Dapr component. - * - * @return the daprConfiguration value. - */ - DaprConfiguration daprConfiguration(); - - /** - * Gets 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. - */ - String infrastructureResourceGroup(); - - /** - * Gets the peerAuthentication property: Peer authentication settings for the Managed Environment. - * - * @return the peerAuthentication value. - */ - 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 publicNetworkAccess property: Property to allow or block all public traffic. Allowed Values: 'Enabled', - * 'Disabled'. - * - * @return the publicNetworkAccess value. - */ - PublicNetworkAccess publicNetworkAccess(); - - /** - * 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.ManagedEnvironmentInner object. - * - * @return the inner object. - */ - ManagedEnvironmentInner innerModel(); - - /** - * The entirety of the ManagedEnvironment definition. - */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { - } - - /** - * The ManagedEnvironment definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ManagedEnvironment definition. - */ - interface Blank extends WithLocation { - } - - /** - * The stage of the ManagedEnvironment 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 ManagedEnvironment 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 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, - DefinitionStages.WithPeerTrafficConfiguration, DefinitionStages.WithPublicNetworkAccess { - /** - * Executes the create request. - * - * @return the created resource. - */ - ManagedEnvironment create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ManagedEnvironment create(Context context); - } - - /** - * The stage of the ManagedEnvironment 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 ManagedEnvironment definition allowing to specify kind. - */ - interface WithKind { - /** - * Specifies the kind property: Kind of the Environment.. - * - * @param kind Kind of the Environment. - * @return the next definition stage. - */ - WithCreate withKind(String kind); - } - - /** - * The stage of the ManagedEnvironment definition allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: Managed identities for the Managed Environment to interact with other - * Azure services without maintaining any secrets or credentials in code.. - * - * @param identity Managed identities for the Managed Environment to interact with other Azure services - * without maintaining any secrets or credentials in code. - * @return the next definition stage. - */ - WithCreate withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the ManagedEnvironment definition allowing to specify daprAIInstrumentationKey. - */ - interface WithDaprAIInstrumentationKey { - /** - * Specifies the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export - * Service to Service communication telemetry. - * - * @param daprAIInstrumentationKey Azure Monitor instrumentation key used by Dapr to export Service to - * Service communication telemetry. - * @return the next definition stage. - */ - WithCreate withDaprAIInstrumentationKey(String daprAIInstrumentationKey); - } - - /** - * The stage of the ManagedEnvironment definition allowing to specify daprAIConnectionString. - */ - interface WithDaprAIConnectionString { - /** - * Specifies the daprAIConnectionString property: Application Insights connection string used by Dapr to - * export Service to Service communication telemetry. - * - * @param daprAIConnectionString Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * @return the next definition stage. - */ - WithCreate withDaprAIConnectionString(String daprAIConnectionString); - } - - /** - * The stage of the ManagedEnvironment definition allowing to specify vnetConfiguration. - */ - interface WithVnetConfiguration { - /** - * Specifies the vnetConfiguration property: Vnet configuration for the environment. - * - * @param vnetConfiguration Vnet configuration for the environment. - * @return the next definition stage. - */ - WithCreate withVnetConfiguration(VnetConfiguration vnetConfiguration); - } - - /** - * The stage of the ManagedEnvironment definition allowing to specify appLogsConfiguration. - */ - interface WithAppLogsConfiguration { - /** - * Specifies the appLogsConfiguration property: Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported. - * - * @param appLogsConfiguration Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported. - * @return the next definition stage. - */ - WithCreate withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration); - } - - /** - * The stage of the ManagedEnvironment definition allowing to specify appInsightsConfiguration. - */ - interface WithAppInsightsConfiguration { - /** - * Specifies the appInsightsConfiguration property: Environment level Application Insights configuration. - * - * @param appInsightsConfiguration Environment level Application Insights configuration. - * @return the next definition stage. - */ - WithCreate withAppInsightsConfiguration(AppInsightsConfiguration appInsightsConfiguration); - } - - /** - * The stage of the ManagedEnvironment definition allowing to specify openTelemetryConfiguration. - */ - interface WithOpenTelemetryConfiguration { - /** - * Specifies the openTelemetryConfiguration property: Environment Open Telemetry configuration. - * - * @param openTelemetryConfiguration Environment Open Telemetry configuration. - * @return the next definition stage. - */ - WithCreate withOpenTelemetryConfiguration(OpenTelemetryConfiguration openTelemetryConfiguration); - } - - /** - * The stage of the ManagedEnvironment definition allowing to specify zoneRedundant. - */ - interface WithZoneRedundant { - /** - * Specifies the zoneRedundant property: Whether or not this Managed Environment is zone-redundant.. - * - * @param zoneRedundant Whether or not this Managed Environment is zone-redundant. - * @return the next definition stage. - */ - WithCreate withZoneRedundant(Boolean zoneRedundant); - } - - /** - * The stage of the ManagedEnvironment definition allowing to specify customDomainConfiguration. - */ - interface WithCustomDomainConfiguration { - /** - * Specifies the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @param customDomainConfiguration Custom domain configuration for the environment. - * @return the next definition stage. - */ - WithCreate withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration); - } - - /** - * The stage of the ManagedEnvironment definition allowing to specify workloadProfiles. - */ - interface WithWorkloadProfiles { - /** - * Specifies the workloadProfiles property: Workload profiles configured for the Managed Environment.. - * - * @param workloadProfiles Workload profiles configured for the Managed Environment. - * @return the next definition stage. - */ - WithCreate withWorkloadProfiles(List workloadProfiles); - } - - /** - * The stage of the ManagedEnvironment definition allowing to specify kedaConfiguration. - */ - interface WithKedaConfiguration { - /** - * Specifies the kedaConfiguration property: The configuration of Keda component.. - * - * @param kedaConfiguration The configuration of Keda component. - * @return the next definition stage. - */ - WithCreate withKedaConfiguration(KedaConfiguration kedaConfiguration); - } - - /** - * The stage of the ManagedEnvironment definition allowing to specify daprConfiguration. - */ - interface WithDaprConfiguration { - /** - * Specifies the daprConfiguration property: The configuration of Dapr component.. - * - * @param daprConfiguration The configuration of Dapr component. - * @return the next definition stage. - */ - WithCreate withDaprConfiguration(DaprConfiguration daprConfiguration); - } - - /** - * The stage of the ManagedEnvironment definition allowing to specify infrastructureResourceGroup. - */ - interface WithInfrastructureResourceGroup { - /** - * Specifies 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 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 next definition stage. - */ - WithCreate withInfrastructureResourceGroup(String infrastructureResourceGroup); - } - - /** - * The stage of the ManagedEnvironment definition allowing to specify peerAuthentication. - */ - interface WithPeerAuthentication { - /** - * Specifies the peerAuthentication property: Peer authentication settings for the Managed Environment. - * - * @param peerAuthentication Peer authentication settings for the Managed Environment. - * @return the next definition stage. - */ - 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); - } - - /** - * The stage of the ManagedEnvironment definition allowing to specify publicNetworkAccess. - */ - interface WithPublicNetworkAccess { - /** - * Specifies the publicNetworkAccess property: Property to allow or block all public traffic. Allowed - * Values: 'Enabled', 'Disabled'.. - * - * @param publicNetworkAccess Property to allow or block all public traffic. Allowed Values: 'Enabled', - * 'Disabled'. - * @return the next definition stage. - */ - WithCreate withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); - } - } - - /** - * Begins update for the ManagedEnvironment resource. - * - * @return the stage of resource update. - */ - ManagedEnvironment.Update update(); - - /** - * The template for ManagedEnvironment update. - */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithKind, UpdateStages.WithIdentity, - UpdateStages.WithDaprAIInstrumentationKey, UpdateStages.WithDaprAIConnectionString, - UpdateStages.WithVnetConfiguration, UpdateStages.WithAppLogsConfiguration, - UpdateStages.WithAppInsightsConfiguration, UpdateStages.WithOpenTelemetryConfiguration, - UpdateStages.WithCustomDomainConfiguration, UpdateStages.WithWorkloadProfiles, - UpdateStages.WithKedaConfiguration, UpdateStages.WithDaprConfiguration, UpdateStages.WithPeerAuthentication, - UpdateStages.WithPeerTrafficConfiguration, UpdateStages.WithPublicNetworkAccess { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ManagedEnvironment apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ManagedEnvironment apply(Context context); - } - - /** - * The ManagedEnvironment update stages. - */ - interface UpdateStages { - /** - * The stage of the ManagedEnvironment update allowing to specify tags. - */ - interface WithTags { - /** - * Specifies the tags property: Resource tags.. - * - * @param tags Resource tags. - * @return the next definition stage. - */ - Update withTags(Map tags); - } - - /** - * The stage of the ManagedEnvironment update allowing to specify kind. - */ - interface WithKind { - /** - * Specifies the kind property: Kind of the Environment.. - * - * @param kind Kind of the Environment. - * @return the next definition stage. - */ - Update withKind(String kind); - } - - /** - * The stage of the ManagedEnvironment update allowing to specify identity. - */ - interface WithIdentity { - /** - * Specifies the identity property: Managed identities for the Managed Environment to interact with other - * Azure services without maintaining any secrets or credentials in code.. - * - * @param identity Managed identities for the Managed Environment to interact with other Azure services - * without maintaining any secrets or credentials in code. - * @return the next definition stage. - */ - Update withIdentity(ManagedServiceIdentity identity); - } - - /** - * The stage of the ManagedEnvironment update allowing to specify daprAIInstrumentationKey. - */ - interface WithDaprAIInstrumentationKey { - /** - * Specifies the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export - * Service to Service communication telemetry. - * - * @param daprAIInstrumentationKey Azure Monitor instrumentation key used by Dapr to export Service to - * Service communication telemetry. - * @return the next definition stage. - */ - Update withDaprAIInstrumentationKey(String daprAIInstrumentationKey); - } - - /** - * The stage of the ManagedEnvironment update allowing to specify daprAIConnectionString. - */ - interface WithDaprAIConnectionString { - /** - * Specifies the daprAIConnectionString property: Application Insights connection string used by Dapr to - * export Service to Service communication telemetry. - * - * @param daprAIConnectionString Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * @return the next definition stage. - */ - Update withDaprAIConnectionString(String daprAIConnectionString); - } - - /** - * The stage of the ManagedEnvironment update allowing to specify vnetConfiguration. - */ - interface WithVnetConfiguration { - /** - * Specifies the vnetConfiguration property: Vnet configuration for the environment. - * - * @param vnetConfiguration Vnet configuration for the environment. - * @return the next definition stage. - */ - Update withVnetConfiguration(VnetConfiguration vnetConfiguration); - } - - /** - * The stage of the ManagedEnvironment update allowing to specify appLogsConfiguration. - */ - interface WithAppLogsConfiguration { - /** - * Specifies the appLogsConfiguration property: Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported. - * - * @param appLogsConfiguration Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is - * supported. - * @return the next definition stage. - */ - Update withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration); - } - - /** - * The stage of the ManagedEnvironment update allowing to specify appInsightsConfiguration. - */ - interface WithAppInsightsConfiguration { - /** - * Specifies the appInsightsConfiguration property: Environment level Application Insights configuration. - * - * @param appInsightsConfiguration Environment level Application Insights configuration. - * @return the next definition stage. - */ - Update withAppInsightsConfiguration(AppInsightsConfiguration appInsightsConfiguration); - } - - /** - * The stage of the ManagedEnvironment update allowing to specify openTelemetryConfiguration. - */ - interface WithOpenTelemetryConfiguration { - /** - * Specifies the openTelemetryConfiguration property: Environment Open Telemetry configuration. - * - * @param openTelemetryConfiguration Environment Open Telemetry configuration. - * @return the next definition stage. - */ - Update withOpenTelemetryConfiguration(OpenTelemetryConfiguration openTelemetryConfiguration); - } - - /** - * The stage of the ManagedEnvironment update allowing to specify customDomainConfiguration. - */ - interface WithCustomDomainConfiguration { - /** - * Specifies the customDomainConfiguration property: Custom domain configuration for the environment. - * - * @param customDomainConfiguration Custom domain configuration for the environment. - * @return the next definition stage. - */ - Update withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration); - } - - /** - * The stage of the ManagedEnvironment update allowing to specify workloadProfiles. - */ - interface WithWorkloadProfiles { - /** - * Specifies the workloadProfiles property: Workload profiles configured for the Managed Environment.. - * - * @param workloadProfiles Workload profiles configured for the Managed Environment. - * @return the next definition stage. - */ - Update withWorkloadProfiles(List workloadProfiles); - } - - /** - * The stage of the ManagedEnvironment update allowing to specify kedaConfiguration. - */ - interface WithKedaConfiguration { - /** - * Specifies the kedaConfiguration property: The configuration of Keda component.. - * - * @param kedaConfiguration The configuration of Keda component. - * @return the next definition stage. - */ - Update withKedaConfiguration(KedaConfiguration kedaConfiguration); - } - - /** - * The stage of the ManagedEnvironment update allowing to specify daprConfiguration. - */ - interface WithDaprConfiguration { - /** - * Specifies the daprConfiguration property: The configuration of Dapr component.. - * - * @param daprConfiguration The configuration of Dapr component. - * @return the next definition stage. - */ - Update withDaprConfiguration(DaprConfiguration daprConfiguration); - } - - /** - * The stage of the ManagedEnvironment update allowing to specify peerAuthentication. - */ - interface WithPeerAuthentication { - /** - * Specifies the peerAuthentication property: Peer authentication settings for the Managed Environment. - * - * @param peerAuthentication Peer authentication settings for the Managed Environment. - * @return the next definition stage. - */ - 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); - } - - /** - * The stage of the ManagedEnvironment update allowing to specify publicNetworkAccess. - */ - interface WithPublicNetworkAccess { - /** - * Specifies the publicNetworkAccess property: Property to allow or block all public traffic. Allowed - * Values: 'Enabled', 'Disabled'.. - * - * @param publicNetworkAccess Property to allow or block all public traffic. Allowed Values: 'Enabled', - * 'Disabled'. - * @return the next definition stage. - */ - Update withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ManagedEnvironment refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ManagedEnvironment refresh(Context context); - - /** - * Get auth token for a managed environment - * - * Checks if resource name is available. - * - * @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 environment Auth Token along with {@link Response}. - */ - Response getAuthTokenWithResponse(Context context); - - /** - * Get auth token for a managed environment - * - * Checks if resource name is available. - * - * @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 environment Auth Token. - */ - EnvironmentAuthToken getAuthToken(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentDiagnostics.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentDiagnostics.java deleted file mode 100644 index 03a0cb082365..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentDiagnostics.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (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 ManagedEnvironmentDiagnostics. - */ -public interface ManagedEnvironmentDiagnostics { - /** - * Get the list of diagnostics for a given Managed Environment. - * - * Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps along with - * {@link Response}. - */ - Response listDetectorsWithResponse(String resourceGroupName, String environmentName, - Context context); - - /** - * Get the list of diagnostics for a given Managed Environment. - * - * Get the list of diagnostics for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps. - */ - DiagnosticsCollection listDetectors(String resourceGroupName, String environmentName); - - /** - * Get the diagnostics data for a given Managed Environment. - * - * Get the diagnostics data for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param detectorName Name of the Managed Environment detector. - * @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 diagnostics data for a Managed Environment used to host container apps along with {@link Response}. - */ - Response getDetectorWithResponse(String resourceGroupName, String environmentName, String detectorName, - Context context); - - /** - * Get the diagnostics data for a given Managed Environment. - * - * Get the diagnostics data for a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param detectorName Name of the Managed Environment detector. - * @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 diagnostics data for a Managed Environment used to host container apps. - */ - Diagnostics getDetector(String resourceGroupName, String environmentName, String detectorName); -} 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 deleted file mode 100644 index 7bb6dfb9d798..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPrivateEndpointConnections.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (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 deleted file mode 100644 index 480e3073148a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPrivateLinkResources.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.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/ManagedEnvironmentPropertiesPeerAuthentication.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerAuthentication.java deleted file mode 100644 index d9539e3202d6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerAuthentication.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Peer authentication settings for the Managed Environment. - */ -@Fluent -public final class ManagedEnvironmentPropertiesPeerAuthentication - implements JsonSerializable { - /* - * Mutual TLS authentication settings for the Managed Environment - */ - private Mtls mtls; - - /** - * Creates an instance of ManagedEnvironmentPropertiesPeerAuthentication class. - */ - public ManagedEnvironmentPropertiesPeerAuthentication() { - } - - /** - * Get the mtls property: Mutual TLS authentication settings for the Managed Environment. - * - * @return the mtls value. - */ - public Mtls mtls() { - return this.mtls; - } - - /** - * Set the mtls property: Mutual TLS authentication settings for the Managed Environment. - * - * @param mtls the mtls value to set. - * @return the ManagedEnvironmentPropertiesPeerAuthentication object itself. - */ - public ManagedEnvironmentPropertiesPeerAuthentication withMtls(Mtls mtls) { - this.mtls = mtls; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (mtls() != null) { - mtls().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("mtls", this.mtls); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedEnvironmentPropertiesPeerAuthentication from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedEnvironmentPropertiesPeerAuthentication if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedEnvironmentPropertiesPeerAuthentication. - */ - public static ManagedEnvironmentPropertiesPeerAuthentication fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedEnvironmentPropertiesPeerAuthentication deserializedManagedEnvironmentPropertiesPeerAuthentication - = new ManagedEnvironmentPropertiesPeerAuthentication(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("mtls".equals(fieldName)) { - deserializedManagedEnvironmentPropertiesPeerAuthentication.mtls = Mtls.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedEnvironmentPropertiesPeerAuthentication; - }); - } -} 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 deleted file mode 100644 index 92e4a2e6fa14..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerTrafficConfiguration.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Peer traffic settings for the Managed Environment. - */ -@Fluent -public final class ManagedEnvironmentPropertiesPeerTrafficConfiguration - implements JsonSerializable { - /* - * Peer traffic encryption settings for the Managed Environment - */ - 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(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("encryption", this.encryption); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedEnvironmentPropertiesPeerTrafficConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedEnvironmentPropertiesPeerTrafficConfiguration if the JsonReader was pointing to an - * instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedEnvironmentPropertiesPeerTrafficConfiguration. - */ - public static ManagedEnvironmentPropertiesPeerTrafficConfiguration fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ManagedEnvironmentPropertiesPeerTrafficConfiguration deserializedManagedEnvironmentPropertiesPeerTrafficConfiguration - = new ManagedEnvironmentPropertiesPeerTrafficConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("encryption".equals(fieldName)) { - deserializedManagedEnvironmentPropertiesPeerTrafficConfiguration.encryption - = ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedEnvironmentPropertiesPeerTrafficConfiguration; - }); - } -} 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 deleted file mode 100644 index 4fc1776940a2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.java +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Peer traffic encryption settings for the Managed Environment. - */ -@Fluent -public final class ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption - implements JsonSerializable { - /* - * Boolean indicating whether the peer traffic encryption is 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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption if the JsonReader was - * pointing to an instance of it, or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the - * ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption. - */ - public static ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption fromJson(JsonReader jsonReader) - throws IOException { - return jsonReader.readObject(reader -> { - ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption deserializedManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption - = new ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.enabled - = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorage.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorage.java deleted file mode 100644 index 2e1a0fcd4b12..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorage.java +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright (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.ManagedEnvironmentStorageInner; - -/** - * An immutable client-side representation of ManagedEnvironmentStorage. - */ -public interface ManagedEnvironmentStorage { - /** - * 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: Storage properties. - * - * @return the properties value. - */ - ManagedEnvironmentStorageProperties properties(); - - /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the name of the resource group. - * - * @return the name of the resource group. - */ - String resourceGroupName(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner object. - * - * @return the inner object. - */ - ManagedEnvironmentStorageInner innerModel(); - - /** - * The entirety of the ManagedEnvironmentStorage definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The ManagedEnvironmentStorage definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the ManagedEnvironmentStorage definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the ManagedEnvironmentStorage 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 Environment. - * @return the next definition stage. - */ - WithCreate withExistingManagedEnvironment(String resourceGroupName, String environmentName); - } - - /** - * The stage of the ManagedEnvironmentStorage definition which contains all the minimum required properties for - * the resource to be created, but also allows for any other optional properties to be specified. - */ - interface WithCreate extends DefinitionStages.WithProperties { - /** - * Executes the create request. - * - * @return the created resource. - */ - ManagedEnvironmentStorage create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - ManagedEnvironmentStorage create(Context context); - } - - /** - * The stage of the ManagedEnvironmentStorage definition allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Storage properties. - * - * @param properties Storage properties. - * @return the next definition stage. - */ - WithCreate withProperties(ManagedEnvironmentStorageProperties properties); - } - } - - /** - * Begins update for the ManagedEnvironmentStorage resource. - * - * @return the stage of resource update. - */ - ManagedEnvironmentStorage.Update update(); - - /** - * The template for ManagedEnvironmentStorage update. - */ - interface Update extends UpdateStages.WithProperties { - /** - * Executes the update request. - * - * @return the updated resource. - */ - ManagedEnvironmentStorage apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - ManagedEnvironmentStorage apply(Context context); - } - - /** - * The ManagedEnvironmentStorage update stages. - */ - interface UpdateStages { - /** - * The stage of the ManagedEnvironmentStorage update allowing to specify properties. - */ - interface WithProperties { - /** - * Specifies the properties property: Storage properties. - * - * @param properties Storage properties. - * @return the next definition stage. - */ - Update withProperties(ManagedEnvironmentStorageProperties properties); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - ManagedEnvironmentStorage refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - ManagedEnvironmentStorage refresh(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorageProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorageProperties.java deleted file mode 100644 index 84c56b6a4eee..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorageProperties.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Storage properties. - */ -@Fluent -public final class ManagedEnvironmentStorageProperties - implements JsonSerializable { - /* - * Azure file properties - */ - private AzureFileProperties azureFile; - - /* - * NFS Azure file properties - */ - private NfsAzureFileProperties nfsAzureFile; - - /** - * Creates an instance of ManagedEnvironmentStorageProperties class. - */ - public ManagedEnvironmentStorageProperties() { - } - - /** - * Get the azureFile property: Azure file properties. - * - * @return the azureFile value. - */ - public AzureFileProperties azureFile() { - return this.azureFile; - } - - /** - * Set the azureFile property: Azure file properties. - * - * @param azureFile the azureFile value to set. - * @return the ManagedEnvironmentStorageProperties object itself. - */ - public ManagedEnvironmentStorageProperties withAzureFile(AzureFileProperties azureFile) { - this.azureFile = azureFile; - return this; - } - - /** - * Get the nfsAzureFile property: NFS Azure file properties. - * - * @return the nfsAzureFile value. - */ - public NfsAzureFileProperties nfsAzureFile() { - return this.nfsAzureFile; - } - - /** - * Set the nfsAzureFile property: NFS Azure file properties. - * - * @param nfsAzureFile the nfsAzureFile value to set. - * @return the ManagedEnvironmentStorageProperties object itself. - */ - public ManagedEnvironmentStorageProperties withNfsAzureFile(NfsAzureFileProperties nfsAzureFile) { - this.nfsAzureFile = nfsAzureFile; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (azureFile() != null) { - azureFile().validate(); - } - if (nfsAzureFile() != null) { - nfsAzureFile().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("azureFile", this.azureFile); - jsonWriter.writeJsonField("nfsAzureFile", this.nfsAzureFile); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedEnvironmentStorageProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedEnvironmentStorageProperties if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the ManagedEnvironmentStorageProperties. - */ - public static ManagedEnvironmentStorageProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedEnvironmentStorageProperties deserializedManagedEnvironmentStorageProperties - = new ManagedEnvironmentStorageProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("azureFile".equals(fieldName)) { - deserializedManagedEnvironmentStorageProperties.azureFile = AzureFileProperties.fromJson(reader); - } else if ("nfsAzureFile".equals(fieldName)) { - deserializedManagedEnvironmentStorageProperties.nfsAzureFile - = NfsAzureFileProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedEnvironmentStorageProperties; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStoragesCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStoragesCollection.java deleted file mode 100644 index 2e891809bbce..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStoragesCollection.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.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner; -import java.util.List; - -/** - * An immutable client-side representation of ManagedEnvironmentStoragesCollection. - */ -public interface ManagedEnvironmentStoragesCollection { - /** - * Gets the value property: Collection of storage resources. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner - * object. - * - * @return the inner object. - */ - ManagedEnvironmentStoragesCollectionInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentUsages.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentUsages.java deleted file mode 100644 index c9c1d12477fe..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentUsages.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.models; - -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.util.Context; - -/** - * Resource collection API of ManagedEnvironmentUsages. - */ -public interface ManagedEnvironmentUsages { - /** - * Gets the current usage information as well as the limits for environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as the limits for environment as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName); - - /** - * Gets the current usage information as well as the limits for environment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the current usage information as well as the limits for environment as paginated response with - * {@link PagedIterable}. - */ - PagedIterable list(String resourceGroupName, String environmentName, Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironments.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironments.java deleted file mode 100644 index cf2ffc7fc4f8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironments.java +++ /dev/null @@ -1,258 +0,0 @@ -// Copyright (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 ManagedEnvironments. - */ -public interface ManagedEnvironments { - /** - * Get all Environments for a subscription. - * - * Get all Managed Environments for a 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 all Managed Environments for a subscription as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Get all Environments for a subscription. - * - * Get all Managed Environments for a 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 all Managed Environments for a subscription as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); - - /** - * Get all the Environments in a resource group. - * - * Get all the Managed Environments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Managed Environments in a resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName); - - /** - * Get all the Environments in a resource group. - * - * Get all the Managed Environments in a resource group. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all the Managed Environments in a resource group as paginated response with {@link PagedIterable}. - */ - PagedIterable listByResourceGroup(String resourceGroupName, Context context); - - /** - * Get the properties of a Managed Environment. - * - * Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response}. - */ - Response getByResourceGroupWithResponse(String resourceGroupName, String environmentName, - Context context); - - /** - * Get the properties of a Managed Environment. - * - * Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps. - */ - ManagedEnvironment getByResourceGroup(String resourceGroupName, String environmentName); - - /** - * Delete a Managed Environment. - * - * Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void deleteByResourceGroup(String resourceGroupName, String environmentName); - - /** - * Delete a Managed Environment. - * - * Delete a Managed Environment if it does not have any container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String environmentName, Context context); - - /** - * Get auth token for a managed environment - * - * Checks if resource name is available. - * - * @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.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 environment Auth Token along with {@link Response}. - */ - Response getAuthTokenWithResponse(String resourceGroupName, String environmentName, - Context context); - - /** - * Get auth token for a managed environment - * - * Checks if resource name is available. - * - * @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.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 environment Auth Token. - */ - EnvironmentAuthToken getAuthToken(String resourceGroupName, String environmentName); - - /** - * Get all workload Profile States for a Managed Environment.. - * - * Get all workload Profile States for a 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.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 all workload Profile States for a Managed Environment as paginated response with {@link PagedIterable}. - */ - PagedIterable listWorkloadProfileStates(String resourceGroupName, String environmentName); - - /** - * Get all workload Profile States for a Managed Environment.. - * - * Get all workload Profile States for a 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.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 all workload Profile States for a Managed Environment as paginated response with {@link PagedIterable}. - */ - PagedIterable listWorkloadProfileStates(String resourceGroupName, String environmentName, - Context context); - - /** - * Get the properties of a Managed Environment. - * - * Get the properties of a Managed Environment used to host container apps. - * - * @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 Managed Environment used to host container apps along with {@link Response}. - */ - ManagedEnvironment getById(String id); - - /** - * Get the properties of a Managed Environment. - * - * Get the properties of a Managed Environment used to host container apps. - * - * @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 Managed Environment used to host container apps along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Managed Environment. - * - * Delete a Managed Environment if it does not have any container apps. - * - * @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 Managed Environment. - * - * Delete a Managed Environment if it does not have any container apps. - * - * @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 ManagedEnvironment resource. - * - * @param name resource name. - * @return the first stage of the new ManagedEnvironment definition. - */ - ManagedEnvironment.DefinitionStages.Blank define(String name); -} 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 deleted file mode 100644 index dbc70a1f66ba..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsCollection.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; -import java.io.IOException; -import java.util.List; - -/** - * Collection of Environments. - */ -@Fluent -public final class ManagedEnvironmentsCollection implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of ManagedEnvironmentsCollection class. - */ - public ManagedEnvironmentsCollection() { - } - - /** - * 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 ManagedEnvironmentsCollection object itself. - */ - public ManagedEnvironmentsCollection 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 ManagedEnvironmentsCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentsCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedEnvironmentsCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedEnvironmentsCollection if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ManagedEnvironmentsCollection. - */ - public static ManagedEnvironmentsCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedEnvironmentsCollection deserializedManagedEnvironmentsCollection - = new ManagedEnvironmentsCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ManagedEnvironmentInner.fromJson(reader1)); - deserializedManagedEnvironmentsCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedManagedEnvironmentsCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedManagedEnvironmentsCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsDiagnostics.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsDiagnostics.java deleted file mode 100644 index f4c6fb165f76..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsDiagnostics.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.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ManagedEnvironmentsDiagnostics. - */ -public interface ManagedEnvironmentsDiagnostics { - /** - * Get the properties of a Managed Environment. - * - * Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps along with {@link Response}. - */ - Response getRootWithResponse(String resourceGroupName, String environmentName, Context context); - - /** - * Get the properties of a Managed Environment. - * - * Get the properties of a Managed Environment used to host container apps. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps. - */ - ManagedEnvironment getRoot(String resourceGroupName, String environmentName); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsStorages.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsStorages.java deleted file mode 100644 index a1be60b7e13a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsStorages.java +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright (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 ManagedEnvironmentsStorages. - */ -public interface ManagedEnvironmentsStorages { - /** - * Get all storages for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment along with {@link Response}. - */ - Response listWithResponse(String resourceGroupName, String environmentName, - Context context); - - /** - * Get all storages for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment. - */ - ManagedEnvironmentStoragesCollection list(String resourceGroupName, String environmentName); - - /** - * Get storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 storage for a managedEnvironment along with {@link Response}. - */ - Response getWithResponse(String resourceGroupName, String environmentName, - String storageName, Context context); - - /** - * Get storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 storage for a managedEnvironment. - */ - ManagedEnvironmentStorage get(String resourceGroupName, String environmentName, String storageName); - - /** - * Delete storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 Response}. - */ - Response deleteWithResponse(String resourceGroupName, String environmentName, String storageName, - Context context); - - /** - * Delete storage for a managedEnvironment. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param storageName Name of the storage. - * @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 environmentName, String storageName); - - /** - * Get storage for a managedEnvironment. - * - * @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 storage for a managedEnvironment along with {@link Response}. - */ - ManagedEnvironmentStorage getById(String id); - - /** - * Get storage for a managedEnvironment. - * - * @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 storage for a managedEnvironment along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete storage for a managedEnvironment. - * - * @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 storage for a managedEnvironment. - * - * @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 {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new ManagedEnvironmentStorage resource. - * - * @param name resource name. - * @return the first stage of the new ManagedEnvironmentStorage definition. - */ - ManagedEnvironmentStorage.DefinitionStages.Blank define(String name); -} 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 deleted file mode 100644 index dd281ce1c675..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentity.java +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; -import java.util.UUID; - -/** - * Managed service identity (system assigned and/or user assigned identities). - */ -@Fluent -public final class ManagedServiceIdentity implements JsonSerializable { - /* - * The service principal ID of the system assigned identity. This property will only be provided for a system - * assigned identity. - */ - private UUID principalId; - - /* - * The tenant ID of the system assigned identity. This property will only be provided for a system assigned - * identity. - */ - private UUID tenantId; - - /* - * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - */ - 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. - */ - private Map userAssignedIdentities; - - /** - * Creates an instance of ManagedServiceIdentity class. - */ - public ManagedServiceIdentity() { - } - - /** - * Get the principalId property: The service principal ID of the system assigned identity. This property will only - * be provided for a system assigned identity. - * - * @return the principalId value. - */ - public UUID principalId() { - return this.principalId; - } - - /** - * 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. - */ - public UUID tenantId() { - return this.tenantId; - } - - /** - * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). - * - * @return the type value. - */ - public ManagedServiceIdentityType type() { - return this.type; - } - - /** - * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are - * allowed). - * - * @param type the type value to set. - * @return the ManagedServiceIdentity object itself. - */ - public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { - this.type = type; - return this; - } - - /** - * Get the userAssignedIdentities property: 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. - * - * @return the userAssignedIdentities value. - */ - public Map userAssignedIdentities() { - return this.userAssignedIdentities; - } - - /** - * Set the userAssignedIdentities property: 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. - * - * @param userAssignedIdentities the userAssignedIdentities value to set. - * @return the ManagedServiceIdentity object itself. - */ - public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { - this.userAssignedIdentities = userAssignedIdentities; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (type() == null) { - throw LOGGER.atError() - .log(new IllegalArgumentException("Missing required property type in model ManagedServiceIdentity")); - } - if (userAssignedIdentities() != null) { - userAssignedIdentities().values().forEach(e -> { - if (e != null) { - e.validate(); - } - }); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ManagedServiceIdentity.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type == null ? null : this.type.toString()); - jsonWriter.writeMapField("userAssignedIdentities", this.userAssignedIdentities, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ManagedServiceIdentity from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ManagedServiceIdentity if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ManagedServiceIdentity. - */ - public static ManagedServiceIdentity fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ManagedServiceIdentity deserializedManagedServiceIdentity = new ManagedServiceIdentity(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedManagedServiceIdentity.type = ManagedServiceIdentityType.fromString(reader.getString()); - } else if ("principalId".equals(fieldName)) { - deserializedManagedServiceIdentity.principalId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("tenantId".equals(fieldName)) { - deserializedManagedServiceIdentity.tenantId - = reader.getNullable(nonNullReader -> UUID.fromString(nonNullReader.getString())); - } else if ("userAssignedIdentities".equals(fieldName)) { - Map userAssignedIdentities - = reader.readMap(reader1 -> UserAssignedIdentity.fromJson(reader1)); - deserializedManagedServiceIdentity.userAssignedIdentities = userAssignedIdentities; - } else { - reader.skipChildren(); - } - } - - return deserializedManagedServiceIdentity; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentityType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentityType.java deleted file mode 100644 index a1e459c32245..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentityType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). - */ -public final class ManagedServiceIdentityType extends ExpandableStringEnum { - /** - * Static value None for ManagedServiceIdentityType. - */ - public static final ManagedServiceIdentityType NONE = fromString("None"); - - /** - * Static value SystemAssigned for ManagedServiceIdentityType. - */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - - /** - * Static value UserAssigned for ManagedServiceIdentityType. - */ - public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); - - /** - * Static value SystemAssigned,UserAssigned for ManagedServiceIdentityType. - */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED - = fromString("SystemAssigned,UserAssigned"); - - /** - * Creates a new instance of ManagedServiceIdentityType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public ManagedServiceIdentityType() { - } - - /** - * Creates or finds a ManagedServiceIdentityType from its string representation. - * - * @param name a name to look for. - * @return the corresponding ManagedServiceIdentityType. - */ - public static ManagedServiceIdentityType fromString(String name) { - return fromString(name, ManagedServiceIdentityType.class); - } - - /** - * Gets known ManagedServiceIdentityType values. - * - * @return known ManagedServiceIdentityType values. - */ - public static Collection values() { - return values(ManagedServiceIdentityType.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MetricsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MetricsConfiguration.java deleted file mode 100644 index 5fa2a2d26131..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MetricsConfiguration.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Configuration of Open Telemetry metrics. - */ -@Fluent -public final class MetricsConfiguration implements JsonSerializable { - /* - * Boolean indicating if including keda metrics - */ - private Boolean includeKeda; - - /* - * Open telemetry metrics destinations - */ - private List destinations; - - /** - * Creates an instance of MetricsConfiguration class. - */ - public MetricsConfiguration() { - } - - /** - * Get the includeKeda property: Boolean indicating if including keda metrics. - * - * @return the includeKeda value. - */ - public Boolean includeKeda() { - return this.includeKeda; - } - - /** - * Set the includeKeda property: Boolean indicating if including keda metrics. - * - * @param includeKeda the includeKeda value to set. - * @return the MetricsConfiguration object itself. - */ - public MetricsConfiguration withIncludeKeda(Boolean includeKeda) { - this.includeKeda = includeKeda; - return this; - } - - /** - * Get the destinations property: Open telemetry metrics destinations. - * - * @return the destinations value. - */ - public List destinations() { - return this.destinations; - } - - /** - * Set the destinations property: Open telemetry metrics destinations. - * - * @param destinations the destinations value to set. - * @return the MetricsConfiguration object itself. - */ - public MetricsConfiguration withDestinations(List destinations) { - this.destinations = destinations; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("includeKeda", this.includeKeda); - jsonWriter.writeArrayField("destinations", this.destinations, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of MetricsConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of MetricsConfiguration if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the MetricsConfiguration. - */ - public static MetricsConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - MetricsConfiguration deserializedMetricsConfiguration = new MetricsConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("includeKeda".equals(fieldName)) { - deserializedMetricsConfiguration.includeKeda = reader.getNullable(JsonReader::getBoolean); - } else if ("destinations".equals(fieldName)) { - List destinations = reader.readArray(reader1 -> reader1.getString()); - deserializedMetricsConfiguration.destinations = destinations; - } else { - reader.skipChildren(); - } - } - - return deserializedMetricsConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Mtls.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Mtls.java deleted file mode 100644 index b0abfb2e584d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Mtls.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Configuration properties for mutual TLS authentication. - */ -@Fluent -public final class Mtls implements JsonSerializable { - /* - * Boolean indicating whether the mutual TLS authentication is enabled - */ - private Boolean enabled; - - /** - * Creates an instance of Mtls class. - */ - public Mtls() { - } - - /** - * Get the enabled property: Boolean indicating whether the mutual TLS authentication is enabled. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Boolean indicating whether the mutual TLS authentication is enabled. - * - * @param enabled the enabled value to set. - * @return the Mtls object itself. - */ - public Mtls withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Mtls from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Mtls if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Mtls. - */ - public static Mtls fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Mtls deserializedMtls = new Mtls(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedMtls.enabled = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedMtls; - }); - } -} 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 deleted file mode 100644 index 852c94665bfe..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NacosComponent.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Nacos properties. - */ -@Fluent -public final class NacosComponent extends JavaComponentProperties { - /* - * Type of the Java Component. - */ - private JavaComponentType componentType = JavaComponentType.NACOS; - - /* - * Java Component Ingress configurations. - */ - private JavaComponentIngress ingress; - - /* - * Provisioning state of the Java Component. - */ - private JavaComponentProvisioningState provisioningState; - - /** - * 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; - } - - /** - * Get the provisioningState property: Provisioning state of the Java Component. - * - * @return the provisioningState value. - */ - @Override - public JavaComponentProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public NacosComponent withConfigurations(List configurations) { - super.withConfigurations(configurations); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public NacosComponent withScale(JavaComponentPropertiesScale scale) { - super.withScale(scale); - 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() { - if (ingress() != null) { - ingress().validate(); - } - if (configurations() != null) { - configurations().forEach(e -> e.validate()); - } - if (scale() != null) { - scale().validate(); - } - if (serviceBinds() != null) { - serviceBinds().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("configurations", configurations(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("scale", scale()); - jsonWriter.writeArrayField("serviceBinds", serviceBinds(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("componentType", this.componentType == null ? null : this.componentType.toString()); - jsonWriter.writeJsonField("ingress", this.ingress); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NacosComponent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NacosComponent if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the NacosComponent. - */ - public static NacosComponent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NacosComponent deserializedNacosComponent = new NacosComponent(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedNacosComponent.provisioningState - = JavaComponentProvisioningState.fromString(reader.getString()); - } else if ("configurations".equals(fieldName)) { - List configurations - = reader.readArray(reader1 -> JavaComponentConfigurationProperty.fromJson(reader1)); - deserializedNacosComponent.withConfigurations(configurations); - } else if ("scale".equals(fieldName)) { - deserializedNacosComponent.withScale(JavaComponentPropertiesScale.fromJson(reader)); - } else if ("serviceBinds".equals(fieldName)) { - List serviceBinds - = reader.readArray(reader1 -> JavaComponentServiceBind.fromJson(reader1)); - deserializedNacosComponent.withServiceBinds(serviceBinds); - } else if ("componentType".equals(fieldName)) { - deserializedNacosComponent.componentType = JavaComponentType.fromString(reader.getString()); - } else if ("ingress".equals(fieldName)) { - deserializedNacosComponent.ingress = JavaComponentIngress.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedNacosComponent; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Namespaces.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Namespaces.java deleted file mode 100644 index 48776943b50c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Namespaces.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of Namespaces. - */ -public interface Namespaces { - /** - * Checks the resource name availability. - * - * Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check name availability request. - * @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 check availability result along with {@link Response}. - */ - Response checkNameAvailabilityWithResponse(String resourceGroupName, - String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context); - - /** - * Checks the resource name availability. - * - * Checks if resource name is available. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param checkNameAvailabilityRequest The check name availability request. - * @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 check availability result. - */ - CheckNameAvailabilityResponse checkNameAvailability(String resourceGroupName, String environmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NfsAzureFileProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NfsAzureFileProperties.java deleted file mode 100644 index 7b05dea106e2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NfsAzureFileProperties.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * NFS Azure File Properties. - */ -@Fluent -public final class NfsAzureFileProperties implements JsonSerializable { - /* - * Server for NFS azure file. - */ - private String server; - - /* - * Access mode for storage - */ - private AccessMode accessMode; - - /* - * NFS Azure file share name. - */ - private String shareName; - - /** - * Creates an instance of NfsAzureFileProperties class. - */ - public NfsAzureFileProperties() { - } - - /** - * Get the server property: Server for NFS azure file. - * - * @return the server value. - */ - public String server() { - return this.server; - } - - /** - * Set the server property: Server for NFS azure file. - * - * @param server the server value to set. - * @return the NfsAzureFileProperties object itself. - */ - public NfsAzureFileProperties withServer(String server) { - this.server = server; - return this; - } - - /** - * Get the accessMode property: Access mode for storage. - * - * @return the accessMode value. - */ - public AccessMode accessMode() { - return this.accessMode; - } - - /** - * Set the accessMode property: Access mode for storage. - * - * @param accessMode the accessMode value to set. - * @return the NfsAzureFileProperties object itself. - */ - public NfsAzureFileProperties withAccessMode(AccessMode accessMode) { - this.accessMode = accessMode; - return this; - } - - /** - * Get the shareName property: NFS Azure file share name. - * - * @return the shareName value. - */ - public String shareName() { - return this.shareName; - } - - /** - * Set the shareName property: NFS Azure file share name. - * - * @param shareName the shareName value to set. - * @return the NfsAzureFileProperties object itself. - */ - public NfsAzureFileProperties withShareName(String shareName) { - this.shareName = shareName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("server", this.server); - jsonWriter.writeStringField("accessMode", this.accessMode == null ? null : this.accessMode.toString()); - jsonWriter.writeStringField("shareName", this.shareName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of NfsAzureFileProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of NfsAzureFileProperties if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the NfsAzureFileProperties. - */ - public static NfsAzureFileProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - NfsAzureFileProperties deserializedNfsAzureFileProperties = new NfsAzureFileProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("server".equals(fieldName)) { - deserializedNfsAzureFileProperties.server = reader.getString(); - } else if ("accessMode".equals(fieldName)) { - deserializedNfsAzureFileProperties.accessMode = AccessMode.fromString(reader.getString()); - } else if ("shareName".equals(fieldName)) { - deserializedNfsAzureFileProperties.shareName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNfsAzureFileProperties; - }); - } -} 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 deleted file mode 100644 index 0bca70149015..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Nonce.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the nonce used in the login flow. - */ -@Fluent -public final class Nonce implements JsonSerializable { - /* - * false if the nonce should not be validated while completing the login flow; otherwise, - * true. - */ - private Boolean validateNonce; - - /* - * The time after the request is made when the nonce should expire. - */ - private String nonceExpirationInterval; - - /** - * Creates an instance of Nonce class. - */ - public Nonce() { - } - - /** - * Get the validateNonce property: <code>false</code> if the nonce should not be validated while - * completing the login flow; otherwise, <code>true</code>. - * - * @return the validateNonce value. - */ - public Boolean validateNonce() { - return this.validateNonce; - } - - /** - * Set the validateNonce property: <code>false</code> if the nonce should not be validated while - * completing the login flow; otherwise, <code>true</code>. - * - * @param validateNonce the validateNonce value to set. - * @return the Nonce object itself. - */ - public Nonce withValidateNonce(Boolean validateNonce) { - this.validateNonce = validateNonce; - return this; - } - - /** - * Get the nonceExpirationInterval property: The time after the request is made when the nonce should expire. - * - * @return the nonceExpirationInterval value. - */ - public String nonceExpirationInterval() { - return this.nonceExpirationInterval; - } - - /** - * Set the nonceExpirationInterval property: The time after the request is made when the nonce should expire. - * - * @param nonceExpirationInterval the nonceExpirationInterval value to set. - * @return the Nonce object itself. - */ - public Nonce withNonceExpirationInterval(String nonceExpirationInterval) { - this.nonceExpirationInterval = nonceExpirationInterval; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("validateNonce", this.validateNonce); - jsonWriter.writeStringField("nonceExpirationInterval", this.nonceExpirationInterval); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Nonce from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Nonce if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Nonce. - */ - public static Nonce fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Nonce deserializedNonce = new Nonce(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("validateNonce".equals(fieldName)) { - deserializedNonce.validateNonce = reader.getNullable(JsonReader::getBoolean); - } else if ("nonceExpirationInterval".equals(fieldName)) { - deserializedNonce.nonceExpirationInterval = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedNonce; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectClientCredential.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectClientCredential.java deleted file mode 100644 index 8b485cce291a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectClientCredential.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The authentication client credentials of the custom Open ID Connect provider. - */ -@Fluent -public final class OpenIdConnectClientCredential implements JsonSerializable { - /* - * The method that should be used to authenticate the user. - */ - private ClientCredentialMethod method; - - /* - * The app setting that contains the client secret for the custom Open ID Connect provider. - */ - private String clientSecretSettingName; - - /** - * Creates an instance of OpenIdConnectClientCredential class. - */ - public OpenIdConnectClientCredential() { - } - - /** - * Get the method property: The method that should be used to authenticate the user. - * - * @return the method value. - */ - public ClientCredentialMethod method() { - return this.method; - } - - /** - * Set the method property: The method that should be used to authenticate the user. - * - * @param method the method value to set. - * @return the OpenIdConnectClientCredential object itself. - */ - public OpenIdConnectClientCredential withMethod(ClientCredentialMethod method) { - this.method = method; - return this; - } - - /** - * Get the clientSecretSettingName property: The app setting that contains the client secret for the custom Open ID - * Connect provider. - * - * @return the clientSecretSettingName value. - */ - public String clientSecretSettingName() { - return this.clientSecretSettingName; - } - - /** - * Set the clientSecretSettingName property: The app setting that contains the client secret for the custom Open ID - * Connect provider. - * - * @param clientSecretSettingName the clientSecretSettingName value to set. - * @return the OpenIdConnectClientCredential object itself. - */ - public OpenIdConnectClientCredential withClientSecretSettingName(String clientSecretSettingName) { - this.clientSecretSettingName = clientSecretSettingName; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("method", this.method == null ? null : this.method.toString()); - jsonWriter.writeStringField("clientSecretSettingName", this.clientSecretSettingName); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OpenIdConnectClientCredential from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OpenIdConnectClientCredential if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OpenIdConnectClientCredential. - */ - public static OpenIdConnectClientCredential fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OpenIdConnectClientCredential deserializedOpenIdConnectClientCredential - = new OpenIdConnectClientCredential(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("method".equals(fieldName)) { - deserializedOpenIdConnectClientCredential.method - = ClientCredentialMethod.fromString(reader.getString()); - } else if ("clientSecretSettingName".equals(fieldName)) { - deserializedOpenIdConnectClientCredential.clientSecretSettingName = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOpenIdConnectClientCredential; - }); - } -} 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 deleted file mode 100644 index 4475c52237f0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectConfig.java +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the endpoints used for the custom Open ID Connect provider. - */ -@Fluent -public final class OpenIdConnectConfig implements JsonSerializable { - /* - * The endpoint to be used to make an authorization request. - */ - private String authorizationEndpoint; - - /* - * The endpoint to be used to request a token. - */ - private String tokenEndpoint; - - /* - * The endpoint that issues the token. - */ - private String issuer; - - /* - * The endpoint that provides the keys necessary to validate the token. - */ - private String certificationUri; - - /* - * The endpoint that contains all the configuration endpoints for the provider. - */ - private String wellKnownOpenIdConfiguration; - - /** - * Creates an instance of OpenIdConnectConfig class. - */ - public OpenIdConnectConfig() { - } - - /** - * Get the authorizationEndpoint property: The endpoint to be used to make an authorization request. - * - * @return the authorizationEndpoint value. - */ - public String authorizationEndpoint() { - return this.authorizationEndpoint; - } - - /** - * Set the authorizationEndpoint property: The endpoint to be used to make an authorization request. - * - * @param authorizationEndpoint the authorizationEndpoint value to set. - * @return the OpenIdConnectConfig object itself. - */ - public OpenIdConnectConfig withAuthorizationEndpoint(String authorizationEndpoint) { - this.authorizationEndpoint = authorizationEndpoint; - return this; - } - - /** - * Get the tokenEndpoint property: The endpoint to be used to request a token. - * - * @return the tokenEndpoint value. - */ - public String tokenEndpoint() { - return this.tokenEndpoint; - } - - /** - * Set the tokenEndpoint property: The endpoint to be used to request a token. - * - * @param tokenEndpoint the tokenEndpoint value to set. - * @return the OpenIdConnectConfig object itself. - */ - public OpenIdConnectConfig withTokenEndpoint(String tokenEndpoint) { - this.tokenEndpoint = tokenEndpoint; - return this; - } - - /** - * Get the issuer property: The endpoint that issues the token. - * - * @return the issuer value. - */ - public String issuer() { - return this.issuer; - } - - /** - * Set the issuer property: The endpoint that issues the token. - * - * @param issuer the issuer value to set. - * @return the OpenIdConnectConfig object itself. - */ - public OpenIdConnectConfig withIssuer(String issuer) { - this.issuer = issuer; - return this; - } - - /** - * Get the certificationUri property: The endpoint that provides the keys necessary to validate the token. - * - * @return the certificationUri value. - */ - public String certificationUri() { - return this.certificationUri; - } - - /** - * Set the certificationUri property: The endpoint that provides the keys necessary to validate the token. - * - * @param certificationUri the certificationUri value to set. - * @return the OpenIdConnectConfig object itself. - */ - public OpenIdConnectConfig withCertificationUri(String certificationUri) { - this.certificationUri = certificationUri; - return this; - } - - /** - * Get the wellKnownOpenIdConfiguration property: The endpoint that contains all the configuration endpoints for the - * provider. - * - * @return the wellKnownOpenIdConfiguration value. - */ - public String wellKnownOpenIdConfiguration() { - return this.wellKnownOpenIdConfiguration; - } - - /** - * 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. - */ - public OpenIdConnectConfig withWellKnownOpenIdConfiguration(String wellKnownOpenIdConfiguration) { - this.wellKnownOpenIdConfiguration = wellKnownOpenIdConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("authorizationEndpoint", this.authorizationEndpoint); - jsonWriter.writeStringField("tokenEndpoint", this.tokenEndpoint); - jsonWriter.writeStringField("issuer", this.issuer); - jsonWriter.writeStringField("certificationUri", this.certificationUri); - jsonWriter.writeStringField("wellKnownOpenIdConfiguration", this.wellKnownOpenIdConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OpenIdConnectConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OpenIdConnectConfig if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OpenIdConnectConfig. - */ - public static OpenIdConnectConfig fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OpenIdConnectConfig deserializedOpenIdConnectConfig = new OpenIdConnectConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("authorizationEndpoint".equals(fieldName)) { - deserializedOpenIdConnectConfig.authorizationEndpoint = reader.getString(); - } else if ("tokenEndpoint".equals(fieldName)) { - deserializedOpenIdConnectConfig.tokenEndpoint = reader.getString(); - } else if ("issuer".equals(fieldName)) { - deserializedOpenIdConnectConfig.issuer = reader.getString(); - } else if ("certificationUri".equals(fieldName)) { - deserializedOpenIdConnectConfig.certificationUri = reader.getString(); - } else if ("wellKnownOpenIdConfiguration".equals(fieldName)) { - deserializedOpenIdConnectConfig.wellKnownOpenIdConfiguration = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOpenIdConnectConfig; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectLogin.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectLogin.java deleted file mode 100644 index 7573976627a8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectLogin.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * The configuration settings of the login flow of the custom Open ID Connect provider. - */ -@Fluent -public final class OpenIdConnectLogin implements JsonSerializable { - /* - * The name of the claim that contains the users name. - */ - private String nameClaimType; - - /* - * A list of the scopes that should be requested while authenticating. - */ - private List scopes; - - /** - * Creates an instance of OpenIdConnectLogin class. - */ - public OpenIdConnectLogin() { - } - - /** - * Get the nameClaimType property: The name of the claim that contains the users name. - * - * @return the nameClaimType value. - */ - public String nameClaimType() { - return this.nameClaimType; - } - - /** - * Set the nameClaimType property: The name of the claim that contains the users name. - * - * @param nameClaimType the nameClaimType value to set. - * @return the OpenIdConnectLogin object itself. - */ - public OpenIdConnectLogin withNameClaimType(String nameClaimType) { - this.nameClaimType = nameClaimType; - return this; - } - - /** - * Get the scopes property: A list of the scopes that should be requested while authenticating. - * - * @return the scopes value. - */ - public List scopes() { - return this.scopes; - } - - /** - * Set the scopes property: A list of the scopes that should be requested while authenticating. - * - * @param scopes the scopes value to set. - * @return the OpenIdConnectLogin object itself. - */ - public OpenIdConnectLogin withScopes(List scopes) { - this.scopes = scopes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("nameClaimType", this.nameClaimType); - jsonWriter.writeArrayField("scopes", this.scopes, (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OpenIdConnectLogin from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OpenIdConnectLogin if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OpenIdConnectLogin. - */ - public static OpenIdConnectLogin fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OpenIdConnectLogin deserializedOpenIdConnectLogin = new OpenIdConnectLogin(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("nameClaimType".equals(fieldName)) { - deserializedOpenIdConnectLogin.nameClaimType = reader.getString(); - } else if ("scopes".equals(fieldName)) { - List scopes = reader.readArray(reader1 -> reader1.getString()); - deserializedOpenIdConnectLogin.scopes = scopes; - } else { - reader.skipChildren(); - } - } - - return deserializedOpenIdConnectLogin; - }); - } -} 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 deleted file mode 100644 index 9bcbbae2afb3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectRegistration.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration settings of the app registration for the custom Open ID Connect provider. - */ -@Fluent -public final class OpenIdConnectRegistration implements JsonSerializable { - /* - * The client id of the custom Open ID Connect provider. - */ - private String clientId; - - /* - * The authentication credentials of the custom Open ID Connect provider. - */ - private OpenIdConnectClientCredential clientCredential; - - /* - * The configuration settings of the endpoints used for the custom Open ID Connect provider. - */ - private OpenIdConnectConfig openIdConnectConfiguration; - - /** - * Creates an instance of OpenIdConnectRegistration class. - */ - public OpenIdConnectRegistration() { - } - - /** - * Get the clientId property: The client id of the custom Open ID Connect provider. - * - * @return the clientId value. - */ - public String clientId() { - return this.clientId; - } - - /** - * Set the clientId property: The client id of the custom Open ID Connect provider. - * - * @param clientId the clientId value to set. - * @return the OpenIdConnectRegistration object itself. - */ - public OpenIdConnectRegistration withClientId(String clientId) { - this.clientId = clientId; - return this; - } - - /** - * Get the clientCredential property: The authentication credentials of the custom Open ID Connect provider. - * - * @return the clientCredential value. - */ - public OpenIdConnectClientCredential clientCredential() { - return this.clientCredential; - } - - /** - * Set the clientCredential property: The authentication credentials of the custom Open ID Connect provider. - * - * @param clientCredential the clientCredential value to set. - * @return the OpenIdConnectRegistration object itself. - */ - public OpenIdConnectRegistration withClientCredential(OpenIdConnectClientCredential clientCredential) { - this.clientCredential = clientCredential; - return this; - } - - /** - * Get the openIdConnectConfiguration property: The configuration settings of the endpoints used for the custom Open - * ID Connect provider. - * - * @return the openIdConnectConfiguration value. - */ - public OpenIdConnectConfig openIdConnectConfiguration() { - return this.openIdConnectConfiguration; - } - - /** - * 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. - */ - public OpenIdConnectRegistration withOpenIdConnectConfiguration(OpenIdConnectConfig openIdConnectConfiguration) { - this.openIdConnectConfiguration = openIdConnectConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (clientCredential() != null) { - clientCredential().validate(); - } - if (openIdConnectConfiguration() != null) { - openIdConnectConfiguration().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("clientId", this.clientId); - jsonWriter.writeJsonField("clientCredential", this.clientCredential); - jsonWriter.writeJsonField("openIdConnectConfiguration", this.openIdConnectConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OpenIdConnectRegistration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OpenIdConnectRegistration if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OpenIdConnectRegistration. - */ - public static OpenIdConnectRegistration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OpenIdConnectRegistration deserializedOpenIdConnectRegistration = new OpenIdConnectRegistration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("clientId".equals(fieldName)) { - deserializedOpenIdConnectRegistration.clientId = reader.getString(); - } else if ("clientCredential".equals(fieldName)) { - deserializedOpenIdConnectRegistration.clientCredential - = OpenIdConnectClientCredential.fromJson(reader); - } else if ("openIdConnectConfiguration".equals(fieldName)) { - deserializedOpenIdConnectRegistration.openIdConnectConfiguration - = OpenIdConnectConfig.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOpenIdConnectRegistration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenTelemetryConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenTelemetryConfiguration.java deleted file mode 100644 index 96a98ff4db40..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenTelemetryConfiguration.java +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Configuration of Open Telemetry. - */ -@Fluent -public final class OpenTelemetryConfiguration implements JsonSerializable { - /* - * Open telemetry destinations configuration - */ - private DestinationsConfiguration destinationsConfiguration; - - /* - * Open telemetry trace configuration - */ - private TracesConfiguration tracesConfiguration; - - /* - * Open telemetry logs configuration - */ - private LogsConfiguration logsConfiguration; - - /* - * Open telemetry metrics configuration - */ - private MetricsConfiguration metricsConfiguration; - - /** - * Creates an instance of OpenTelemetryConfiguration class. - */ - public OpenTelemetryConfiguration() { - } - - /** - * Get the destinationsConfiguration property: Open telemetry destinations configuration. - * - * @return the destinationsConfiguration value. - */ - public DestinationsConfiguration destinationsConfiguration() { - return this.destinationsConfiguration; - } - - /** - * Set the destinationsConfiguration property: Open telemetry destinations configuration. - * - * @param destinationsConfiguration the destinationsConfiguration value to set. - * @return the OpenTelemetryConfiguration object itself. - */ - public OpenTelemetryConfiguration - withDestinationsConfiguration(DestinationsConfiguration destinationsConfiguration) { - this.destinationsConfiguration = destinationsConfiguration; - return this; - } - - /** - * Get the tracesConfiguration property: Open telemetry trace configuration. - * - * @return the tracesConfiguration value. - */ - public TracesConfiguration tracesConfiguration() { - return this.tracesConfiguration; - } - - /** - * Set the tracesConfiguration property: Open telemetry trace configuration. - * - * @param tracesConfiguration the tracesConfiguration value to set. - * @return the OpenTelemetryConfiguration object itself. - */ - public OpenTelemetryConfiguration withTracesConfiguration(TracesConfiguration tracesConfiguration) { - this.tracesConfiguration = tracesConfiguration; - return this; - } - - /** - * Get the logsConfiguration property: Open telemetry logs configuration. - * - * @return the logsConfiguration value. - */ - public LogsConfiguration logsConfiguration() { - return this.logsConfiguration; - } - - /** - * Set the logsConfiguration property: Open telemetry logs configuration. - * - * @param logsConfiguration the logsConfiguration value to set. - * @return the OpenTelemetryConfiguration object itself. - */ - public OpenTelemetryConfiguration withLogsConfiguration(LogsConfiguration logsConfiguration) { - this.logsConfiguration = logsConfiguration; - return this; - } - - /** - * Get the metricsConfiguration property: Open telemetry metrics configuration. - * - * @return the metricsConfiguration value. - */ - public MetricsConfiguration metricsConfiguration() { - return this.metricsConfiguration; - } - - /** - * Set the metricsConfiguration property: Open telemetry metrics configuration. - * - * @param metricsConfiguration the metricsConfiguration value to set. - * @return the OpenTelemetryConfiguration object itself. - */ - public OpenTelemetryConfiguration withMetricsConfiguration(MetricsConfiguration metricsConfiguration) { - this.metricsConfiguration = metricsConfiguration; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (destinationsConfiguration() != null) { - destinationsConfiguration().validate(); - } - if (tracesConfiguration() != null) { - tracesConfiguration().validate(); - } - if (logsConfiguration() != null) { - logsConfiguration().validate(); - } - if (metricsConfiguration() != null) { - metricsConfiguration().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("destinationsConfiguration", this.destinationsConfiguration); - jsonWriter.writeJsonField("tracesConfiguration", this.tracesConfiguration); - jsonWriter.writeJsonField("logsConfiguration", this.logsConfiguration); - jsonWriter.writeJsonField("metricsConfiguration", this.metricsConfiguration); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OpenTelemetryConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OpenTelemetryConfiguration if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the OpenTelemetryConfiguration. - */ - public static OpenTelemetryConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OpenTelemetryConfiguration deserializedOpenTelemetryConfiguration = new OpenTelemetryConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("destinationsConfiguration".equals(fieldName)) { - deserializedOpenTelemetryConfiguration.destinationsConfiguration - = DestinationsConfiguration.fromJson(reader); - } else if ("tracesConfiguration".equals(fieldName)) { - deserializedOpenTelemetryConfiguration.tracesConfiguration = TracesConfiguration.fromJson(reader); - } else if ("logsConfiguration".equals(fieldName)) { - deserializedOpenTelemetryConfiguration.logsConfiguration = LogsConfiguration.fromJson(reader); - } else if ("metricsConfiguration".equals(fieldName)) { - deserializedOpenTelemetryConfiguration.metricsConfiguration = MetricsConfiguration.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedOpenTelemetryConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDetail.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDetail.java deleted file mode 100644 index e3796d6840cc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDetail.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; - -/** - * An immutable client-side representation of OperationDetail. - */ -public interface OperationDetail { - /** - * Gets the name property: Name of the operation. - * - * @return the name value. - */ - String name(); - - /** - * Gets the isDataAction property: Indicates whether the operation is a data action. - * - * @return the isDataAction value. - */ - Boolean isDataAction(); - - /** - * Gets the display property: Display of the operation. - * - * @return the display value. - */ - OperationDisplay display(); - - /** - * Gets the origin property: Origin of the operation. - * - * @return the origin value. - */ - String origin(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner object. - * - * @return the inner object. - */ - OperationDetailInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDisplay.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDisplay.java deleted file mode 100644 index c24950a8cf09..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDisplay.java +++ /dev/null @@ -1,177 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Operation display payload. - */ -@Fluent -public final class OperationDisplay implements JsonSerializable { - /* - * Resource provider of the operation - */ - private String provider; - - /* - * Resource of the operation - */ - private String resource; - - /* - * Localized friendly name for the operation - */ - private String operation; - - /* - * Localized friendly description for the operation - */ - private String description; - - /** - * Creates an instance of OperationDisplay class. - */ - public OperationDisplay() { - } - - /** - * Get the provider property: Resource provider of the operation. - * - * @return the provider value. - */ - public String provider() { - return this.provider; - } - - /** - * Set the provider property: Resource provider of the operation. - * - * @param provider the provider value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withProvider(String provider) { - this.provider = provider; - return this; - } - - /** - * Get the resource property: Resource of the operation. - * - * @return the resource value. - */ - public String resource() { - return this.resource; - } - - /** - * Set the resource property: Resource of the operation. - * - * @param resource the resource value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withResource(String resource) { - this.resource = resource; - return this; - } - - /** - * Get the operation property: Localized friendly name for the operation. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Set the operation property: Localized friendly name for the operation. - * - * @param operation the operation value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withOperation(String operation) { - this.operation = operation; - return this; - } - - /** - * Get the description property: Localized friendly description for the operation. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Localized friendly description for the operation. - * - * @param description the description value to set. - * @return the OperationDisplay object itself. - */ - public OperationDisplay withDescription(String description) { - this.description = description; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("provider", this.provider); - jsonWriter.writeStringField("resource", this.resource); - jsonWriter.writeStringField("operation", this.operation); - jsonWriter.writeStringField("description", this.description); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OperationDisplay from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OperationDisplay if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OperationDisplay. - */ - public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OperationDisplay deserializedOperationDisplay = new OperationDisplay(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provider".equals(fieldName)) { - deserializedOperationDisplay.provider = reader.getString(); - } else if ("resource".equals(fieldName)) { - deserializedOperationDisplay.resource = reader.getString(); - } else if ("operation".equals(fieldName)) { - deserializedOperationDisplay.operation = reader.getString(); - } else if ("description".equals(fieldName)) { - deserializedOperationDisplay.description = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedOperationDisplay; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Operations.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Operations.java deleted file mode 100644 index 387a605db0d2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Operations.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) 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 Operations. - */ -public interface Operations { - /** - * Lists all of the available RP operations. - * - * @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 available operations of the service as paginated response with {@link PagedIterable}. - */ - PagedIterable list(); - - /** - * Lists all of the available RP operations. - * - * @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 available operations of the service as paginated response with {@link PagedIterable}. - */ - PagedIterable list(Context context); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OtlpConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OtlpConfiguration.java deleted file mode 100644 index 019c556544f5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OtlpConfiguration.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Configuration of otlp. - */ -@Fluent -public final class OtlpConfiguration implements JsonSerializable { - /* - * The name of otlp configuration - */ - private String name; - - /* - * The endpoint of otlp configuration - */ - private String endpoint; - - /* - * Boolean indicating if otlp configuration is insecure - */ - private Boolean insecure; - - /* - * Headers of otlp configurations - */ - private List
headers; - - /** - * Creates an instance of OtlpConfiguration class. - */ - public OtlpConfiguration() { - } - - /** - * Get the name property: The name of otlp configuration. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The name of otlp configuration. - * - * @param name the name value to set. - * @return the OtlpConfiguration object itself. - */ - public OtlpConfiguration withName(String name) { - this.name = name; - return this; - } - - /** - * Get the endpoint property: The endpoint of otlp configuration. - * - * @return the endpoint value. - */ - public String endpoint() { - return this.endpoint; - } - - /** - * Set the endpoint property: The endpoint of otlp configuration. - * - * @param endpoint the endpoint value to set. - * @return the OtlpConfiguration object itself. - */ - public OtlpConfiguration withEndpoint(String endpoint) { - this.endpoint = endpoint; - return this; - } - - /** - * Get the insecure property: Boolean indicating if otlp configuration is insecure. - * - * @return the insecure value. - */ - public Boolean insecure() { - return this.insecure; - } - - /** - * Set the insecure property: Boolean indicating if otlp configuration is insecure. - * - * @param insecure the insecure value to set. - * @return the OtlpConfiguration object itself. - */ - public OtlpConfiguration withInsecure(Boolean insecure) { - this.insecure = insecure; - return this; - } - - /** - * Get the headers property: Headers of otlp configurations. - * - * @return the headers value. - */ - public List
headers() { - return this.headers; - } - - /** - * Set the headers property: Headers of otlp configurations. - * - * @param headers the headers value to set. - * @return the OtlpConfiguration object itself. - */ - public OtlpConfiguration withHeaders(List
headers) { - this.headers = headers; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (headers() != null) { - headers().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("endpoint", this.endpoint); - jsonWriter.writeBooleanField("insecure", this.insecure); - jsonWriter.writeArrayField("headers", this.headers, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of OtlpConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of OtlpConfiguration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the OtlpConfiguration. - */ - public static OtlpConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - OtlpConfiguration deserializedOtlpConfiguration = new OtlpConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedOtlpConfiguration.name = reader.getString(); - } else if ("endpoint".equals(fieldName)) { - deserializedOtlpConfiguration.endpoint = reader.getString(); - } else if ("insecure".equals(fieldName)) { - deserializedOtlpConfiguration.insecure = reader.getNullable(JsonReader::getBoolean); - } else if ("headers".equals(fieldName)) { - List
headers = reader.readArray(reader1 -> Header.fromJson(reader1)); - deserializedOtlpConfiguration.headers = headers; - } else { - reader.skipChildren(); - } - } - - return deserializedOtlpConfiguration; - }); - } -} 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 deleted file mode 100644 index 4b830fda01be..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchApplyStatus.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -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. - */ - 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 deleted file mode 100644 index ec63e8b856c8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchCollection.java +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * Container App patch collection. - */ -@Fluent -public final class PatchCollection implements JsonSerializable { - /* - * Collection of patch resources. - */ - private List value; - - /* - * the link to the next page of items - */ - 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); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("nextLink", this.nextLink); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PatchCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PatchCollection if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PatchCollection. - */ - public static PatchCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PatchCollection deserializedPatchCollection = new PatchCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> ContainerAppsPatchResourceInner.fromJson(reader1)); - deserializedPatchCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedPatchCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPatchCollection; - }); - } -} 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 deleted file mode 100644 index 9f7536135574..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetails.java +++ /dev/null @@ -1,203 +0,0 @@ -// Copyright (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.azure.core.util.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -/** - * The detailed info of patch operation performing when applying a patch. - */ -@Immutable -public final class PatchDetails implements JsonSerializable { - /* - * The name of the target container for the patch. - */ - private String targetContainerName; - - /* - * The name of the target image for the patch. - */ - private String targetImage; - - /* - * The UTC timestamp that describes the latest detection was done. - */ - private OffsetDateTime lastDetectionTime; - - /* - * The status of the patch detection. - */ - private DetectionStatus detectionStatus; - - /* - * The name of the new image created by the patch. - */ - private String newImageName; - - /* - * New layer update details in the target image. - */ - private PatchDetailsNewLayer newLayer; - - /* - * The old layer details in the target image. - */ - private PatchDetailsOldLayer oldLayer; - - /* - * The type for the patch. - */ - 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(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PatchDetails from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PatchDetails if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the PatchDetails. - */ - public static PatchDetails fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PatchDetails deserializedPatchDetails = new PatchDetails(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetContainerName".equals(fieldName)) { - deserializedPatchDetails.targetContainerName = reader.getString(); - } else if ("targetImage".equals(fieldName)) { - deserializedPatchDetails.targetImage = reader.getString(); - } else if ("lastDetectionTime".equals(fieldName)) { - deserializedPatchDetails.lastDetectionTime = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("detectionStatus".equals(fieldName)) { - deserializedPatchDetails.detectionStatus = DetectionStatus.fromString(reader.getString()); - } else if ("newImageName".equals(fieldName)) { - deserializedPatchDetails.newImageName = reader.getString(); - } else if ("newLayer".equals(fieldName)) { - deserializedPatchDetails.newLayer = PatchDetailsNewLayer.fromJson(reader); - } else if ("oldLayer".equals(fieldName)) { - deserializedPatchDetails.oldLayer = PatchDetailsOldLayer.fromJson(reader); - } else if ("patchType".equals(fieldName)) { - deserializedPatchDetails.patchType = PatchType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedPatchDetails; - }); - } -} 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 deleted file mode 100644 index 0e6f2b59cab2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsNewLayer.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * New layer update details in the target image. - */ -@Fluent -public final class PatchDetailsNewLayer implements JsonSerializable { - /* - * The details of the new layer for the target image. - */ - private String name; - - /* - * The framework and its version in the new run image for the target image. - */ - private String frameworkAndVersion; - - /* - * The OS name and its version in the new run image for the target image. - */ - 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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("frameworkAndVersion", this.frameworkAndVersion); - jsonWriter.writeStringField("osAndVersion", this.osAndVersion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PatchDetailsNewLayer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PatchDetailsNewLayer if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the PatchDetailsNewLayer. - */ - public static PatchDetailsNewLayer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PatchDetailsNewLayer deserializedPatchDetailsNewLayer = new PatchDetailsNewLayer(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedPatchDetailsNewLayer.name = reader.getString(); - } else if ("frameworkAndVersion".equals(fieldName)) { - deserializedPatchDetailsNewLayer.frameworkAndVersion = reader.getString(); - } else if ("osAndVersion".equals(fieldName)) { - deserializedPatchDetailsNewLayer.osAndVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPatchDetailsNewLayer; - }); - } -} 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 deleted file mode 100644 index f67ae64e7ec5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsOldLayer.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The old layer details in the target image. - */ -@Fluent -public final class PatchDetailsOldLayer implements JsonSerializable { - /* - * The details of the old layer for the target image. - */ - private String name; - - /* - * The framework and its version in the old run image for the target image. - */ - private String frameworkAndVersion; - - /* - * The OS name and its version in the old run image for the target image. - */ - 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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("frameworkAndVersion", this.frameworkAndVersion); - jsonWriter.writeStringField("osAndVersion", this.osAndVersion); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PatchDetailsOldLayer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PatchDetailsOldLayer if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the PatchDetailsOldLayer. - */ - public static PatchDetailsOldLayer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PatchDetailsOldLayer deserializedPatchDetailsOldLayer = new PatchDetailsOldLayer(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedPatchDetailsOldLayer.name = reader.getString(); - } else if ("frameworkAndVersion".equals(fieldName)) { - deserializedPatchDetailsOldLayer.frameworkAndVersion = reader.getString(); - } else if ("osAndVersion".equals(fieldName)) { - deserializedPatchDetailsOldLayer.osAndVersion = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPatchDetailsOldLayer; - }); - } -} 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 deleted file mode 100644 index 42bd0ccf9f07..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchProperties.java +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright (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.CoreUtils; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * Top level properties that describes current states of the patch resource. - */ -@Fluent -public final class PatchProperties implements JsonSerializable { - /* - * The Azure resource id of the target environment for the patch. - */ - private String targetEnvironmentId; - - /* - * The Azure resource id of the target container app for the patch. - */ - private String targetContainerAppId; - - /* - * The Azure resource id of the target revision for the patch. - */ - private String targetRevisionId; - - /* - * The status of the patch operation. - */ - private PatchApplyStatus patchApplyStatus; - - /* - * The UTC timestamp that describes when the patch object was created. - */ - private OffsetDateTime createdAt; - - /* - * The UTC timestamp that describes when the patch object was last updated. - */ - private OffsetDateTime lastModifiedAt; - - /* - * Detailed info describes the patch operation for the target container app. - */ - 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("targetEnvironmentId", this.targetEnvironmentId); - jsonWriter.writeStringField("targetContainerAppId", this.targetContainerAppId); - jsonWriter.writeStringField("targetRevisionId", this.targetRevisionId); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PatchProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PatchProperties if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the PatchProperties. - */ - public static PatchProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PatchProperties deserializedPatchProperties = new PatchProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetEnvironmentId".equals(fieldName)) { - deserializedPatchProperties.targetEnvironmentId = reader.getString(); - } else if ("targetContainerAppId".equals(fieldName)) { - deserializedPatchProperties.targetContainerAppId = reader.getString(); - } else if ("targetRevisionId".equals(fieldName)) { - deserializedPatchProperties.targetRevisionId = reader.getString(); - } else if ("patchApplyStatus".equals(fieldName)) { - deserializedPatchProperties.patchApplyStatus = PatchApplyStatus.fromString(reader.getString()); - } else if ("createdAt".equals(fieldName)) { - deserializedPatchProperties.createdAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("lastModifiedAt".equals(fieldName)) { - deserializedPatchProperties.lastModifiedAt = reader - .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString())); - } else if ("patchDetails".equals(fieldName)) { - List patchDetails = reader.readArray(reader1 -> PatchDetails.fromJson(reader1)); - deserializedPatchProperties.patchDetails = patchDetails; - } else { - reader.skipChildren(); - } - } - - return deserializedPatchProperties; - }); - } -} 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 deleted file mode 100644 index 8d8868383d61..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchSkipConfig.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The configuration for patcher to skip a patch or not. - */ -@Fluent -public final class PatchSkipConfig implements JsonSerializable { - /* - * The flag to indicate whether to skip the patch or not. - */ - 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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("skip", this.skip); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PatchSkipConfig from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PatchSkipConfig if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the PatchSkipConfig. - */ - public static PatchSkipConfig fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PatchSkipConfig deserializedPatchSkipConfig = new PatchSkipConfig(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("skip".equals(fieldName)) { - deserializedPatchSkipConfig.skip = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedPatchSkipConfig; - }); - } -} 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 deleted file mode 100644 index 3ee6cd1a3fd4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -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. - */ - 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 deleted file mode 100644 index f2f90e3e0956..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchingMode.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -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. - */ - 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 deleted file mode 100644 index a7c307747cd0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PoolManagementType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -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. - */ - 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/PreBuildStep.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PreBuildStep.java deleted file mode 100644 index cfc480dae4f8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PreBuildStep.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Model representing a pre-build step. - */ -@Fluent -public final class PreBuildStep implements JsonSerializable { - /* - * Description of the pre-build step. - */ - private String description; - - /* - * List of custom commands to run. - */ - private List scripts; - - /* - * Http get request to send before the build. - */ - private HttpGet httpGet; - - /** - * Creates an instance of PreBuildStep class. - */ - public PreBuildStep() { - } - - /** - * Get the description property: Description of the pre-build step. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description of the pre-build step. - * - * @param description the description value to set. - * @return the PreBuildStep object itself. - */ - public PreBuildStep withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the scripts property: List of custom commands to run. - * - * @return the scripts value. - */ - public List scripts() { - return this.scripts; - } - - /** - * Set the scripts property: List of custom commands to run. - * - * @param scripts the scripts value to set. - * @return the PreBuildStep object itself. - */ - public PreBuildStep withScripts(List scripts) { - this.scripts = scripts; - return this; - } - - /** - * Get the httpGet property: Http get request to send before the build. - * - * @return the httpGet value. - */ - public HttpGet httpGet() { - return this.httpGet; - } - - /** - * Set the httpGet property: Http get request to send before the build. - * - * @param httpGet the httpGet value to set. - * @return the PreBuildStep object itself. - */ - public PreBuildStep withHttpGet(HttpGet httpGet) { - this.httpGet = httpGet; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (httpGet() != null) { - httpGet().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeArrayField("scripts", this.scripts, (writer, element) -> writer.writeString(element)); - jsonWriter.writeJsonField("httpGet", this.httpGet); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PreBuildStep from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PreBuildStep if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the PreBuildStep. - */ - public static PreBuildStep fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PreBuildStep deserializedPreBuildStep = new PreBuildStep(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("description".equals(fieldName)) { - deserializedPreBuildStep.description = reader.getString(); - } else if ("scripts".equals(fieldName)) { - List scripts = reader.readArray(reader1 -> reader1.getString()); - deserializedPreBuildStep.scripts = scripts; - } else if ("httpGet".equals(fieldName)) { - deserializedPreBuildStep.httpGet = HttpGet.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedPreBuildStep; - }); - } -} 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 deleted file mode 100644 index 93625e4abf73..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpoint.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Immutable; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * The Private Endpoint resource. - */ -@Immutable -public final class PrivateEndpoint implements JsonSerializable { - /* - * The ARM identifier for Private Endpoint - */ - 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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpoint from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpoint if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateEndpoint. - */ - public static PrivateEndpoint fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpoint deserializedPrivateEndpoint = new PrivateEndpoint(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedPrivateEndpoint.id = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpoint; - }); - } -} diff --git a/sdk/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 deleted file mode 100644 index d0cd177423c3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnection.java +++ /dev/null @@ -1,245 +0,0 @@ -// Copyright (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 deleted file mode 100644 index 75d88ee3d0b9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnectionListResult.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateEndpointConnectionInner; -import java.io.IOException; -import java.util.List; - -/** - * List of private endpoint connection associated with the specified resource. - */ -@Fluent -public final class PrivateEndpointConnectionListResult - implements JsonSerializable { - /* - * Array of private endpoint connections - */ - private List value; - - /* - * URL to get the next set of operation list results (if there are any). - */ - 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateEndpointConnectionListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateEndpointConnectionListResult if the JsonReader was pointing to an instance of it, - * or null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateEndpointConnectionListResult. - */ - public static PrivateEndpointConnectionListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateEndpointConnectionListResult deserializedPrivateEndpointConnectionListResult - = new PrivateEndpointConnectionListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> PrivateEndpointConnectionInner.fromJson(reader1)); - deserializedPrivateEndpointConnectionListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedPrivateEndpointConnectionListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateEndpointConnectionListResult; - }); - } -} diff --git a/sdk/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 deleted file mode 100644 index 8f010fe26dd4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointConnectionProvisioningState.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -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. - */ - 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 deleted file mode 100644 index b56460c10ee8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateEndpointServiceConnectionStatus.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.models; - -import com.azure.core.util.ExpandableStringEnum; -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. - */ - 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 deleted file mode 100644 index 43ea727b07d3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkResource.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.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 deleted file mode 100644 index c6e6c7160c7c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkResourceListResult.java +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.PrivateLinkResourceInner; -import java.io.IOException; -import java.util.List; - -/** - * A list of private link resources. - */ -@Fluent -public final class PrivateLinkResourceListResult implements JsonSerializable { - /* - * Array of private link resources - */ - private List value; - - /* - * URL to get the next set of operation list results (if there are any). - */ - 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkResourceListResult from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkResourceListResult if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateLinkResourceListResult. - */ - public static PrivateLinkResourceListResult fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkResourceListResult deserializedPrivateLinkResourceListResult - = new PrivateLinkResourceListResult(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value - = reader.readArray(reader1 -> PrivateLinkResourceInner.fromJson(reader1)); - deserializedPrivateLinkResourceListResult.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedPrivateLinkResourceListResult.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkResourceListResult; - }); - } -} diff --git a/sdk/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 deleted file mode 100644 index 0c31b2ae3d9c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PrivateLinkServiceConnectionState.java +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * A collection of information about the state of the connection between service consumer and provider. - */ -@Fluent -public final class PrivateLinkServiceConnectionState implements JsonSerializable { - /* - * Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. - */ - private PrivateEndpointServiceConnectionStatus status; - - /* - * The reason for approval/rejection of the connection. - */ - private String description; - - /* - * A message indicating if changes on the service provider require any updates on the consumer. - */ - 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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - jsonWriter.writeStringField("description", this.description); - jsonWriter.writeStringField("actionsRequired", this.actionsRequired); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of PrivateLinkServiceConnectionState from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of PrivateLinkServiceConnectionState if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the PrivateLinkServiceConnectionState. - */ - public static PrivateLinkServiceConnectionState fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - PrivateLinkServiceConnectionState deserializedPrivateLinkServiceConnectionState - = new PrivateLinkServiceConnectionState(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.status - = PrivateEndpointServiceConnectionStatus.fromString(reader.getString()); - } else if ("description".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.description = reader.getString(); - } else if ("actionsRequired".equals(fieldName)) { - deserializedPrivateLinkServiceConnectionState.actionsRequired = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedPrivateLinkServiceConnectionState; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PublicNetworkAccess.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PublicNetworkAccess.java deleted file mode 100644 index 0dacf1daad39..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PublicNetworkAccess.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Property to allow or block all public traffic. Allowed Values: 'Enabled', 'Disabled'. - */ -public final class PublicNetworkAccess extends ExpandableStringEnum { - /** - * Static value Enabled for PublicNetworkAccess. - */ - public static final PublicNetworkAccess ENABLED = fromString("Enabled"); - - /** - * Static value Disabled for PublicNetworkAccess. - */ - public static final PublicNetworkAccess DISABLED = fromString("Disabled"); - - /** - * Creates a new instance of PublicNetworkAccess value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public PublicNetworkAccess() { - } - - /** - * Creates or finds a PublicNetworkAccess from its string representation. - * - * @param name a name to look for. - * @return the corresponding PublicNetworkAccess. - */ - public static PublicNetworkAccess fromString(String name) { - return fromString(name, PublicNetworkAccess.class); - } - - /** - * Gets known PublicNetworkAccess values. - * - * @return known PublicNetworkAccess values. - */ - public static Collection values() { - return values(PublicNetworkAccess.class); - } -} diff --git a/sdk/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 deleted file mode 100644 index 207032b0546c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QueueScaleRule.java +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Container App container Azure Queue based scaling rule. - */ -@Fluent -public final class QueueScaleRule implements JsonSerializable { - /* - * Storage account name. required if using managed identity to authenticate - */ - private String accountName; - - /* - * Queue name. - */ - private String queueName; - - /* - * Queue length. - */ - private Integer queueLength; - - /* - * Authentication secrets for the queue scale rule. - */ - 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. - */ - 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. - * - * @return the queueName value. - */ - public String queueName() { - return this.queueName; - } - - /** - * Set the queueName property: Queue name. - * - * @param queueName the queueName value to set. - * @return the QueueScaleRule object itself. - */ - public QueueScaleRule withQueueName(String queueName) { - this.queueName = queueName; - return this; - } - - /** - * Get the queueLength property: Queue length. - * - * @return the queueLength value. - */ - public Integer queueLength() { - return this.queueLength; - } - - /** - * Set the queueLength property: Queue length. - * - * @param queueLength the queueLength value to set. - * @return the QueueScaleRule object itself. - */ - public QueueScaleRule withQueueLength(Integer queueLength) { - this.queueLength = queueLength; - return this; - } - - /** - * Get the auth property: Authentication secrets for the queue scale rule. - * - * @return the auth value. - */ - public List auth() { - return this.auth; - } - - /** - * Set the auth property: Authentication secrets for the queue scale rule. - * - * @param auth the auth value to set. - * @return the QueueScaleRule object itself. - */ - public QueueScaleRule withAuth(List auth) { - this.auth = 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. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (auth() != null) { - auth().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("accountName", this.accountName); - jsonWriter.writeStringField("queueName", this.queueName); - jsonWriter.writeNumberField("queueLength", this.queueLength); - jsonWriter.writeArrayField("auth", this.auth, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of QueueScaleRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of QueueScaleRule if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the QueueScaleRule. - */ - public static QueueScaleRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - QueueScaleRule deserializedQueueScaleRule = new QueueScaleRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("accountName".equals(fieldName)) { - deserializedQueueScaleRule.accountName = reader.getString(); - } else if ("queueName".equals(fieldName)) { - deserializedQueueScaleRule.queueName = reader.getString(); - } else if ("queueLength".equals(fieldName)) { - deserializedQueueScaleRule.queueLength = reader.getNullable(JsonReader::getInt); - } else if ("auth".equals(fieldName)) { - List auth = reader.readArray(reader1 -> ScaleRuleAuth.fromJson(reader1)); - deserializedQueueScaleRule.auth = auth; - } else if ("identity".equals(fieldName)) { - deserializedQueueScaleRule.identity = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedQueueScaleRule; - }); - } -} 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 deleted file mode 100644 index 0321d642e9a4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryCredentials.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container App Private Registry. - */ -@Fluent -public final class RegistryCredentials implements JsonSerializable { - /* - * Container Registry Server - */ - private String server; - - /* - * Container Registry Username - */ - private String username; - - /* - * The name of the Secret that contains the registry login password - */ - 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' - */ - private String identity; - - /** - * Creates an instance of RegistryCredentials class. - */ - public RegistryCredentials() { - } - - /** - * Get the server property: Container Registry Server. - * - * @return the server value. - */ - public String server() { - return this.server; - } - - /** - * Set the server property: Container Registry Server. - * - * @param server the server value to set. - * @return the RegistryCredentials object itself. - */ - public RegistryCredentials withServer(String server) { - this.server = server; - 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 RegistryCredentials object itself. - */ - public RegistryCredentials 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 RegistryCredentials object itself. - */ - public RegistryCredentials withPasswordSecretRef(String passwordSecretRef) { - this.passwordSecretRef = passwordSecretRef; - return this; - } - - /** - * Get the identity property: 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'. - * - * @return the identity value. - */ - public String identity() { - return this.identity; - } - - /** - * Set the identity property: 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'. - * - * @param identity the identity value to set. - * @return the RegistryCredentials object itself. - */ - public RegistryCredentials withIdentity(String identity) { - this.identity = identity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("server", this.server); - jsonWriter.writeStringField("username", this.username); - jsonWriter.writeStringField("passwordSecretRef", this.passwordSecretRef); - jsonWriter.writeStringField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryCredentials from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryCredentials if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the RegistryCredentials. - */ - public static RegistryCredentials fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryCredentials deserializedRegistryCredentials = new RegistryCredentials(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("server".equals(fieldName)) { - deserializedRegistryCredentials.server = reader.getString(); - } else if ("username".equals(fieldName)) { - deserializedRegistryCredentials.username = reader.getString(); - } else if ("passwordSecretRef".equals(fieldName)) { - deserializedRegistryCredentials.passwordSecretRef = reader.getString(); - } else if ("identity".equals(fieldName)) { - deserializedRegistryCredentials.identity = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryCredentials; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryInfo.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryInfo.java deleted file mode 100644 index cd2e6ce356d3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryInfo.java +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container App registry information. - */ -@Fluent -public final class RegistryInfo implements JsonSerializable { - /* - * registry server Url. - */ - private String registryUrl; - - /* - * registry username. - */ - private String registryUsername; - - /* - * registry secret. - */ - private String registryPassword; - - /** - * Creates an instance of RegistryInfo class. - */ - public RegistryInfo() { - } - - /** - * Get the registryUrl property: registry server Url. - * - * @return the registryUrl value. - */ - public String registryUrl() { - return this.registryUrl; - } - - /** - * Set the registryUrl property: registry server Url. - * - * @param registryUrl the registryUrl value to set. - * @return the RegistryInfo object itself. - */ - public RegistryInfo withRegistryUrl(String registryUrl) { - this.registryUrl = registryUrl; - return this; - } - - /** - * Get the registryUsername property: registry username. - * - * @return the registryUsername value. - */ - public String registryUsername() { - return this.registryUsername; - } - - /** - * Set the registryUsername property: registry username. - * - * @param registryUsername the registryUsername value to set. - * @return the RegistryInfo object itself. - */ - public RegistryInfo withRegistryUsername(String registryUsername) { - this.registryUsername = registryUsername; - return this; - } - - /** - * Get the registryPassword property: registry secret. - * - * @return the registryPassword value. - */ - public String registryPassword() { - return this.registryPassword; - } - - /** - * Set the registryPassword property: registry secret. - * - * @param registryPassword the registryPassword value to set. - * @return the RegistryInfo object itself. - */ - public RegistryInfo withRegistryPassword(String registryPassword) { - this.registryPassword = registryPassword; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("registryUrl", this.registryUrl); - jsonWriter.writeStringField("registryUserName", this.registryUsername); - jsonWriter.writeStringField("registryPassword", this.registryPassword); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RegistryInfo from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RegistryInfo if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the RegistryInfo. - */ - public static RegistryInfo fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RegistryInfo deserializedRegistryInfo = new RegistryInfo(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("registryUrl".equals(fieldName)) { - deserializedRegistryInfo.registryUrl = reader.getString(); - } else if ("registryUserName".equals(fieldName)) { - deserializedRegistryInfo.registryUsername = reader.getString(); - } else if ("registryPassword".equals(fieldName)) { - deserializedRegistryInfo.registryPassword = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRegistryInfo; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Replica.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Replica.java deleted file mode 100644 index 7c9a93485af9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Replica.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.models; - -import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import java.time.OffsetDateTime; -import java.util.List; - -/** - * An immutable client-side representation of Replica. - */ -public interface Replica { - /** - * 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 createdTime property: Timestamp describing when the pod was created by controller. - * - * @return the createdTime value. - */ - OffsetDateTime createdTime(); - - /** - * Gets the runningState property: Current running state of the replica. - * - * @return the runningState value. - */ - ContainerAppReplicaRunningState runningState(); - - /** - * Gets the runningStateDetails property: The details of replica current running state. - * - * @return the runningStateDetails value. - */ - String runningStateDetails(); - - /** - * Gets the containers property: The containers collection under a replica. - * - * @return the containers value. - */ - List containers(); - - /** - * Gets the initContainers property: The init containers collection under a replica. - * - * @return the initContainers value. - */ - List initContainers(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner object. - * - * @return the inner object. - */ - ReplicaInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaCollection.java deleted file mode 100644 index 5f224d043a2a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaCollection.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.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner; -import java.util.List; - -/** - * An immutable client-side representation of ReplicaCollection. - */ -public interface ReplicaCollection { - /** - * Gets the value property: Collection of resources. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner object. - * - * @return the inner object. - */ - ReplicaCollectionInner innerModel(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java deleted file mode 100644 index 28823652940e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java +++ /dev/null @@ -1,286 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container object under Container App Revision Replica. - */ -@Fluent -public final class ReplicaContainer implements JsonSerializable { - /* - * The Name of the Container - */ - private String name; - - /* - * The Id of the Container - */ - private String containerId; - - /* - * The container ready status - */ - private Boolean ready; - - /* - * The container start status - */ - private Boolean started; - - /* - * The container restart count - */ - private Integer restartCount; - - /* - * Current running state of the container - */ - private ContainerAppContainerRunningState runningState; - - /* - * The details of container current running state - */ - private String runningStateDetails; - - /* - * Log Stream endpoint - */ - private String logStreamEndpoint; - - /* - * Container exec endpoint - */ - private String execEndpoint; - - /* - * Container debug endpoint - */ - private String debugEndpoint; - - /** - * Creates an instance of ReplicaContainer class. - */ - public ReplicaContainer() { - } - - /** - * Get the name property: The Name of the Container. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: The Name of the Container. - * - * @param name the name value to set. - * @return the ReplicaContainer object itself. - */ - public ReplicaContainer withName(String name) { - this.name = name; - return this; - } - - /** - * Get the containerId property: The Id of the Container. - * - * @return the containerId value. - */ - public String containerId() { - return this.containerId; - } - - /** - * Set the containerId property: The Id of the Container. - * - * @param containerId the containerId value to set. - * @return the ReplicaContainer object itself. - */ - public ReplicaContainer withContainerId(String containerId) { - this.containerId = containerId; - return this; - } - - /** - * Get the ready property: The container ready status. - * - * @return the ready value. - */ - public Boolean ready() { - return this.ready; - } - - /** - * Set the ready property: The container ready status. - * - * @param ready the ready value to set. - * @return the ReplicaContainer object itself. - */ - public ReplicaContainer withReady(Boolean ready) { - this.ready = ready; - return this; - } - - /** - * Get the started property: The container start status. - * - * @return the started value. - */ - public Boolean started() { - return this.started; - } - - /** - * Set the started property: The container start status. - * - * @param started the started value to set. - * @return the ReplicaContainer object itself. - */ - public ReplicaContainer withStarted(Boolean started) { - this.started = started; - return this; - } - - /** - * Get the restartCount property: The container restart count. - * - * @return the restartCount value. - */ - public Integer restartCount() { - return this.restartCount; - } - - /** - * Set the restartCount property: The container restart count. - * - * @param restartCount the restartCount value to set. - * @return the ReplicaContainer object itself. - */ - public ReplicaContainer withRestartCount(Integer restartCount) { - this.restartCount = restartCount; - return this; - } - - /** - * Get the runningState property: Current running state of the container. - * - * @return the runningState value. - */ - public ContainerAppContainerRunningState runningState() { - return this.runningState; - } - - /** - * Get the runningStateDetails property: The details of container current running state. - * - * @return the runningStateDetails value. - */ - public String runningStateDetails() { - return this.runningStateDetails; - } - - /** - * Get the logStreamEndpoint property: Log Stream endpoint. - * - * @return the logStreamEndpoint value. - */ - public String logStreamEndpoint() { - return this.logStreamEndpoint; - } - - /** - * Get the execEndpoint property: Container exec endpoint. - * - * @return the execEndpoint value. - */ - public String execEndpoint() { - return this.execEndpoint; - } - - /** - * Get the debugEndpoint property: Container debug endpoint. - * - * @return the debugEndpoint value. - */ - public String debugEndpoint() { - return this.debugEndpoint; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("containerId", this.containerId); - jsonWriter.writeBooleanField("ready", this.ready); - jsonWriter.writeBooleanField("started", this.started); - jsonWriter.writeNumberField("restartCount", this.restartCount); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicaContainer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicaContainer if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicaContainer. - */ - public static ReplicaContainer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicaContainer deserializedReplicaContainer = new ReplicaContainer(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedReplicaContainer.name = reader.getString(); - } else if ("containerId".equals(fieldName)) { - deserializedReplicaContainer.containerId = reader.getString(); - } else if ("ready".equals(fieldName)) { - deserializedReplicaContainer.ready = reader.getNullable(JsonReader::getBoolean); - } else if ("started".equals(fieldName)) { - deserializedReplicaContainer.started = reader.getNullable(JsonReader::getBoolean); - } else if ("restartCount".equals(fieldName)) { - deserializedReplicaContainer.restartCount = reader.getNullable(JsonReader::getInt); - } else if ("runningState".equals(fieldName)) { - deserializedReplicaContainer.runningState - = ContainerAppContainerRunningState.fromString(reader.getString()); - } else if ("runningStateDetails".equals(fieldName)) { - deserializedReplicaContainer.runningStateDetails = reader.getString(); - } else if ("logStreamEndpoint".equals(fieldName)) { - deserializedReplicaContainer.logStreamEndpoint = reader.getString(); - } else if ("execEndpoint".equals(fieldName)) { - deserializedReplicaContainer.execEndpoint = reader.getString(); - } else if ("debugEndpoint".equals(fieldName)) { - deserializedReplicaContainer.debugEndpoint = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedReplicaContainer; - }); - } -} 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 deleted file mode 100644 index d8f1625fade8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaExecutionStatus.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Container Apps Job execution replica status. - */ -@Fluent -public final class ReplicaExecutionStatus implements JsonSerializable { - /* - * Replica Name. - */ - private String name; - - /* - * Containers in the execution replica - */ - 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeArrayField("containers", this.containers, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ReplicaExecutionStatus from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ReplicaExecutionStatus if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the ReplicaExecutionStatus. - */ - public static ReplicaExecutionStatus fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ReplicaExecutionStatus deserializedReplicaExecutionStatus = new ReplicaExecutionStatus(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedReplicaExecutionStatus.name = reader.getString(); - } else if ("containers".equals(fieldName)) { - List containers - = reader.readArray(reader1 -> ContainerExecutionStatus.fromJson(reader1)); - deserializedReplicaExecutionStatus.containers = containers; - } else { - reader.skipChildren(); - } - } - - return deserializedReplicaExecutionStatus; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ResourceProviders.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ResourceProviders.java deleted file mode 100644 index 11d4944e9880..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ResourceProviders.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.models; - -import com.azure.core.http.rest.Response; -import com.azure.core.util.Context; - -/** - * Resource collection API of ResourceProviders. - */ -public interface ResourceProviders { - /** - * Get details of a single job execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a single job execution along with {@link Response}. - */ - Response jobExecutionWithResponse(String resourceGroupName, String jobName, String jobExecutionName, - Context context); - - /** - * Get details of a single job execution. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param jobName Job Name. - * @param jobExecutionName Job execution name. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return details of a single job execution. - */ - JobExecution jobExecution(String resourceGroupName, String jobName, String jobExecutionName); - - /** - * Get the verification id of a subscription used for verifying custom domains. - * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the verification id of a subscription used for verifying custom domains along with {@link Response}. - */ - Response getCustomDomainVerificationIdWithResponse(Context context); - - /** - * Get the verification id of a subscription used for verifying custom domains. - * - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the verification id of a subscription used for verifying custom domains. - */ - String getCustomDomainVerificationId(); -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java deleted file mode 100644 index 5f83c296e50c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (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.RevisionInner; -import java.time.OffsetDateTime; - -/** - * An immutable client-side representation of Revision. - */ -public interface Revision { - /** - * 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 createdTime property: Timestamp describing when the revision was created - * by controller. - * - * @return the createdTime value. - */ - OffsetDateTime createdTime(); - - /** - * Gets the lastActiveTime property: Timestamp describing when the revision was last active. Only meaningful when - * revision is inactive. - * - * @return the lastActiveTime value. - */ - OffsetDateTime lastActiveTime(); - - /** - * Gets the fqdn property: Fully qualified domain name of the revision. - * - * @return the fqdn value. - */ - String fqdn(); - - /** - * Gets the template property: Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated - * as they were at the creation time. - * - * @return the template value. - */ - Template template(); - - /** - * Gets the active property: Boolean describing if the Revision is Active. - * - * @return the active value. - */ - Boolean active(); - - /** - * Gets the replicas property: Number of pods currently running for this revision. - * - * @return the replicas value. - */ - Integer replicas(); - - /** - * Gets the trafficWeight property: Traffic weight assigned to this revision. - * - * @return the trafficWeight value. - */ - Integer trafficWeight(); - - /** - * Gets the provisioningError property: Optional Field - Platform Error Message. - * - * @return the provisioningError value. - */ - String provisioningError(); - - /** - * Gets the healthState property: Current health State of the revision. - * - * @return the healthState value. - */ - RevisionHealthState healthState(); - - /** - * Gets the provisioningState property: Current provisioning State of the revision. - * - * @return the provisioningState value. - */ - RevisionProvisioningState provisioningState(); - - /** - * Gets the runningState property: Current running state of the revision. - * - * @return the runningState value. - */ - RevisionRunningState runningState(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner object. - * - * @return the inner object. - */ - RevisionInner innerModel(); -} 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 deleted file mode 100644 index 92a177df8042..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionCollection.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import java.io.IOException; -import java.util.List; - -/** - * Container App Revisions collection ARM resource. - */ -@Fluent -public final class RevisionCollection implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of RevisionCollection class. - */ - public RevisionCollection() { - } - - /** - * 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 RevisionCollection object itself. - */ - public RevisionCollection 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 RevisionCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(RevisionCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RevisionCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RevisionCollection if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the RevisionCollection. - */ - public static RevisionCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RevisionCollection deserializedRevisionCollection = new RevisionCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> RevisionInner.fromJson(reader1)); - deserializedRevisionCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedRevisionCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedRevisionCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionHealthState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionHealthState.java deleted file mode 100644 index 4a3c0e74cd96..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionHealthState.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Current health State of the revision. - */ -public final class RevisionHealthState extends ExpandableStringEnum { - /** - * Static value Healthy for RevisionHealthState. - */ - public static final RevisionHealthState HEALTHY = fromString("Healthy"); - - /** - * Static value Unhealthy for RevisionHealthState. - */ - public static final RevisionHealthState UNHEALTHY = fromString("Unhealthy"); - - /** - * Static value None for RevisionHealthState. - */ - public static final RevisionHealthState NONE = fromString("None"); - - /** - * Creates a new instance of RevisionHealthState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RevisionHealthState() { - } - - /** - * Creates or finds a RevisionHealthState from its string representation. - * - * @param name a name to look for. - * @return the corresponding RevisionHealthState. - */ - public static RevisionHealthState fromString(String name) { - return fromString(name, RevisionHealthState.class); - } - - /** - * Gets known RevisionHealthState values. - * - * @return known RevisionHealthState values. - */ - public static Collection values() { - return values(RevisionHealthState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionProvisioningState.java deleted file mode 100644 index 1d30087e32ed..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionProvisioningState.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Current provisioning State of the revision. - */ -public final class RevisionProvisioningState extends ExpandableStringEnum { - /** - * Static value Provisioning for RevisionProvisioningState. - */ - public static final RevisionProvisioningState PROVISIONING = fromString("Provisioning"); - - /** - * Static value Provisioned for RevisionProvisioningState. - */ - public static final RevisionProvisioningState PROVISIONED = fromString("Provisioned"); - - /** - * Static value Failed for RevisionProvisioningState. - */ - public static final RevisionProvisioningState FAILED = fromString("Failed"); - - /** - * Static value Deprovisioning for RevisionProvisioningState. - */ - public static final RevisionProvisioningState DEPROVISIONING = fromString("Deprovisioning"); - - /** - * Static value Deprovisioned for RevisionProvisioningState. - */ - public static final RevisionProvisioningState DEPROVISIONED = fromString("Deprovisioned"); - - /** - * Creates a new instance of RevisionProvisioningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RevisionProvisioningState() { - } - - /** - * Creates or finds a RevisionProvisioningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding RevisionProvisioningState. - */ - public static RevisionProvisioningState fromString(String name) { - return fromString(name, RevisionProvisioningState.class); - } - - /** - * Gets known RevisionProvisioningState values. - * - * @return known RevisionProvisioningState values. - */ - public static Collection values() { - return values(RevisionProvisioningState.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionRunningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionRunningState.java deleted file mode 100644 index d5ec4ea95a50..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionRunningState.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Current running state of the revision. - */ -public final class RevisionRunningState extends ExpandableStringEnum { - /** - * Static value Running for RevisionRunningState. - */ - public static final RevisionRunningState RUNNING = fromString("Running"); - - /** - * Static value Processing for RevisionRunningState. - */ - public static final RevisionRunningState PROCESSING = fromString("Processing"); - - /** - * Static value Stopped for RevisionRunningState. - */ - public static final RevisionRunningState STOPPED = fromString("Stopped"); - - /** - * Static value Degraded for RevisionRunningState. - */ - public static final RevisionRunningState DEGRADED = fromString("Degraded"); - - /** - * Static value Failed for RevisionRunningState. - */ - public static final RevisionRunningState FAILED = fromString("Failed"); - - /** - * Static value Unknown for RevisionRunningState. - */ - public static final RevisionRunningState UNKNOWN = fromString("Unknown"); - - /** - * Creates a new instance of RevisionRunningState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public RevisionRunningState() { - } - - /** - * Creates or finds a RevisionRunningState from its string representation. - * - * @param name a name to look for. - * @return the corresponding RevisionRunningState. - */ - public static RevisionRunningState fromString(String name) { - return fromString(name, RevisionRunningState.class); - } - - /** - * Gets known RevisionRunningState values. - * - * @return known RevisionRunningState values. - */ - public static Collection values() { - return values(RevisionRunningState.class); - } -} 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 deleted file mode 100644 index 22dc30e0dfea..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Runtime.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container App Runtime configuration. - */ -@Fluent -public final class Runtime implements JsonSerializable { - /* - * Java app configuration - */ - private RuntimeJava java; - - /* - * .NET app configuration - */ - 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(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("java", this.java); - jsonWriter.writeJsonField("dotnet", this.dotnet); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Runtime from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Runtime if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Runtime. - */ - public static Runtime fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Runtime deserializedRuntime = new Runtime(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("java".equals(fieldName)) { - deserializedRuntime.java = RuntimeJava.fromJson(reader); - } else if ("dotnet".equals(fieldName)) { - deserializedRuntime.dotnet = RuntimeDotnet.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRuntime; - }); - } -} 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 deleted file mode 100644 index 7014ac13eed6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeDotnet.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * .NET app configuration. - */ -@Fluent -public final class RuntimeDotnet implements JsonSerializable { - /* - * Auto configure the ASP.NET Core Data Protection feature - */ - 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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("autoConfigureDataProtection", this.autoConfigureDataProtection); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RuntimeDotnet from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RuntimeDotnet if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the RuntimeDotnet. - */ - public static RuntimeDotnet fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RuntimeDotnet deserializedRuntimeDotnet = new RuntimeDotnet(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("autoConfigureDataProtection".equals(fieldName)) { - deserializedRuntimeDotnet.autoConfigureDataProtection = reader.getNullable(JsonReader::getBoolean); - } else { - reader.skipChildren(); - } - } - - return deserializedRuntimeDotnet; - }); - } -} 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 deleted file mode 100644 index 93e9e6efbbd2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJava.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Java app configuration. - */ -@Fluent -public final class RuntimeJava implements JsonSerializable { - /* - * Enable jmx core metrics for the java app - */ - private Boolean enableMetrics; - - /* - * Diagnostic capabilities achieved by java agent - */ - 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(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enableMetrics", this.enableMetrics); - jsonWriter.writeJsonField("javaAgent", this.javaAgent); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RuntimeJava from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RuntimeJava if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the RuntimeJava. - */ - public static RuntimeJava fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RuntimeJava deserializedRuntimeJava = new RuntimeJava(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enableMetrics".equals(fieldName)) { - deserializedRuntimeJava.enableMetrics = reader.getNullable(JsonReader::getBoolean); - } else if ("javaAgent".equals(fieldName)) { - deserializedRuntimeJava.javaAgent = RuntimeJavaAgent.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRuntimeJava; - }); - } -} 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 deleted file mode 100644 index 4287f43e0134..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgent.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Diagnostic capabilities achieved by java agent. - */ -@Fluent -public final class RuntimeJavaAgent implements JsonSerializable { - /* - * Enable java agent injection for the java app. - */ - private Boolean enabled; - - /* - * Capabilities on the java logging scenario. - */ - 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(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeBooleanField("enabled", this.enabled); - jsonWriter.writeJsonField("logging", this.logging); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RuntimeJavaAgent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RuntimeJavaAgent if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the RuntimeJavaAgent. - */ - public static RuntimeJavaAgent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RuntimeJavaAgent deserializedRuntimeJavaAgent = new RuntimeJavaAgent(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("enabled".equals(fieldName)) { - deserializedRuntimeJavaAgent.enabled = reader.getNullable(JsonReader::getBoolean); - } else if ("logging".equals(fieldName)) { - deserializedRuntimeJavaAgent.logging = RuntimeJavaAgentLogging.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedRuntimeJavaAgent; - }); - } -} 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 deleted file mode 100644 index eeda05ff1b8d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgentLogging.java +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Capabilities on the java logging scenario. - */ -@Fluent -public final class RuntimeJavaAgentLogging implements JsonSerializable { - /* - * Settings of the logger for the java app. - */ - 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()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("loggerSettings", this.loggerSettings, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of RuntimeJavaAgentLogging from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of RuntimeJavaAgentLogging if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IOException If an error occurs while reading the RuntimeJavaAgentLogging. - */ - public static RuntimeJavaAgentLogging fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - RuntimeJavaAgentLogging deserializedRuntimeJavaAgentLogging = new RuntimeJavaAgentLogging(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("loggerSettings".equals(fieldName)) { - List loggerSettings = reader.readArray(reader1 -> LoggerSetting.fromJson(reader1)); - deserializedRuntimeJavaAgentLogging.loggerSettings = loggerSettings; - } else { - reader.skipChildren(); - } - } - - return deserializedRuntimeJavaAgentLogging; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scale.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scale.java deleted file mode 100644 index a4dd0926cc51..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scale.java +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Container App scaling configurations. - */ -@Fluent -public final class Scale implements JsonSerializable { - /* - * Optional. Minimum number of container replicas. - */ - private Integer minReplicas; - - /* - * Optional. Maximum number of container replicas. Defaults to 10 if not set. - */ - private Integer maxReplicas; - - /* - * Optional. KEDA Cooldown Period. Defaults to 300 seconds if not set. - */ - private Integer cooldownPeriod; - - /* - * Optional. KEDA Polling Interval. Defaults to 30 seconds if not set. - */ - private Integer pollingInterval; - - /* - * Scaling rules. - */ - private List rules; - - /** - * Creates an instance of Scale class. - */ - public Scale() { - } - - /** - * Get the minReplicas property: Optional. Minimum number of container replicas. - * - * @return the minReplicas value. - */ - public Integer minReplicas() { - return this.minReplicas; - } - - /** - * Set the minReplicas property: Optional. Minimum number of container replicas. - * - * @param minReplicas the minReplicas value to set. - * @return the Scale object itself. - */ - public Scale withMinReplicas(Integer minReplicas) { - this.minReplicas = minReplicas; - return this; - } - - /** - * Get the maxReplicas property: Optional. Maximum number of container replicas. Defaults to 10 if not set. - * - * @return the maxReplicas value. - */ - public Integer maxReplicas() { - return this.maxReplicas; - } - - /** - * Set the maxReplicas property: Optional. Maximum number of container replicas. Defaults to 10 if not set. - * - * @param maxReplicas the maxReplicas value to set. - * @return the Scale object itself. - */ - public Scale withMaxReplicas(Integer maxReplicas) { - this.maxReplicas = maxReplicas; - return this; - } - - /** - * Get the cooldownPeriod property: Optional. KEDA Cooldown Period. Defaults to 300 seconds if not set. - * - * @return the cooldownPeriod value. - */ - public Integer cooldownPeriod() { - return this.cooldownPeriod; - } - - /** - * Set the cooldownPeriod property: Optional. KEDA Cooldown Period. Defaults to 300 seconds if not set. - * - * @param cooldownPeriod the cooldownPeriod value to set. - * @return the Scale object itself. - */ - public Scale withCooldownPeriod(Integer cooldownPeriod) { - this.cooldownPeriod = cooldownPeriod; - return this; - } - - /** - * Get the pollingInterval property: Optional. KEDA Polling Interval. Defaults to 30 seconds if not set. - * - * @return the pollingInterval value. - */ - public Integer pollingInterval() { - return this.pollingInterval; - } - - /** - * Set the pollingInterval property: Optional. KEDA Polling Interval. Defaults to 30 seconds if not set. - * - * @param pollingInterval the pollingInterval value to set. - * @return the Scale object itself. - */ - public Scale withPollingInterval(Integer pollingInterval) { - this.pollingInterval = pollingInterval; - return this; - } - - /** - * Get the rules property: Scaling rules. - * - * @return the rules value. - */ - public List rules() { - return this.rules; - } - - /** - * Set the rules property: Scaling rules. - * - * @param rules the rules value to set. - * @return the Scale object itself. - */ - public Scale withRules(List rules) { - this.rules = rules; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (rules() != null) { - rules().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("minReplicas", this.minReplicas); - jsonWriter.writeNumberField("maxReplicas", this.maxReplicas); - jsonWriter.writeNumberField("cooldownPeriod", this.cooldownPeriod); - jsonWriter.writeNumberField("pollingInterval", this.pollingInterval); - jsonWriter.writeArrayField("rules", this.rules, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Scale from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Scale if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Scale. - */ - public static Scale fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Scale deserializedScale = new Scale(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("minReplicas".equals(fieldName)) { - deserializedScale.minReplicas = reader.getNullable(JsonReader::getInt); - } else if ("maxReplicas".equals(fieldName)) { - deserializedScale.maxReplicas = reader.getNullable(JsonReader::getInt); - } else if ("cooldownPeriod".equals(fieldName)) { - deserializedScale.cooldownPeriod = reader.getNullable(JsonReader::getInt); - } else if ("pollingInterval".equals(fieldName)) { - deserializedScale.pollingInterval = reader.getNullable(JsonReader::getInt); - } else if ("rules".equals(fieldName)) { - List rules = reader.readArray(reader1 -> ScaleRule.fromJson(reader1)); - deserializedScale.rules = rules; - } else { - reader.skipChildren(); - } - } - - return deserializedScale; - }); - } -} 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 deleted file mode 100644 index 2450afb2fa28..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleConfiguration.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Scale configuration. - */ -@Fluent -public final class ScaleConfiguration implements JsonSerializable { - /* - * The maximum count of sessions at the same time. - */ - private Integer maxConcurrentSessions; - - /* - * The minimum count of ready session instances. - */ - 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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("maxConcurrentSessions", this.maxConcurrentSessions); - jsonWriter.writeNumberField("readySessionInstances", this.readySessionInstances); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScaleConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScaleConfiguration if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ScaleConfiguration. - */ - public static ScaleConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScaleConfiguration deserializedScaleConfiguration = new ScaleConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maxConcurrentSessions".equals(fieldName)) { - deserializedScaleConfiguration.maxConcurrentSessions = reader.getNullable(JsonReader::getInt); - } else if ("readySessionInstances".equals(fieldName)) { - deserializedScaleConfiguration.readySessionInstances = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedScaleConfiguration; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRule.java deleted file mode 100644 index 1600f1fe5965..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRule.java +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container App container scaling rule. - */ -@Fluent -public final class ScaleRule implements JsonSerializable { - /* - * Scale Rule Name - */ - private String name; - - /* - * Azure Queue based scaling. - */ - private QueueScaleRule azureQueue; - - /* - * Custom scale rule. - */ - private CustomScaleRule custom; - - /* - * HTTP requests based scaling. - */ - private HttpScaleRule http; - - /* - * Tcp requests based scaling. - */ - private TcpScaleRule tcp; - - /** - * Creates an instance of ScaleRule class. - */ - public ScaleRule() { - } - - /** - * Get the name property: Scale Rule Name. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Scale Rule Name. - * - * @param name the name value to set. - * @return the ScaleRule object itself. - */ - public ScaleRule withName(String name) { - this.name = name; - return this; - } - - /** - * Get the azureQueue property: Azure Queue based scaling. - * - * @return the azureQueue value. - */ - public QueueScaleRule azureQueue() { - return this.azureQueue; - } - - /** - * Set the azureQueue property: Azure Queue based scaling. - * - * @param azureQueue the azureQueue value to set. - * @return the ScaleRule object itself. - */ - public ScaleRule withAzureQueue(QueueScaleRule azureQueue) { - this.azureQueue = azureQueue; - return this; - } - - /** - * Get the custom property: Custom scale rule. - * - * @return the custom value. - */ - public CustomScaleRule custom() { - return this.custom; - } - - /** - * Set the custom property: Custom scale rule. - * - * @param custom the custom value to set. - * @return the ScaleRule object itself. - */ - public ScaleRule withCustom(CustomScaleRule custom) { - this.custom = custom; - return this; - } - - /** - * Get the http property: HTTP requests based scaling. - * - * @return the http value. - */ - public HttpScaleRule http() { - return this.http; - } - - /** - * Set the http property: HTTP requests based scaling. - * - * @param http the http value to set. - * @return the ScaleRule object itself. - */ - public ScaleRule withHttp(HttpScaleRule http) { - this.http = http; - return this; - } - - /** - * Get the tcp property: Tcp requests based scaling. - * - * @return the tcp value. - */ - public TcpScaleRule tcp() { - return this.tcp; - } - - /** - * Set the tcp property: Tcp requests based scaling. - * - * @param tcp the tcp value to set. - * @return the ScaleRule object itself. - */ - public ScaleRule withTcp(TcpScaleRule tcp) { - this.tcp = tcp; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (azureQueue() != null) { - azureQueue().validate(); - } - if (custom() != null) { - custom().validate(); - } - if (http() != null) { - http().validate(); - } - if (tcp() != null) { - tcp().validate(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeJsonField("azureQueue", this.azureQueue); - jsonWriter.writeJsonField("custom", this.custom); - jsonWriter.writeJsonField("http", this.http); - jsonWriter.writeJsonField("tcp", this.tcp); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScaleRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScaleRule if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the ScaleRule. - */ - public static ScaleRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScaleRule deserializedScaleRule = new ScaleRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedScaleRule.name = reader.getString(); - } else if ("azureQueue".equals(fieldName)) { - deserializedScaleRule.azureQueue = QueueScaleRule.fromJson(reader); - } else if ("custom".equals(fieldName)) { - deserializedScaleRule.custom = CustomScaleRule.fromJson(reader); - } else if ("http".equals(fieldName)) { - deserializedScaleRule.http = HttpScaleRule.fromJson(reader); - } else if ("tcp".equals(fieldName)) { - deserializedScaleRule.tcp = TcpScaleRule.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedScaleRule; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRuleAuth.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRuleAuth.java deleted file mode 100644 index 484986dbf8e0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRuleAuth.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Auth Secrets for Scale Rule. - */ -@Fluent -public final class ScaleRuleAuth implements JsonSerializable { - /* - * Name of the secret from which to pull the auth params. - */ - private String secretRef; - - /* - * Trigger Parameter that uses the secret - */ - private String triggerParameter; - - /** - * Creates an instance of ScaleRuleAuth class. - */ - public ScaleRuleAuth() { - } - - /** - * Get the secretRef property: Name of the secret from which to pull the auth params. - * - * @return the secretRef value. - */ - public String secretRef() { - return this.secretRef; - } - - /** - * Set the secretRef property: Name of the secret from which to pull the auth params. - * - * @param secretRef the secretRef value to set. - * @return the ScaleRuleAuth object itself. - */ - public ScaleRuleAuth withSecretRef(String secretRef) { - this.secretRef = secretRef; - return this; - } - - /** - * Get the triggerParameter property: Trigger Parameter that uses the secret. - * - * @return the triggerParameter value. - */ - public String triggerParameter() { - return this.triggerParameter; - } - - /** - * Set the triggerParameter property: Trigger Parameter that uses the secret. - * - * @param triggerParameter the triggerParameter value to set. - * @return the ScaleRuleAuth object itself. - */ - public ScaleRuleAuth withTriggerParameter(String triggerParameter) { - this.triggerParameter = triggerParameter; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("secretRef", this.secretRef); - jsonWriter.writeStringField("triggerParameter", this.triggerParameter); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScaleRuleAuth from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScaleRuleAuth if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ScaleRuleAuth. - */ - public static ScaleRuleAuth fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScaleRuleAuth deserializedScaleRuleAuth = new ScaleRuleAuth(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("secretRef".equals(fieldName)) { - deserializedScaleRuleAuth.secretRef = reader.getString(); - } else if ("triggerParameter".equals(fieldName)) { - deserializedScaleRuleAuth.triggerParameter = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedScaleRuleAuth; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScgRoute.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScgRoute.java deleted file mode 100644 index 05dd4be6c060..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScgRoute.java +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Spring Cloud Gateway route definition. - */ -@Fluent -public final class ScgRoute implements JsonSerializable { - /* - * Id of the route - */ - private String id; - - /* - * Uri of the route - */ - private String uri; - - /* - * Predicates of the route - */ - private List predicates; - - /* - * Filters of the route - */ - private List filters; - - /* - * Order of the route - */ - private Long order; - - /** - * Creates an instance of ScgRoute class. - */ - public ScgRoute() { - } - - /** - * Get the id property: Id of the route. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Set the id property: Id of the route. - * - * @param id the id value to set. - * @return the ScgRoute object itself. - */ - public ScgRoute withId(String id) { - this.id = id; - return this; - } - - /** - * Get the uri property: Uri of the route. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Set the uri property: Uri of the route. - * - * @param uri the uri value to set. - * @return the ScgRoute object itself. - */ - public ScgRoute withUri(String uri) { - this.uri = uri; - return this; - } - - /** - * Get the predicates property: Predicates of the route. - * - * @return the predicates value. - */ - public List predicates() { - return this.predicates; - } - - /** - * Set the predicates property: Predicates of the route. - * - * @param predicates the predicates value to set. - * @return the ScgRoute object itself. - */ - public ScgRoute withPredicates(List predicates) { - this.predicates = predicates; - return this; - } - - /** - * Get the filters property: Filters of the route. - * - * @return the filters value. - */ - public List filters() { - return this.filters; - } - - /** - * Set the filters property: Filters of the route. - * - * @param filters the filters value to set. - * @return the ScgRoute object itself. - */ - public ScgRoute withFilters(List filters) { - this.filters = filters; - return this; - } - - /** - * Get the order property: Order of the route. - * - * @return the order value. - */ - public Long order() { - return this.order; - } - - /** - * Set the order property: Order of the route. - * - * @param order the order value to set. - * @return the ScgRoute object itself. - */ - public ScgRoute withOrder(Long order) { - this.order = order; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (id() == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Missing required property id in model ScgRoute")); - } - if (uri() == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Missing required property uri in model ScgRoute")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(ScgRoute.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("id", this.id); - jsonWriter.writeStringField("uri", this.uri); - jsonWriter.writeArrayField("predicates", this.predicates, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("filters", this.filters, (writer, element) -> writer.writeString(element)); - jsonWriter.writeNumberField("order", this.order); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ScgRoute from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ScgRoute if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the ScgRoute. - */ - public static ScgRoute fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ScgRoute deserializedScgRoute = new ScgRoute(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("id".equals(fieldName)) { - deserializedScgRoute.id = reader.getString(); - } else if ("uri".equals(fieldName)) { - deserializedScgRoute.uri = reader.getString(); - } else if ("predicates".equals(fieldName)) { - List predicates = reader.readArray(reader1 -> reader1.getString()); - deserializedScgRoute.predicates = predicates; - } else if ("filters".equals(fieldName)) { - List filters = reader.readArray(reader1 -> reader1.getString()); - deserializedScgRoute.filters = filters; - } else if ("order".equals(fieldName)) { - deserializedScgRoute.order = reader.getNullable(JsonReader::getLong); - } else { - reader.skipChildren(); - } - } - - return deserializedScgRoute; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scheme.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scheme.java deleted file mode 100644 index 7e5db52178ca..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scheme.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Scheme to use for connecting to the host. Defaults to HTTP. - */ -public final class Scheme extends ExpandableStringEnum { - /** - * Static value HTTP for Scheme. - */ - public static final Scheme HTTP = fromString("HTTP"); - - /** - * Static value HTTPS for Scheme. - */ - public static final Scheme HTTPS = fromString("HTTPS"); - - /** - * Creates a new instance of Scheme value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public Scheme() { - } - - /** - * Creates or finds a Scheme from its string representation. - * - * @param name a name to look for. - * @return the corresponding Scheme. - */ - public static Scheme fromString(String name) { - return fromString(name, Scheme.class); - } - - /** - * Gets known Scheme values. - * - * @return known Scheme values. - */ - public static Collection values() { - return values(Scheme.class); - } -} 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 deleted file mode 100644 index 34838a2bb6e5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Secret.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Secret definition. - */ -@Fluent -public final class Secret implements JsonSerializable { - /* - * Secret Name. - */ - private String name; - - /* - * Secret Value. - */ - private String value; - - /* - * Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned - * identity. - */ - private String identity; - - /* - * Azure Key Vault URL pointing to the secret referenced by the container app. - */ - private String keyVaultUrl; - - /** - * Creates an instance of Secret class. - */ - public Secret() { - } - - /** - * 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 Secret object itself. - */ - public Secret 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 Secret object itself. - */ - public Secret withValue(String value) { - this.value = value; - return this; - } - - /** - * Get the identity property: Resource ID of a managed identity to authenticate with Azure Key Vault, or System to - * use a system-assigned identity. - * - * @return the identity value. - */ - public String identity() { - return this.identity; - } - - /** - * Set the identity property: Resource ID of a managed identity to authenticate with Azure Key Vault, or System to - * use a system-assigned identity. - * - * @param identity the identity value to set. - * @return the Secret object itself. - */ - public Secret withIdentity(String identity) { - this.identity = identity; - return this; - } - - /** - * Get the keyVaultUrl property: Azure Key Vault URL pointing to the secret referenced by the container app. - * - * @return the keyVaultUrl value. - */ - public String keyVaultUrl() { - return this.keyVaultUrl; - } - - /** - * Set the keyVaultUrl property: Azure Key Vault URL pointing to the secret referenced by the container app. - * - * @param keyVaultUrl the keyVaultUrl value to set. - * @return the Secret object itself. - */ - public Secret withKeyVaultUrl(String keyVaultUrl) { - this.keyVaultUrl = keyVaultUrl; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("value", this.value); - jsonWriter.writeStringField("identity", this.identity); - jsonWriter.writeStringField("keyVaultUrl", this.keyVaultUrl); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Secret from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Secret if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IOException If an error occurs while reading the Secret. - */ - public static Secret fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Secret deserializedSecret = new Secret(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedSecret.name = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedSecret.value = reader.getString(); - } else if ("identity".equals(fieldName)) { - deserializedSecret.identity = reader.getString(); - } else if ("keyVaultUrl".equals(fieldName)) { - deserializedSecret.keyVaultUrl = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSecret; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretVolumeItem.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretVolumeItem.java deleted file mode 100644 index c1bc22b58433..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretVolumeItem.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Secret to be added to volume. - */ -@Fluent -public final class SecretVolumeItem implements JsonSerializable { - /* - * Name of the Container App secret from which to pull the secret value. - */ - private String secretRef; - - /* - * Path to project secret to. If no path is provided, path defaults to name of secret listed in secretRef. - */ - private String path; - - /** - * Creates an instance of SecretVolumeItem class. - */ - public SecretVolumeItem() { - } - - /** - * Get the secretRef property: Name of the Container App secret from which to pull the secret value. - * - * @return the secretRef value. - */ - public String secretRef() { - return this.secretRef; - } - - /** - * Set the secretRef property: Name of the Container App secret from which to pull the secret value. - * - * @param secretRef the secretRef value to set. - * @return the SecretVolumeItem object itself. - */ - public SecretVolumeItem withSecretRef(String secretRef) { - this.secretRef = secretRef; - return this; - } - - /** - * Get the path property: Path to project secret to. If no path is provided, path defaults to name of secret listed - * in secretRef. - * - * @return the path value. - */ - public String path() { - return this.path; - } - - /** - * Set the path property: Path to project secret to. If no path is provided, path defaults to name of secret listed - * in secretRef. - * - * @param path the path value to set. - * @return the SecretVolumeItem object itself. - */ - public SecretVolumeItem withPath(String path) { - this.path = path; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("secretRef", this.secretRef); - jsonWriter.writeStringField("path", this.path); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SecretVolumeItem from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SecretVolumeItem if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SecretVolumeItem. - */ - public static SecretVolumeItem fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SecretVolumeItem deserializedSecretVolumeItem = new SecretVolumeItem(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("secretRef".equals(fieldName)) { - deserializedSecretVolumeItem.secretRef = reader.getString(); - } else if ("path".equals(fieldName)) { - deserializedSecretVolumeItem.path = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSecretVolumeItem; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretsCollection.java deleted file mode 100644 index a7c46963e8e3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretsCollection.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.models; - -import com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner; -import java.util.List; - -/** - * An immutable client-side representation of SecretsCollection. - */ -public interface SecretsCollection { - /** - * Gets the value property: Collection of resources. - * - * @return the value value. - */ - List value(); - - /** - * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner object. - * - * @return the inner object. - */ - SecretsCollectionInner innerModel(); -} 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 deleted file mode 100644 index df27e5741c47..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Service.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container App to be a dev service. - */ -@Fluent -public final class Service implements JsonSerializable { - /* - * Dev ContainerApp service type - */ - private String type; - - /** - * Creates an instance of Service class. - */ - public Service() { - } - - /** - * Get the type property: Dev ContainerApp service type. - * - * @return the type value. - */ - public String type() { - return this.type; - } - - /** - * Set the type property: Dev ContainerApp service type. - * - * @param type the type value to set. - * @return the Service object itself. - */ - public Service withType(String type) { - this.type = type; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (type() == null) { - throw LOGGER.atError().log(new IllegalArgumentException("Missing required property type in model Service")); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(Service.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("type", this.type); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of Service from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of Service if the JsonReader was pointing to an instance of it, or null if it was pointing to - * JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the Service. - */ - public static Service fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - Service deserializedService = new Service(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("type".equals(fieldName)) { - deserializedService.type = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedService; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ServiceBind.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ServiceBind.java deleted file mode 100644 index 07493cbd84d3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ServiceBind.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.Map; - -/** - * Configuration to bind a ContainerApp to a dev ContainerApp Service. - */ -@Fluent -public final class ServiceBind implements JsonSerializable { - /* - * Resource id of the target service - */ - private String serviceId; - - /* - * Name of the service bind - */ - private String name; - - /* - * Type of the client to be used to connect to the service - */ - private String clientType; - - /* - * Customized keys for customizing injected values to the app - */ - private Map customizedKeys; - - /** - * Creates an instance of ServiceBind class. - */ - public ServiceBind() { - } - - /** - * Get the serviceId property: Resource id of the target service. - * - * @return the serviceId value. - */ - public String serviceId() { - return this.serviceId; - } - - /** - * Set the serviceId property: Resource id of the target service. - * - * @param serviceId the serviceId value to set. - * @return the ServiceBind object itself. - */ - public ServiceBind withServiceId(String serviceId) { - this.serviceId = serviceId; - return this; - } - - /** - * Get the name property: Name of the service bind. - * - * @return the name value. - */ - public String name() { - return this.name; - } - - /** - * Set the name property: Name of the service bind. - * - * @param name the name value to set. - * @return the ServiceBind object itself. - */ - public ServiceBind withName(String name) { - this.name = name; - return this; - } - - /** - * Get the clientType property: Type of the client to be used to connect to the service. - * - * @return the clientType value. - */ - public String clientType() { - return this.clientType; - } - - /** - * Set the clientType property: Type of the client to be used to connect to the service. - * - * @param clientType the clientType value to set. - * @return the ServiceBind object itself. - */ - public ServiceBind withClientType(String clientType) { - this.clientType = clientType; - return this; - } - - /** - * Get the customizedKeys property: Customized keys for customizing injected values to the app. - * - * @return the customizedKeys value. - */ - public Map customizedKeys() { - return this.customizedKeys; - } - - /** - * Set the customizedKeys property: Customized keys for customizing injected values to the app. - * - * @param customizedKeys the customizedKeys value to set. - * @return the ServiceBind object itself. - */ - public ServiceBind withCustomizedKeys(Map customizedKeys) { - this.customizedKeys = customizedKeys; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("serviceId", this.serviceId); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("clientType", this.clientType); - jsonWriter.writeMapField("customizedKeys", this.customizedKeys, - (writer, element) -> writer.writeString(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of ServiceBind from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of ServiceBind if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the ServiceBind. - */ - public static ServiceBind fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - ServiceBind deserializedServiceBind = new ServiceBind(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("serviceId".equals(fieldName)) { - deserializedServiceBind.serviceId = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedServiceBind.name = reader.getString(); - } else if ("clientType".equals(fieldName)) { - deserializedServiceBind.clientType = reader.getString(); - } else if ("customizedKeys".equals(fieldName)) { - Map customizedKeys = reader.readMap(reader1 -> reader1.getString()); - deserializedServiceBind.customizedKeys = customizedKeys; - } else { - reader.skipChildren(); - } - } - - return deserializedServiceBind; - }); - } -} 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 deleted file mode 100644 index f762c588cbc3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionContainer.java +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Container definitions for the sessions of the session pool. - */ -@Fluent -public final class SessionContainer implements JsonSerializable { - /* - * Container image tag. - */ - private String image; - - /* - * Custom container name. - */ - private String name; - - /* - * Container start command. - */ - private List command; - - /* - * Container start command arguments. - */ - private List args; - - /* - * Container environment variables. - */ - private List env; - - /* - * Container resource requirements. - */ - 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(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("image", this.image); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeArrayField("command", this.command, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("args", this.args, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("env", this.env, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("resources", this.resources); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SessionContainer from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SessionContainer if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SessionContainer. - */ - public static SessionContainer fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SessionContainer deserializedSessionContainer = new SessionContainer(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("image".equals(fieldName)) { - deserializedSessionContainer.image = reader.getString(); - } else if ("name".equals(fieldName)) { - deserializedSessionContainer.name = reader.getString(); - } else if ("command".equals(fieldName)) { - List command = reader.readArray(reader1 -> reader1.getString()); - deserializedSessionContainer.command = command; - } else if ("args".equals(fieldName)) { - List args = reader.readArray(reader1 -> reader1.getString()); - deserializedSessionContainer.args = args; - } else if ("env".equals(fieldName)) { - List env = reader.readArray(reader1 -> EnvironmentVar.fromJson(reader1)); - deserializedSessionContainer.env = env; - } else if ("resources".equals(fieldName)) { - deserializedSessionContainer.resources = SessionContainerResources.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSessionContainer; - }); - } -} 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 deleted file mode 100644 index 3a8dc5ac072f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionContainerResources.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Container resource requirements for sessions of the session pool. - */ -@Fluent -public final class SessionContainerResources implements JsonSerializable { - /* - * Required CPU in cores, e.g. 0.5 - */ - private Double cpu; - - /* - * Required memory, e.g. "250Mb" - */ - 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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("cpu", this.cpu); - jsonWriter.writeStringField("memory", this.memory); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SessionContainerResources from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SessionContainerResources if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SessionContainerResources. - */ - public static SessionContainerResources fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SessionContainerResources deserializedSessionContainerResources = new SessionContainerResources(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("cpu".equals(fieldName)) { - deserializedSessionContainerResources.cpu = reader.getNullable(JsonReader::getDouble); - } else if ("memory".equals(fieldName)) { - deserializedSessionContainerResources.memory = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSessionContainerResources; - }); - } -} 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 deleted file mode 100644 index 59b318068c96..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionIngress.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Session pool ingress configuration. - */ -@Fluent -public final class SessionIngress implements JsonSerializable { - /* - * Target port in containers for traffic from ingress - */ - 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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("targetPort", this.targetPort); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SessionIngress from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SessionIngress if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SessionIngress. - */ - public static SessionIngress fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SessionIngress deserializedSessionIngress = new SessionIngress(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("targetPort".equals(fieldName)) { - deserializedSessionIngress.targetPort = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedSessionIngress; - }); - } -} 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 deleted file mode 100644 index 36279a48ba12..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionNetworkConfiguration.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.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Session network configuration. - */ -@Fluent -public final class SessionNetworkConfiguration implements JsonSerializable { - /* - * Network status for the sessions. - */ - 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() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SessionNetworkConfiguration from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SessionNetworkConfiguration if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SessionNetworkConfiguration. - */ - public static SessionNetworkConfiguration fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SessionNetworkConfiguration deserializedSessionNetworkConfiguration = new SessionNetworkConfiguration(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("status".equals(fieldName)) { - deserializedSessionNetworkConfiguration.status - = SessionNetworkStatus.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSessionNetworkConfiguration; - }); - } -} 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 deleted file mode 100644 index e6e7e6b37e90..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionNetworkStatus.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.models; - -import com.azure.core.util.ExpandableStringEnum; -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. - */ - 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 deleted file mode 100644 index 563164248f5c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPool.java +++ /dev/null @@ -1,481 +0,0 @@ -// Copyright (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 deleted file mode 100644 index 17bf43464241..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolCollection.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.SessionPoolInner; -import java.io.IOException; -import java.util.List; - -/** - * Session pool collection Azure resource. - */ -@Fluent -public final class SessionPoolCollection implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - 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); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SessionPoolCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SessionPoolCollection if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SessionPoolCollection. - */ - public static SessionPoolCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SessionPoolCollection deserializedSessionPoolCollection = new SessionPoolCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> SessionPoolInner.fromJson(reader1)); - deserializedSessionPoolCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedSessionPoolCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSessionPoolCollection; - }); - } -} 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 deleted file mode 100644 index 8b4fd83bbc76..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolProvisioningState.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.models; - -import com.azure.core.util.ExpandableStringEnum; -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. - */ - 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/SessionPoolSecret.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolSecret.java deleted file mode 100644 index 4d80150f7cf5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolSecret.java +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Secret definition. - */ -@Fluent -public final class SessionPoolSecret implements JsonSerializable { - /* - * Secret Name. - */ - private String name; - - /* - * Secret Value. - */ - private String value; - - /** - * Creates an instance of SessionPoolSecret class. - */ - public SessionPoolSecret() { - } - - /** - * 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 SessionPoolSecret object itself. - */ - public SessionPoolSecret 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 SessionPoolSecret object itself. - */ - public SessionPoolSecret withValue(String value) { - this.value = value; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("name", this.name); - jsonWriter.writeStringField("value", this.value); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SessionPoolSecret from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SessionPoolSecret if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the SessionPoolSecret. - */ - public static SessionPoolSecret fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SessionPoolSecret deserializedSessionPoolSecret = new SessionPoolSecret(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("name".equals(fieldName)) { - deserializedSessionPoolSecret.name = reader.getString(); - } else if ("value".equals(fieldName)) { - deserializedSessionPoolSecret.value = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSessionPoolSecret; - }); - } -} 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 deleted file mode 100644 index de08b47b1586..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionPoolUpdatableProperties.java +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.SessionPoolUpdatablePropertiesProperties; -import java.io.IOException; -import java.util.List; - -/** - * Container App session pool updatable properties. - */ -@Fluent -public final class SessionPoolUpdatableProperties implements JsonSerializable { - /* - * Session pool resource specific updatable 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(); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeJsonField("properties", this.innerProperties); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SessionPoolUpdatableProperties from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SessionPoolUpdatableProperties if the JsonReader was pointing to an instance of it, or - * null if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SessionPoolUpdatableProperties. - */ - public static SessionPoolUpdatableProperties fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SessionPoolUpdatableProperties deserializedSessionPoolUpdatableProperties - = new SessionPoolUpdatableProperties(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("properties".equals(fieldName)) { - deserializedSessionPoolUpdatableProperties.innerProperties - = SessionPoolUpdatablePropertiesProperties.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSessionPoolUpdatableProperties; - }); - } -} 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 deleted file mode 100644 index 8ae7f727a55f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SessionRegistryCredentials.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Session pool private registry credentials. - */ -@Fluent -public final class SessionRegistryCredentials implements JsonSerializable { - /* - * Container registry server. - */ - private String server; - - /* - * Container registry username. - */ - private String username; - - /* - * The name of the secret that contains the registry login password - */ - 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' - */ - private String identity; - - /** - * Creates an instance of SessionRegistryCredentials class. - */ - public SessionRegistryCredentials() { - } - - /** - * Get the server property: Container registry server. - * - * @return the server value. - */ - public String server() { - return this.server; - } - - /** - * Set the server property: Container registry server. - * - * @param server the server value to set. - * @return the SessionRegistryCredentials object itself. - */ - public SessionRegistryCredentials withServer(String server) { - this.server = server; - 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; - } - - /** - * Get the identity property: 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'. - * - * @return the identity value. - */ - public String identity() { - return this.identity; - } - - /** - * Set the identity property: 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'. - * - * @param identity the identity value to set. - * @return the SessionRegistryCredentials object itself. - */ - public SessionRegistryCredentials withIdentity(String identity) { - this.identity = identity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("server", this.server); - jsonWriter.writeStringField("username", this.username); - jsonWriter.writeStringField("passwordSecretRef", this.passwordSecretRef); - jsonWriter.writeStringField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SessionRegistryCredentials from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SessionRegistryCredentials if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SessionRegistryCredentials. - */ - public static SessionRegistryCredentials fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SessionRegistryCredentials deserializedSessionRegistryCredentials = new SessionRegistryCredentials(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("server".equals(fieldName)) { - deserializedSessionRegistryCredentials.server = reader.getString(); - } else if ("username".equals(fieldName)) { - deserializedSessionRegistryCredentials.username = reader.getString(); - } else if ("passwordSecretRef".equals(fieldName)) { - deserializedSessionRegistryCredentials.passwordSecretRef = reader.getString(); - } else if ("identity".equals(fieldName)) { - deserializedSessionRegistryCredentials.identity = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSessionRegistryCredentials; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SmbStorage.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SmbStorage.java deleted file mode 100644 index c5667f1d4fb2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SmbStorage.java +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * SMB storage properties. - */ -@Fluent -public final class SmbStorage implements JsonSerializable { - /* - * The host name or IP address of the SMB server. - */ - private String host; - - /* - * The path to the SMB shared folder. - */ - private String shareName; - - /* - * The user to log on to the SMB server. - */ - private String username; - - /* - * The domain name for the user. - */ - private String domain; - - /* - * The password for the user. - */ - private String password; - - /* - * Access mode for storage - */ - private AccessMode accessMode; - - /** - * Creates an instance of SmbStorage class. - */ - public SmbStorage() { - } - - /** - * Get the host property: The host name or IP address of the SMB server. - * - * @return the host value. - */ - public String host() { - return this.host; - } - - /** - * Set the host property: The host name or IP address of the SMB server. - * - * @param host the host value to set. - * @return the SmbStorage object itself. - */ - public SmbStorage withHost(String host) { - this.host = host; - return this; - } - - /** - * Get the shareName property: The path to the SMB shared folder. - * - * @return the shareName value. - */ - public String shareName() { - return this.shareName; - } - - /** - * Set the shareName property: The path to the SMB shared folder. - * - * @param shareName the shareName value to set. - * @return the SmbStorage object itself. - */ - public SmbStorage withShareName(String shareName) { - this.shareName = shareName; - return this; - } - - /** - * Get the username property: The user to log on to the SMB server. - * - * @return the username value. - */ - public String username() { - return this.username; - } - - /** - * Set the username property: The user to log on to the SMB server. - * - * @param username the username value to set. - * @return the SmbStorage object itself. - */ - public SmbStorage withUsername(String username) { - this.username = username; - return this; - } - - /** - * Get the domain property: The domain name for the user. - * - * @return the domain value. - */ - public String domain() { - return this.domain; - } - - /** - * Set the domain property: The domain name for the user. - * - * @param domain the domain value to set. - * @return the SmbStorage object itself. - */ - public SmbStorage withDomain(String domain) { - this.domain = domain; - return this; - } - - /** - * Get the password property: The password for the user. - * - * @return the password value. - */ - public String password() { - return this.password; - } - - /** - * Set the password property: The password for the user. - * - * @param password the password value to set. - * @return the SmbStorage object itself. - */ - public SmbStorage withPassword(String password) { - this.password = password; - return this; - } - - /** - * Get the accessMode property: Access mode for storage. - * - * @return the accessMode value. - */ - public AccessMode accessMode() { - return this.accessMode; - } - - /** - * Set the accessMode property: Access mode for storage. - * - * @param accessMode the accessMode value to set. - * @return the SmbStorage object itself. - */ - public SmbStorage withAccessMode(AccessMode accessMode) { - this.accessMode = accessMode; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeStringField("host", this.host); - jsonWriter.writeStringField("shareName", this.shareName); - jsonWriter.writeStringField("username", this.username); - jsonWriter.writeStringField("domain", this.domain); - jsonWriter.writeStringField("password", this.password); - jsonWriter.writeStringField("accessMode", this.accessMode == null ? null : this.accessMode.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SmbStorage from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SmbStorage if the JsonReader was pointing to an instance of it, or null if it was pointing - * to JSON null. - * @throws IOException If an error occurs while reading the SmbStorage. - */ - public static SmbStorage fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SmbStorage deserializedSmbStorage = new SmbStorage(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("host".equals(fieldName)) { - deserializedSmbStorage.host = reader.getString(); - } else if ("shareName".equals(fieldName)) { - deserializedSmbStorage.shareName = reader.getString(); - } else if ("username".equals(fieldName)) { - deserializedSmbStorage.username = reader.getString(); - } else if ("domain".equals(fieldName)) { - deserializedSmbStorage.domain = reader.getString(); - } else if ("password".equals(fieldName)) { - deserializedSmbStorage.password = reader.getString(); - } else if ("accessMode".equals(fieldName)) { - deserializedSmbStorage.accessMode = AccessMode.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSmbStorage; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControl.java deleted file mode 100644 index bb8d64ff2fbf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControl.java +++ /dev/null @@ -1,302 +0,0 @@ -// Copyright (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.SourceControlInner; - -/** - * An immutable client-side representation of SourceControl. - */ -public interface SourceControl { - /** - * 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 operationState property: Current provisioning State of the operation. - * - * @return the operationState value. - */ - SourceControlOperationState operationState(); - - /** - * Gets the repoUrl property: The repo url which will be integrated to ContainerApp. - * - * @return the repoUrl value. - */ - String repoUrl(); - - /** - * Gets the branch property: The branch which will trigger the auto deployment. - * - * @return the branch value. - */ - String branch(); - - /** - * Gets the githubActionConfiguration property: Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated - * as they were at the creation time. - * - * @return the githubActionConfiguration value. - */ - GithubActionConfiguration githubActionConfiguration(); - - /** - * 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.SourceControlInner object. - * - * @return the inner object. - */ - SourceControlInner innerModel(); - - /** - * The entirety of the SourceControl definition. - */ - interface Definition - extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { - } - - /** - * The SourceControl definition stages. - */ - interface DefinitionStages { - /** - * The first stage of the SourceControl definition. - */ - interface Blank extends WithParentResource { - } - - /** - * The stage of the SourceControl definition allowing to specify parent resource. - */ - interface WithParentResource { - /** - * Specifies resourceGroupName, containerAppName. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @return the next definition stage. - */ - WithCreate withExistingContainerApp(String resourceGroupName, String containerAppName); - } - - /** - * The stage of the SourceControl 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.WithRepoUrl, DefinitionStages.WithBranch, - DefinitionStages.WithGithubActionConfiguration, DefinitionStages.WithXMsGithubAuxiliary { - /** - * Executes the create request. - * - * @return the created resource. - */ - SourceControl create(); - - /** - * Executes the create request. - * - * @param context The context to associate with this operation. - * @return the created resource. - */ - SourceControl create(Context context); - } - - /** - * The stage of the SourceControl definition allowing to specify repoUrl. - */ - interface WithRepoUrl { - /** - * Specifies the repoUrl property: The repo url which will be integrated to ContainerApp.. - * - * @param repoUrl The repo url which will be integrated to ContainerApp. - * @return the next definition stage. - */ - WithCreate withRepoUrl(String repoUrl); - } - - /** - * The stage of the SourceControl definition allowing to specify branch. - */ - interface WithBranch { - /** - * Specifies the branch property: The branch which will trigger the auto deployment. - * - * @param branch The branch which will trigger the auto deployment. - * @return the next definition stage. - */ - WithCreate withBranch(String branch); - } - - /** - * The stage of the SourceControl definition allowing to specify githubActionConfiguration. - */ - interface WithGithubActionConfiguration { - /** - * Specifies the githubActionConfiguration property: Container App Revision Template with all possible - * settings and the - * defaults if user did not provide them. The defaults are populated - * as they were at the creation time. - * - * @param githubActionConfiguration Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated - * as they were at the creation time. - * @return the next definition stage. - */ - WithCreate withGithubActionConfiguration(GithubActionConfiguration githubActionConfiguration); - } - - /** - * The stage of the SourceControl definition allowing to specify xMsGithubAuxiliary. - */ - interface WithXMsGithubAuxiliary { - /** - * Specifies the xMsGithubAuxiliary property: Github personal access token used for SourceControl.. - * - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @return the next definition stage. - */ - WithCreate withXMsGithubAuxiliary(String xMsGithubAuxiliary); - } - } - - /** - * Begins update for the SourceControl resource. - * - * @return the stage of resource update. - */ - SourceControl.Update update(); - - /** - * The template for SourceControl update. - */ - interface Update extends UpdateStages.WithRepoUrl, UpdateStages.WithBranch, - UpdateStages.WithGithubActionConfiguration, UpdateStages.WithXMsGithubAuxiliary { - /** - * Executes the update request. - * - * @return the updated resource. - */ - SourceControl apply(); - - /** - * Executes the update request. - * - * @param context The context to associate with this operation. - * @return the updated resource. - */ - SourceControl apply(Context context); - } - - /** - * The SourceControl update stages. - */ - interface UpdateStages { - /** - * The stage of the SourceControl update allowing to specify repoUrl. - */ - interface WithRepoUrl { - /** - * Specifies the repoUrl property: The repo url which will be integrated to ContainerApp.. - * - * @param repoUrl The repo url which will be integrated to ContainerApp. - * @return the next definition stage. - */ - Update withRepoUrl(String repoUrl); - } - - /** - * The stage of the SourceControl update allowing to specify branch. - */ - interface WithBranch { - /** - * Specifies the branch property: The branch which will trigger the auto deployment. - * - * @param branch The branch which will trigger the auto deployment. - * @return the next definition stage. - */ - Update withBranch(String branch); - } - - /** - * The stage of the SourceControl update allowing to specify githubActionConfiguration. - */ - interface WithGithubActionConfiguration { - /** - * Specifies the githubActionConfiguration property: Container App Revision Template with all possible - * settings and the - * defaults if user did not provide them. The defaults are populated - * as they were at the creation time. - * - * @param githubActionConfiguration Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated - * as they were at the creation time. - * @return the next definition stage. - */ - Update withGithubActionConfiguration(GithubActionConfiguration githubActionConfiguration); - } - - /** - * The stage of the SourceControl update allowing to specify xMsGithubAuxiliary. - */ - interface WithXMsGithubAuxiliary { - /** - * Specifies the xMsGithubAuxiliary property: Github personal access token used for SourceControl.. - * - * @param xMsGithubAuxiliary Github personal access token used for SourceControl. - * @return the next definition stage. - */ - Update withXMsGithubAuxiliary(String xMsGithubAuxiliary); - } - } - - /** - * Refreshes the resource to sync with Azure. - * - * @return the refreshed resource. - */ - SourceControl refresh(); - - /** - * Refreshes the resource to sync with Azure. - * - * @param context The context to associate with this operation. - * @return the refreshed resource. - */ - SourceControl refresh(Context context); -} 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 deleted file mode 100644 index 62806179f538..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlCollection.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; -import java.io.IOException; -import java.util.List; - -/** - * SourceControl collection ARM resource. - */ -@Fluent -public final class SourceControlCollection implements JsonSerializable { - /* - * Collection of resources. - */ - private List value; - - /* - * Link to next page of resources. - */ - private String nextLink; - - /** - * Creates an instance of SourceControlCollection class. - */ - public SourceControlCollection() { - } - - /** - * 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 SourceControlCollection object itself. - */ - public SourceControlCollection 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 SourceControlCollection")); - } else { - value().forEach(e -> e.validate()); - } - } - - private static final ClientLogger LOGGER = new ClientLogger(SourceControlCollection.class); - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SourceControlCollection from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SourceControlCollection if the JsonReader was pointing to an instance of it, or null if it - * was pointing to JSON null. - * @throws IllegalStateException If the deserialized JSON object was missing any required properties. - * @throws IOException If an error occurs while reading the SourceControlCollection. - */ - public static SourceControlCollection fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SourceControlCollection deserializedSourceControlCollection = new SourceControlCollection(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("value".equals(fieldName)) { - List value = reader.readArray(reader1 -> SourceControlInner.fromJson(reader1)); - deserializedSourceControlCollection.value = value; - } else if ("nextLink".equals(fieldName)) { - deserializedSourceControlCollection.nextLink = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedSourceControlCollection; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlOperationState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlOperationState.java deleted file mode 100644 index 512eb73c3744..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlOperationState.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Current provisioning State of the operation. - */ -public final class SourceControlOperationState extends ExpandableStringEnum { - /** - * Static value InProgress for SourceControlOperationState. - */ - public static final SourceControlOperationState IN_PROGRESS = fromString("InProgress"); - - /** - * Static value Succeeded for SourceControlOperationState. - */ - public static final SourceControlOperationState SUCCEEDED = fromString("Succeeded"); - - /** - * Static value Failed for SourceControlOperationState. - */ - public static final SourceControlOperationState FAILED = fromString("Failed"); - - /** - * Static value Canceled for SourceControlOperationState. - */ - public static final SourceControlOperationState CANCELED = fromString("Canceled"); - - /** - * Creates a new instance of SourceControlOperationState value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public SourceControlOperationState() { - } - - /** - * Creates or finds a SourceControlOperationState from its string representation. - * - * @param name a name to look for. - * @return the corresponding SourceControlOperationState. - */ - public static SourceControlOperationState fromString(String name) { - return fromString(name, SourceControlOperationState.class); - } - - /** - * Gets known SourceControlOperationState values. - * - * @return known SourceControlOperationState values. - */ - public static Collection values() { - return values(SourceControlOperationState.class); - } -} 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 deleted file mode 100644 index 061353f4758a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringBootAdminComponent.java +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Spring Boot Admin properties. - */ -@Fluent -public final class SpringBootAdminComponent extends JavaComponentProperties { - /* - * Type of the Java Component. - */ - private JavaComponentType componentType = JavaComponentType.SPRING_BOOT_ADMIN; - - /* - * Java Component Ingress configurations. - */ - private JavaComponentIngress ingress; - - /* - * Provisioning state of the Java Component. - */ - private JavaComponentProvisioningState provisioningState; - - /** - * 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; - } - - /** - * Get the provisioningState property: Provisioning state of the Java Component. - * - * @return the provisioningState value. - */ - @Override - public JavaComponentProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public SpringBootAdminComponent withConfigurations(List configurations) { - super.withConfigurations(configurations); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpringBootAdminComponent withScale(JavaComponentPropertiesScale scale) { - super.withScale(scale); - 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() { - if (ingress() != null) { - ingress().validate(); - } - if (configurations() != null) { - configurations().forEach(e -> e.validate()); - } - if (scale() != null) { - scale().validate(); - } - if (serviceBinds() != null) { - serviceBinds().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("configurations", configurations(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("scale", scale()); - jsonWriter.writeArrayField("serviceBinds", serviceBinds(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("componentType", this.componentType == null ? null : this.componentType.toString()); - jsonWriter.writeJsonField("ingress", this.ingress); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpringBootAdminComponent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpringBootAdminComponent if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SpringBootAdminComponent. - */ - public static SpringBootAdminComponent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SpringBootAdminComponent deserializedSpringBootAdminComponent = new SpringBootAdminComponent(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedSpringBootAdminComponent.provisioningState - = JavaComponentProvisioningState.fromString(reader.getString()); - } else if ("configurations".equals(fieldName)) { - List configurations - = reader.readArray(reader1 -> JavaComponentConfigurationProperty.fromJson(reader1)); - deserializedSpringBootAdminComponent.withConfigurations(configurations); - } else if ("scale".equals(fieldName)) { - deserializedSpringBootAdminComponent.withScale(JavaComponentPropertiesScale.fromJson(reader)); - } else if ("serviceBinds".equals(fieldName)) { - List serviceBinds - = reader.readArray(reader1 -> JavaComponentServiceBind.fromJson(reader1)); - deserializedSpringBootAdminComponent.withServiceBinds(serviceBinds); - } else if ("componentType".equals(fieldName)) { - deserializedSpringBootAdminComponent.componentType - = JavaComponentType.fromString(reader.getString()); - } else if ("ingress".equals(fieldName)) { - deserializedSpringBootAdminComponent.ingress = JavaComponentIngress.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSpringBootAdminComponent; - }); - } -} 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 deleted file mode 100644 index a4afd4bfc252..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudConfigComponent.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Spring Cloud Config properties. - */ -@Fluent -public final class SpringCloudConfigComponent extends JavaComponentProperties { - /* - * Type of the Java Component. - */ - private JavaComponentType componentType = JavaComponentType.SPRING_CLOUD_CONFIG; - - /* - * Provisioning state of the Java Component. - */ - private JavaComponentProvisioningState provisioningState; - - /** - * 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; - } - - /** - * Get the provisioningState property: Provisioning state of the Java Component. - * - * @return the provisioningState value. - */ - @Override - public JavaComponentProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public SpringCloudConfigComponent withConfigurations(List configurations) { - super.withConfigurations(configurations); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpringCloudConfigComponent withScale(JavaComponentPropertiesScale scale) { - super.withScale(scale); - 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() { - if (configurations() != null) { - configurations().forEach(e -> e.validate()); - } - if (scale() != null) { - scale().validate(); - } - if (serviceBinds() != null) { - serviceBinds().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("configurations", configurations(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("scale", scale()); - jsonWriter.writeArrayField("serviceBinds", serviceBinds(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("componentType", this.componentType == null ? null : this.componentType.toString()); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpringCloudConfigComponent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpringCloudConfigComponent if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SpringCloudConfigComponent. - */ - public static SpringCloudConfigComponent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SpringCloudConfigComponent deserializedSpringCloudConfigComponent = new SpringCloudConfigComponent(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedSpringCloudConfigComponent.provisioningState - = JavaComponentProvisioningState.fromString(reader.getString()); - } else if ("configurations".equals(fieldName)) { - List configurations - = reader.readArray(reader1 -> JavaComponentConfigurationProperty.fromJson(reader1)); - deserializedSpringCloudConfigComponent.withConfigurations(configurations); - } else if ("scale".equals(fieldName)) { - deserializedSpringCloudConfigComponent.withScale(JavaComponentPropertiesScale.fromJson(reader)); - } else if ("serviceBinds".equals(fieldName)) { - List serviceBinds - = reader.readArray(reader1 -> JavaComponentServiceBind.fromJson(reader1)); - deserializedSpringCloudConfigComponent.withServiceBinds(serviceBinds); - } else if ("componentType".equals(fieldName)) { - deserializedSpringCloudConfigComponent.componentType - = JavaComponentType.fromString(reader.getString()); - } else { - reader.skipChildren(); - } - } - - return deserializedSpringCloudConfigComponent; - }); - } -} 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 deleted file mode 100644 index fe9c7ab1e498..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudEurekaComponent.java +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Spring Cloud Eureka properties. - */ -@Fluent -public final class SpringCloudEurekaComponent extends JavaComponentProperties { - /* - * Type of the Java Component. - */ - private JavaComponentType componentType = JavaComponentType.SPRING_CLOUD_EUREKA; - - /* - * Java Component Ingress configurations. - */ - private JavaComponentIngress ingress; - - /* - * Provisioning state of the Java Component. - */ - private JavaComponentProvisioningState provisioningState; - - /** - * 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; - } - - /** - * Get the provisioningState property: Provisioning state of the Java Component. - * - * @return the provisioningState value. - */ - @Override - public JavaComponentProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public SpringCloudEurekaComponent withConfigurations(List configurations) { - super.withConfigurations(configurations); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpringCloudEurekaComponent withScale(JavaComponentPropertiesScale scale) { - super.withScale(scale); - 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() { - if (ingress() != null) { - ingress().validate(); - } - if (configurations() != null) { - configurations().forEach(e -> e.validate()); - } - if (scale() != null) { - scale().validate(); - } - if (serviceBinds() != null) { - serviceBinds().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("configurations", configurations(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("scale", scale()); - jsonWriter.writeArrayField("serviceBinds", serviceBinds(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("componentType", this.componentType == null ? null : this.componentType.toString()); - jsonWriter.writeJsonField("ingress", this.ingress); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpringCloudEurekaComponent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpringCloudEurekaComponent if the JsonReader was pointing to an instance of it, or null if - * it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SpringCloudEurekaComponent. - */ - public static SpringCloudEurekaComponent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SpringCloudEurekaComponent deserializedSpringCloudEurekaComponent = new SpringCloudEurekaComponent(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedSpringCloudEurekaComponent.provisioningState - = JavaComponentProvisioningState.fromString(reader.getString()); - } else if ("configurations".equals(fieldName)) { - List configurations - = reader.readArray(reader1 -> JavaComponentConfigurationProperty.fromJson(reader1)); - deserializedSpringCloudEurekaComponent.withConfigurations(configurations); - } else if ("scale".equals(fieldName)) { - deserializedSpringCloudEurekaComponent.withScale(JavaComponentPropertiesScale.fromJson(reader)); - } else if ("serviceBinds".equals(fieldName)) { - List serviceBinds - = reader.readArray(reader1 -> JavaComponentServiceBind.fromJson(reader1)); - deserializedSpringCloudEurekaComponent.withServiceBinds(serviceBinds); - } else if ("componentType".equals(fieldName)) { - deserializedSpringCloudEurekaComponent.componentType - = JavaComponentType.fromString(reader.getString()); - } else if ("ingress".equals(fieldName)) { - deserializedSpringCloudEurekaComponent.ingress = JavaComponentIngress.fromJson(reader); - } else { - reader.skipChildren(); - } - } - - return deserializedSpringCloudEurekaComponent; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudGatewayComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudGatewayComponent.java deleted file mode 100644 index 53a06e6813bb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudGatewayComponent.java +++ /dev/null @@ -1,216 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Spring Cloud Gateway properties. - */ -@Fluent -public final class SpringCloudGatewayComponent extends JavaComponentProperties { - /* - * Type of the Java Component. - */ - private JavaComponentType componentType = JavaComponentType.SPRING_CLOUD_GATEWAY; - - /* - * Java Component Ingress configurations. - */ - private JavaComponentIngress ingress; - - /* - * Gateway route definition - */ - private List springCloudGatewayRoutes; - - /* - * Provisioning state of the Java Component. - */ - private JavaComponentProvisioningState provisioningState; - - /** - * Creates an instance of SpringCloudGatewayComponent class. - */ - public SpringCloudGatewayComponent() { - } - - /** - * 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 SpringCloudGatewayComponent object itself. - */ - public SpringCloudGatewayComponent withIngress(JavaComponentIngress ingress) { - this.ingress = ingress; - return this; - } - - /** - * Get the springCloudGatewayRoutes property: Gateway route definition. - * - * @return the springCloudGatewayRoutes value. - */ - public List springCloudGatewayRoutes() { - return this.springCloudGatewayRoutes; - } - - /** - * Set the springCloudGatewayRoutes property: Gateway route definition. - * - * @param springCloudGatewayRoutes the springCloudGatewayRoutes value to set. - * @return the SpringCloudGatewayComponent object itself. - */ - public SpringCloudGatewayComponent withSpringCloudGatewayRoutes(List springCloudGatewayRoutes) { - this.springCloudGatewayRoutes = springCloudGatewayRoutes; - return this; - } - - /** - * Get the provisioningState property: Provisioning state of the Java Component. - * - * @return the provisioningState value. - */ - @Override - public JavaComponentProvisioningState provisioningState() { - return this.provisioningState; - } - - /** - * {@inheritDoc} - */ - @Override - public SpringCloudGatewayComponent withConfigurations(List configurations) { - super.withConfigurations(configurations); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpringCloudGatewayComponent withScale(JavaComponentPropertiesScale scale) { - super.withScale(scale); - return this; - } - - /** - * {@inheritDoc} - */ - @Override - public SpringCloudGatewayComponent withServiceBinds(List serviceBinds) { - super.withServiceBinds(serviceBinds); - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - @Override - public void validate() { - if (ingress() != null) { - ingress().validate(); - } - if (springCloudGatewayRoutes() != null) { - springCloudGatewayRoutes().forEach(e -> e.validate()); - } - if (configurations() != null) { - configurations().forEach(e -> e.validate()); - } - if (scale() != null) { - scale().validate(); - } - if (serviceBinds() != null) { - serviceBinds().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeArrayField("configurations", configurations(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeJsonField("scale", scale()); - jsonWriter.writeArrayField("serviceBinds", serviceBinds(), (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("componentType", this.componentType == null ? null : this.componentType.toString()); - jsonWriter.writeJsonField("ingress", this.ingress); - jsonWriter.writeArrayField("springCloudGatewayRoutes", this.springCloudGatewayRoutes, - (writer, element) -> writer.writeJson(element)); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of SpringCloudGatewayComponent from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of SpringCloudGatewayComponent if the JsonReader was pointing to an instance of it, or null - * if it was pointing to JSON null. - * @throws IOException If an error occurs while reading the SpringCloudGatewayComponent. - */ - public static SpringCloudGatewayComponent fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - SpringCloudGatewayComponent deserializedSpringCloudGatewayComponent = new SpringCloudGatewayComponent(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("provisioningState".equals(fieldName)) { - deserializedSpringCloudGatewayComponent.provisioningState - = JavaComponentProvisioningState.fromString(reader.getString()); - } else if ("configurations".equals(fieldName)) { - List configurations - = reader.readArray(reader1 -> JavaComponentConfigurationProperty.fromJson(reader1)); - deserializedSpringCloudGatewayComponent.withConfigurations(configurations); - } else if ("scale".equals(fieldName)) { - deserializedSpringCloudGatewayComponent.withScale(JavaComponentPropertiesScale.fromJson(reader)); - } else if ("serviceBinds".equals(fieldName)) { - List serviceBinds - = reader.readArray(reader1 -> JavaComponentServiceBind.fromJson(reader1)); - deserializedSpringCloudGatewayComponent.withServiceBinds(serviceBinds); - } else if ("componentType".equals(fieldName)) { - deserializedSpringCloudGatewayComponent.componentType - = JavaComponentType.fromString(reader.getString()); - } else if ("ingress".equals(fieldName)) { - deserializedSpringCloudGatewayComponent.ingress = JavaComponentIngress.fromJson(reader); - } else if ("springCloudGatewayRoutes".equals(fieldName)) { - List springCloudGatewayRoutes = reader.readArray(reader1 -> ScgRoute.fromJson(reader1)); - deserializedSpringCloudGatewayComponent.springCloudGatewayRoutes = springCloudGatewayRoutes; - } else { - reader.skipChildren(); - } - } - - return deserializedSpringCloudGatewayComponent; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/StorageType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/StorageType.java deleted file mode 100644 index b99a84237d6d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/StorageType.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.models; - -import com.azure.core.util.ExpandableStringEnum; -import java.util.Collection; - -/** - * Storage type for the volume. If not provided, use EmptyDir. - */ -public final class StorageType extends ExpandableStringEnum { - /** - * Static value AzureFile for StorageType. - */ - public static final StorageType AZURE_FILE = fromString("AzureFile"); - - /** - * Static value EmptyDir for StorageType. - */ - public static final StorageType EMPTY_DIR = fromString("EmptyDir"); - - /** - * Static value Secret for StorageType. - */ - public static final StorageType SECRET = fromString("Secret"); - - /** - * Static value NfsAzureFile for StorageType. - */ - public static final StorageType NFS_AZURE_FILE = fromString("NfsAzureFile"); - - /** - * Static value Smb for StorageType. - */ - public static final StorageType SMB = fromString("Smb"); - - /** - * Creates a new instance of StorageType value. - * - * @deprecated Use the {@link #fromString(String)} factory method. - */ - @Deprecated - public StorageType() { - } - - /** - * Creates or finds a StorageType from its string representation. - * - * @param name a name to look for. - * @return the corresponding StorageType. - */ - public static StorageType fromString(String name) { - return fromString(name, StorageType.class); - } - - /** - * Gets known StorageType values. - * - * @return known StorageType values. - */ - public static Collection values() { - return values(StorageType.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpConnectionPool.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpConnectionPool.java deleted file mode 100644 index e99cce94111d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpConnectionPool.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Defines parameters for tcp connection pooling. - */ -@Fluent -public final class TcpConnectionPool implements JsonSerializable { - /* - * Maximum number of tcp connections allowed - */ - private Integer maxConnections; - - /** - * Creates an instance of TcpConnectionPool class. - */ - public TcpConnectionPool() { - } - - /** - * Get the maxConnections property: Maximum number of tcp connections allowed. - * - * @return the maxConnections value. - */ - public Integer maxConnections() { - return this.maxConnections; - } - - /** - * Set the maxConnections property: Maximum number of tcp connections allowed. - * - * @param maxConnections the maxConnections value to set. - * @return the TcpConnectionPool object itself. - */ - public TcpConnectionPool withMaxConnections(Integer maxConnections) { - this.maxConnections = maxConnections; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("maxConnections", this.maxConnections); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TcpConnectionPool from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TcpConnectionPool if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the TcpConnectionPool. - */ - public static TcpConnectionPool fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TcpConnectionPool deserializedTcpConnectionPool = new TcpConnectionPool(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maxConnections".equals(fieldName)) { - deserializedTcpConnectionPool.maxConnections = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedTcpConnectionPool; - }); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpRetryPolicy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpRetryPolicy.java deleted file mode 100644 index f53b603c908f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpRetryPolicy.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.models; - -import com.azure.core.annotation.Fluent; -import com.azure.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; - -/** - * Policy that defines tcp request retry conditions. - */ -@Fluent -public final class TcpRetryPolicy implements JsonSerializable { - /* - * Maximum number of attempts to connect to the tcp service - */ - private Integer maxConnectAttempts; - - /** - * Creates an instance of TcpRetryPolicy class. - */ - public TcpRetryPolicy() { - } - - /** - * Get the maxConnectAttempts property: Maximum number of attempts to connect to the tcp service. - * - * @return the maxConnectAttempts value. - */ - public Integer maxConnectAttempts() { - return this.maxConnectAttempts; - } - - /** - * Set the maxConnectAttempts property: Maximum number of attempts to connect to the tcp service. - * - * @param maxConnectAttempts the maxConnectAttempts value to set. - * @return the TcpRetryPolicy object itself. - */ - public TcpRetryPolicy withMaxConnectAttempts(Integer maxConnectAttempts) { - this.maxConnectAttempts = maxConnectAttempts; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeNumberField("maxConnectAttempts", this.maxConnectAttempts); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TcpRetryPolicy from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TcpRetryPolicy if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the TcpRetryPolicy. - */ - public static TcpRetryPolicy fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TcpRetryPolicy deserializedTcpRetryPolicy = new TcpRetryPolicy(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("maxConnectAttempts".equals(fieldName)) { - deserializedTcpRetryPolicy.maxConnectAttempts = reader.getNullable(JsonReader::getInt); - } else { - reader.skipChildren(); - } - } - - return deserializedTcpRetryPolicy; - }); - } -} 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 deleted file mode 100644 index 721410594a0f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * Container App container Tcp scaling rule. - */ -@Fluent -public final class TcpScaleRule implements JsonSerializable { - /* - * Metadata properties to describe tcp scale rule. - */ - private Map metadata; - - /* - * Authentication secrets for the tcp scale rule. - */ - 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. - */ - private String identity; - - /** - * Creates an instance of TcpScaleRule class. - */ - public TcpScaleRule() { - } - - /** - * Get the metadata property: Metadata properties to describe tcp scale rule. - * - * @return the metadata value. - */ - public Map metadata() { - return this.metadata; - } - - /** - * Set the metadata property: Metadata properties to describe tcp scale rule. - * - * @param metadata the metadata value to set. - * @return the TcpScaleRule object itself. - */ - public TcpScaleRule withMetadata(Map metadata) { - this.metadata = metadata; - return this; - } - - /** - * Get the auth property: Authentication secrets for the tcp scale rule. - * - * @return the auth value. - */ - public List auth() { - return this.auth; - } - - /** - * Set the auth property: Authentication secrets for the tcp scale rule. - * - * @param auth the auth value to set. - * @return the TcpScaleRule object itself. - */ - public TcpScaleRule withAuth(List auth) { - this.auth = 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. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (auth() != null) { - auth().forEach(e -> e.validate()); - } - } - - /** - * {@inheritDoc} - */ - @Override - public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { - jsonWriter.writeStartObject(); - jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element)); - jsonWriter.writeArrayField("auth", this.auth, (writer, element) -> writer.writeJson(element)); - jsonWriter.writeStringField("identity", this.identity); - return jsonWriter.writeEndObject(); - } - - /** - * Reads an instance of TcpScaleRule from the JsonReader. - * - * @param jsonReader The JsonReader being read. - * @return An instance of TcpScaleRule if the JsonReader was pointing to an instance of it, or null if it was - * pointing to JSON null. - * @throws IOException If an error occurs while reading the TcpScaleRule. - */ - public static TcpScaleRule fromJson(JsonReader jsonReader) throws IOException { - return jsonReader.readObject(reader -> { - TcpScaleRule deserializedTcpScaleRule = new TcpScaleRule(); - while (reader.nextToken() != JsonToken.END_OBJECT) { - String fieldName = reader.getFieldName(); - reader.nextToken(); - - if ("metadata".equals(fieldName)) { - Map metadata = reader.readMap(reader1 -> reader1.getString()); - deserializedTcpScaleRule.metadata = metadata; - } else if ("auth".equals(fieldName)) { - List auth = reader.readArray(reader1 -> ScaleRuleAuth.fromJson(reader1)); - deserializedTcpScaleRule.auth = auth; - } else if ("identity".equals(fieldName)) { - deserializedTcpScaleRule.identity = reader.getString(); - } else { - reader.skipChildren(); - } - } - - return deserializedTcpScaleRule; - }); - } -} 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 deleted file mode 100644 index bbdc4873cf84..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java +++ /dev/null @@ -1,293 +0,0 @@ -// Copyright (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.json.JsonReader; -import com.azure.json.JsonSerializable; -import com.azure.json.JsonToken; -import com.azure.json.JsonWriter; -import java.io.IOException; -import java.util.List; - -/** - * Container App versioned application definition. - * Defines the desired state of an immutable revision. - * Any changes to this section Will result in a new revision being created. - */ -@Fluent -public final class Template implements JsonSerializable